Commit Graph

15 Commits

Author SHA1 Message Date
Chen Sun 2f19a26ffd
chore(sdk): Format all Python files under SDK folder. (#6501)
* Reformat sdk only using the new yapf config.

* Reformat docstrings using docformatter.

* update golden files to resolve diff caused by whitespaces

* fix some tests

* format .py files under sdk/python/tests using yapf

* additional docformatter

* fix some tests
2021-09-03 11:25:11 -07:00
Joshua Carp f43ecc223d
chore(sdk): Import mock from stdlib and drop dependency. (#6456)
* Import mock from stdlib and drop dependency.

* Drop mock from requirements.

h/t @chensun
2021-08-31 16:38:44 -07:00
Chen Sun 50f7dcd5d0
chore(sdk): Warn on container component without command. Fixes #4800 (#6335)
* Warn on container component without command

* address cr comments
2021-08-14 01:14:04 -07:00
Alexey Volkov cc83e1089b
Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
Alexey Volkov ba3a92f6d0
chore(sdk): Refactored command-line resolving (#5379)
* SDK - Refactored command-line resolving

Moved the execution engine specific code to the component bridge.

* Added placeholder_resolver

This simplifies adding custom placeholder resolving logic.
2021-04-09 13:44:03 -07:00
Jiaxiao Zheng d3a7fbf1ca
feat(sdk): Refactor v2 component building (#5163)
* add executor input placeholder and remove unused entrypoint function

* add executor input generator

* add tests and fixes

* add comments for v2 component args

* refactor output metadata path placeholder

* fix test and change yaml dumping

* fix tests
2021-02-23 15:45:14 -08:00
Jiaxiao Zheng 846423a870
feat(sdk): Always add pipeline root as a pipeline parameter (#5122)
* refactor pipeline root passing

* fix test
2021-02-10 16:29:57 -08:00
Jiaxiao Zheng a36a62a700
feat(sdk): Artifact metadata related placeholder for components. (#5003)
* resolve comments.

* fix tests

* wip: add structures and skeleton for component resolution logic

* add generator

* fix the problem

* cleanup

* add a test

* fix tests
2021-01-19 08:57:45 -08:00
Jiaxiao Zheng 7540ba5c3b
feat(sdk): Implements artifact URI placeholder. (#4932)
* add placeholder to spec

* add output_directory to pipeline

* respect uri placeholder in file outputs

* wip: add data passing rewriting logic to respect the uri semantics

* merge input_uri and paths when instantiating ContainerOp

* fix

* fix workflow rewriting

* Add topology rewriting

* add a test case, and various fixes

* make the test case more complex

* Fix the case when working with OpsGroup

* Fix test case

* fix resolving test

* fix redundant cmd lines

* fix redundant cmd lines

* resolve comments

* fix file outputs

* resolve comments

* copy file outputs instead of modifying inplace.
2021-01-05 20:39:51 -08:00
Chen Sun 88dbfda02b
chore(sdk): Add inputUri and outputUri placeholders in v1 (#4913)
* SDK - Components - Added support for inputUri and outputUri placeholders

* remove InputUriSpec and OutputUriSpec

* Address review comments

Co-authored-by: Alexey Volkov <alexey.volkov@ark-kun.com>
2020-12-18 08:28:25 -08:00
Alexey Volkov 03325848fc
feat(sdk): Components - Prevent passing unserializable objects to components. Fixes #4040 (#4496) 2020-09-16 02:23:22 -07:00
Alexey Volkov 62c743354e
test(sdk): Components tests - Made test_load_component_from_url hermetic (#4121)
Mocking the `requests.get` call so that the test can run without internet.
2020-07-01 21:02:01 -07:00
Alexey Volkov 51b1c7468f
SDK - Tests - Fixed two test failures in hermetic systems (4057)
Removed path resolving in two tests.
The `.resolve()` should be harmless, but I've seen these tests fail to work in some unusual strict hermetic systems. The test code file path was resolving to a tree which was different from the parent of the file, so the test could not find the test data.
2020-06-25 12:24:19 -07:00
Alexey Volkov 92394f6542
SDK - Tests - Use relative imports (#3784)
This makes testing easier to run in local dev scenarios.
2020-05-19 00:09:36 -07:00
Alexey Volkov 1dcea49472
SDK - Moved the tests closer to the code (#3774)
This makes switching from code to tests easier
2020-05-18 01:37:35 -07:00