Commit Graph

4 Commits

Author SHA1 Message Date
Judah Rand a52ac6d2c5
fix(sdk.v2): Component is invalid if `packages_to_install` empty and `install_kfp_package=False` (#6527)
If an empty list is provided no command should be returned to avoid a
broken command eg. `pip install      `
2021-09-15 17:03:54 -07:00
Alex Latchford a0b18eb9e8
fix(sdk): Get short name of complex input/output types to ensure we can map to appropriate de|serializer (#6504)
Also:
- Simplify _data_passing methods, add in type hints and docstrings.
- Remove get_deserializer_code_for_type.
2021-09-09 17:31:51 -07:00
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
Ajay Gopinathan f3f383c2ff
chore(sdk): Refactor and move all v2 related code to under the v2 namespace. (#6358)
* Refactor and move all v2 related code to under the v2 namespace.

Most of the changes are around imports and restructuring of the
codebase. While it looks like a lot of code was added, most of the code
already existed and was simply moved or copied over to v2. The only
exceptions are:
- under kfp/v2/components/component_factory.py: some helper functions
  were copied with simplification from _python_op.py
- we no longer strip the `_path` suffix in v2 components.

Note: there is still some duplication of code (particularly between
component_factory.py and _python_op.py), but it's ok for now since we
intend to replace some of this with v2 ComponentSpec + BaseComponent.

* Update setup.py.

* update tests.

* revert accidental change of gcpc

* Fix component entrypoint.

* Update goldens.

* fix tests.

* fix merge conflict.

* revert gcpc change.

* fix tests.

* fix tests.

* Add type aliases for moved files.

* merge and update goldens.
2021-08-17 19:25:37 -07:00