Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sdk): make kfp v2 hermetic #7428

Merged
merged 10 commits into from
Mar 18, 2022

Conversation

connor-mccarthy
Copy link
Member

@connor-mccarthy connor-mccarthy commented Mar 16, 2022

Description of your changes:

The primary work completed by this PR is:

  • move v1 files to v2

Other changes include:

  • format with yapf
  • remove unused imports
  • clean up
  • update copyright
  • move imports to module top level
  • apply some pylint changes
  • loosen pylintrc

Reviewer notes:
I recommend stepping through changes commit-by-commit for readability.

Checklist:

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow google-oss-prow bot requested a review from zijianjoy March 16, 2022 21:38
@connor-mccarthy connor-mccarthy marked this pull request as ready for review March 16, 2022 21:38
@connor-mccarthy connor-mccarthy changed the title feat(sdk): make kfp v2 hermetic chore(sdk): make kfp v2 hermetic Mar 17, 2022
Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks!

generic_type = typ.__origin__ or getattr(
typ, '__extra__', None
) #In python <3.7 typing.List.__origin__ == None; Python 3.7 has working __origin__, but no __extra__ TODO: Remove the __extra__ once we move to Python 3.7
if generic_type in [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We have dropped Python 3.6 support. So we should be able to clean this up.
Feel free to do it here or in a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

I will do this in a second PR because of the complexity of the code here, that way if any bugs are introduced they belong to a different commit.


def load_yaml(stream):
#!!! Yaml should only be loaded using this function. Otherwise the dict ordering may be broken in Python versions prior to 3.6
#See https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts/21912744#21912744
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we also drop this if it's no longer applicable for Python 3.7?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, great catch. We can drop this whole file, actually.

Done.

@chensun
Copy link
Member

chensun commented Mar 18, 2022

/lgtm
/approve

Thanks!

@google-oss-prow google-oss-prow bot added the lgtm label Mar 18, 2022
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chensun
Copy link
Member

chensun commented Mar 18, 2022

/retest

@google-oss-prow google-oss-prow bot merged commit 2c0b381 into kubeflow:master Mar 18, 2022
abaland pushed a commit to abaland/pipelines that referenced this pull request May 29, 2022
* move v1 files to v2

* format with yapf

* remove unused imports

* clean up

* update copyright

* move imports to module top level

* apply some pylint changes

* loosen pylintrc

* remove v2_yaml_utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants