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

Migrate as much as possible to pyproject.toml #1151

Merged
merged 25 commits into from
Feb 22, 2023

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Nov 4, 2022

Description

  • Adds tomli dependency for Python pre-3.11
  • Moves package data handling to MANIFEST.in
  • Symlinks and packages README
  • Specifies build backend & moves to newer setuptools backend
  • Pulls all metadata into pyproject.toml
  • Migrates setup.cfg content to pyproject.toml
  • Simplifies setup.py to the minimal amount of logic necessary

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jakirkham jakirkham requested review from a team as code owners November 4, 2022 01:20
@jakirkham
Copy link
Member Author

cc @vyasr

@github-actions github-actions bot added conda Python Related to RMM Python API labels Nov 4, 2022
@jakirkham jakirkham added 3 - Ready for review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 4, 2022
@jakirkham
Copy link
Member Author

jakirkham commented Nov 4, 2022

We may need to update some things on CI (like isort)

Edit: Looks like we need tomli in more places

@vyasr
Copy link
Contributor

vyasr commented Nov 4, 2022

This looks great! I'm in favor of almost all of these changes. However, I would like to test this out with the wheel building before we merge anything just to be safe. Burn down is coming up fast and build infrastructure is fragile enough by nature that I'm wary of making changes that could hold up that effort. We're pretty close to stabilizing our logic for wheels so I think we should be able to test this with wheel builds within the next week or so.

@vyasr
Copy link
Contributor

vyasr commented Nov 4, 2022

Happy to iterate on this PR until then though of course.

@vyasr vyasr added the 5 - DO NOT MERGE Hold off on merging; see PR for details label Nov 4, 2022
@jakirkham
Copy link
Member Author

Yeah the changes here should be useful for wheel building. Trying out the changes here would be welcome. Though likely still needs a couple fixes.

bdice
bdice previously requested changes Nov 6, 2022
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

This is awesome @jakirkham. It fixes a lot of minor problems in the rmm packaging that have been troublesome on occasion. I have a couple small requests. I also fixed the merge conflicts in the dependencies.yaml file.

python/pyproject.toml Outdated Show resolved Hide resolved
python/rmm/__init__.py Outdated Show resolved Hide resolved
@caryr35 caryr35 added this to PR-WIP in v22.12 Release via automation Nov 7, 2022
@caryr35 caryr35 moved this from PR-WIP to PR-Needs review in v22.12 Release Nov 7, 2022
@jakirkham jakirkham requested a review from bdice November 8, 2022 04:41
@jakirkham jakirkham mentioned this pull request Nov 8, 2022
3 tasks
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Thanks @jakirkham! Just a few suggestions with packaging, then this will be good to go.

python/MANIFEST.in Outdated Show resolved Hide resolved
python/MANIFEST.in Show resolved Hide resolved
python/pyproject.toml Show resolved Hide resolved
@bdice bdice mentioned this pull request Nov 9, 2022
3 tasks
@vyasr vyasr removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label Nov 15, 2022
@jakirkham
Copy link
Member Author

Thanks Vyas! 🙏

Would it work with a symlink?

Copy link
Member Author

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Included a couple notes about other things that can move to pyproject.toml potentially

python/setup.py Show resolved Hide resolved
python/setup.py Outdated Show resolved Hide resolved
python/setup.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added the ci label Feb 17, 2023
@vyasr
Copy link
Contributor

vyasr commented Feb 17, 2023

Would it work with a symlink?

My guess is that a symlink would work for most RAPIDS packages where the C++ is contained in a separate directory in the tree. In this instance I think you would end up with a circular symlink because the C++ is contained at the top-level directory (perhaps something that we should consider changing in rmm anyway). In particular, you need the CMakeLists.txt file contained at the root of the repo.

Copy link
Member Author

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Vyas! 🙏

Had a couple small follow up points around packaging of text files

python/pyproject.toml Outdated Show resolved Hide resolved
python/pyproject.toml Show resolved Hide resolved
python/MANIFEST.in Show resolved Hide resolved
@jakirkham
Copy link
Member Author

Would it work with a symlink?

My guess is that a symlink would work for most RAPIDS packages where the C++ is contained in a separate directory in the tree. In this instance I think you would end up with a circular symlink because the C++ is contained at the top-level directory (perhaps something that we should consider changing in rmm anyway). In particular, you need the CMakeLists.txt file contained at the root of the repo.

Ok think we should punt on this. Was mostly curious if there was an easy answer, but it seems this needs more thought. So yeah we can raise an issue and skip

Co-authored-by: jakirkham <jakirkham@gmail.com>
@jakirkham
Copy link
Member Author

Perhaps it is weird to review my PR. In any event, Vyas these changes look good to me. Thank you for working on them! 🙏

@vyasr vyasr requested a review from bdice February 21, 2023 17:39
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Two non-blocking suggestions. Otherwise LGTM!

python/pyproject.toml Outdated Show resolved Hide resolved
python/pyproject.toml Outdated Show resolved Hide resolved
@vyasr
Copy link
Contributor

vyasr commented Feb 22, 2023

/merge

@rapids-bot rapids-bot bot merged commit ebf591f into rapidsai:branch-23.04 Feb 22, 2023
@jakirkham jakirkham deleted the migr_pyproj branch February 22, 2023 19:10
@jakirkham
Copy link
Member Author

Thanks all! 🙏

rapids-bot bot pushed a commit that referenced this pull request Feb 24, 2023
There were a couple of issues that accidentally made it through in #1151.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #1226
@vyasr vyasr mentioned this pull request Feb 24, 2023
3 tasks
rapids-bot bot pushed a commit that referenced this pull request Feb 28, 2023
We need to update the version regex in update-version.sh for the pyproject.toml changes in #1151.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Ray Douglass (https://github.com/raydouglass)

URL: #1227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for review Ready for review by team ci conda improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Related to RMM Python API
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants