-
Notifications
You must be signed in to change notification settings - Fork 1.8k
WIP: feat: Adding pyproject.toml to support more modern PEPs #12275
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @CollinHowland. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
🚫 This command cannot be processed. Only organization members or owners can use the commands. |
|
@zazulam take a look and lmk what direction you would like to take for the various dependency types (e.g. necessary dependencies, dev, deprecated) and I can update the pyproject.toml + remove any Once the desired standard is established, I'll apply it to the rest of the packages mentioned in #12245 |
@CollinHowland I would say to first try setting up the multiple pyproject.tomls, I believe that you might encounter something where the root will need an overarching toml file that would be considered the main "project". As for the various types of deps, they way you currently have them makes sense. |
6eda16e to
2ded967
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, the requirements txt and in files are still present. Looks like there's a lot of tests and other things that refer to them. I could try updating all of them to refer to the pyproject.toml/packages and not the requirements files, but that could make this PR massive.
LMK @zazulam if you'd like that to be added to this PR, a follow-up PR, or a separate PR that will first be merged into this branch before merging into the upstream master.
|
|
||
| [project.optional-dependencies] | ||
| # TODO: needs to be dynamically set based on KFP version | ||
| # kubernetes = [f'kfp-kubernetes=='] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notably this won't be as easy to get dynamically. I can try dynamically generating a requirements.txt file and grabbing the version. Or some other external thing but because we're not using python like setup.py does, it becomes much more difficult.
LMK if you'd like me to get that dynamic aspect integrated or if there's something we can set (e.g. max, min, or pin)
|
/ok-to-test |
|
Approvals successfully granted for pending runs. |
a612828 to
f8c8a8f
Compare
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
…ting some previous pyproject.tomls Signed-off-by: CollinHowland <[email protected]>
…g some previous pyproject.tomls Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
Signed-off-by: CollinHowland <[email protected]>
…ng license to be SPDX format in all pyprojects. Signed-off-by: CollinHowland <[email protected]>
…o licenses and READMEs. Signed-off-by: CollinHowland <[email protected]>
a612828 to
65597eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the License classifier as it looks like pyproject.toml expects a different format and doesn't want these.
I also made symlinks to the corresponding README's and LICENSE files if they were in some sort of parent directory because the relative path finding when parsing the pyproject.toml doesn't work (e.g. readme = '../../README' can't be found as a valid path)
| [project.optional-dependencies] | ||
| # TODO: needs to be dynamically set based on KFP version | ||
| # kubernetes = [f'kfp-kubernetes=='] | ||
| kubernetes = ['kfp-kubernetes'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the dynamic version needed, I made this not pinned or less than any specific version.
Work in progress - looking for feedback
Addresses #12245
rufffor the speed and ease but that can be a follow up PR as that can replace many of the existing pre-commit hooksRegarding the pyproject.toml hierarchy, from my limited research I believe there's a way to define a parent pyproject.toml and then tell it to recognize sub pyproject.toml files. This looked more useful for applying things like common settings (e.g. uv or ruff configurations). I don't think it's worth adding in this PR so far, as I haven't come across a common setting or group of settings to distribute among all pyproject.toml files. But if you do all add uv, ruff, or some other tool that is configured in a pyproject.toml, I recommend creating the parent pyproject.toml accordingly.
Checklist: