-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Migration to pyproject.toml
#3338
base: master
Are you sure you want to change the base?
Conversation
6c32e93
to
cb3d1c1
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.
Awesome start on this! I really appreciate your active involvement. My time is too unpredictable to spend significant dedicated time to this project.
@@ -2,7 +2,7 @@ For maintainers of Luigi, who have push access to pypi. Here's how you upload | |||
Luigi to pypi. | |||
|
|||
#. Make sure [twine](https://pypi.org/project/twine/) is installed ``pip install twine``. | |||
#. Update version number in `luigi/__meta__.py`. | |||
#. Update version number in `luigi/__version__.py`. |
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.
When moving to uv
, we can update the build and upload steps below to use uv build sdist
and uv publish
(rather than the setup.py and twine references).
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.
Optionally, we can use uvx hatch version patch
(or minor/major) to modify the project version, rather than manually updating the luigi/__version__.py
file. Though, i think it's worth keeping the mention of where the version indicator lives.
common = [ | ||
"pytest<7.0", |
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.
I have 2 preferences here related to sorting:
- keep package names in alphabetic order
- keep group names in alphabetic order
This makes it easiest for humans to view and also to maintain order where new packages should be added.
[project.optional-dependencies] | ||
jsonschema = ["jsonschema"] | ||
prometheus = ["prometheus-client>=0.5,<0.15"] | ||
toml = ["toml<2.0.0"] | ||
|
||
[dependency-groups] | ||
dropbox = [ |
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.
(This comment doesn't need to be addressed as part of this PR; mostly just thinking aloud)
Perhaps it makes sense in the future to move some of the dependency-groups
content which is used for unit test execution for specific luigi modules (particularly the contrib and optional stuff) out of dependency-groups
and into project.optional-dependencies
to facilitate luigi installation with "extras". These extras can also easily control the cases where the luigi module may only support up to a max version.
Food for thought if it changes how you design/organize this file.
requires = | ||
tox>=4.22 # `dependency_groups` needed | ||
tox-uv>=1.19 |
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.
Could you help me understand why these requirements are here and not in pyproject?
@@ -67,7 +67,10 @@ def _warn_node(self, msg, node, *args, **kwargs): | |||
|
|||
sphinx.environment.BuildEnvironment.warn_node = _warn_node | |||
|
|||
if os.environ.get('READTHEDOCS', None) == 'True': | |||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org |
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.
Before merging, we'll need to identify how to verify the merging of the final version of this branch doesn't break Luigi's readthedocs.
81d9cae
to
1fef047
Compare
1fef047
to
2821873
Compare
Description
In this PR, I migrated from
setup.py
topyproject.toml
usinguv
.Fixes #3327.
In detail I did followings:
setup.py
features to equivalentpyproject.toml
uv
as a package managertox.ini
topyproject.toml
tox
version to use new features oftox
andpyproject.toml
A part of codes are burrowed from @dlstadther 's branch.
ref master...dlstadther:luigi:migrate-setup-to-pyproject
Motivation and Context
python setup.py install
is deprecated.Have you tested this? If so, how?
CI worked.