Move project metadata to pyproject.toml (PEP 621)#3430
Move project metadata to pyproject.toml (PEP 621)#3430snowman2 merged 5 commits intorasterio:mainfrom
Conversation
adamjstewart
left a comment
There was a problem hiding this comment.
I think there are ways that this could be improved (see comments), but I would suggest sticking with a strict setup.py -> pyproject.toml conversion in this PR and make these improvements in a follow-up PR.
pyproject.toml
Outdated
| "setuptools>=67.8", | ||
| "setuptools>=77.0.3", | ||
| "wheel", | ||
| "cython~=3.1.0", |
There was a problem hiding this comment.
I wonder if we can relax this constraint to support 3.2
There was a problem hiding this comment.
How about "cython>=3.1,<=3.2"?
| {name = "Sean Gillies", email = "sean@mapbox.com"}, | ||
| ] | ||
| maintainers = [ | ||
| {name = "Rasterio contributors"}, |
There was a problem hiding this comment.
I would suggest listing the people with merge privileges here. All rasterio contributors are authors, but only some are maintainers.
There was a problem hiding this comment.
This is reasonable. But I'd suggest this for a follow-up PR, as I don't know the current list of maintainers.
| "click-plugins", | ||
| "cligj>=0.5", | ||
| "numpy>=1.24", | ||
| "pyparsing", |
There was a problem hiding this comment.
Would be nice if we discovered the minimum supported versions of all deps and actually tested them to make sure they stay up-to-date.
There was a problem hiding this comment.
Good follow-up PR to go along with revising use of requirements.txt files.
There was a problem hiding this comment.
I could be convinced to work on this if we get all other tests in CI passing first.
There was a problem hiding this comment.
Should we get rid of these requirements files so as to avoid code duplication? Or use them with pinned versions and dependabot solely for testing?
There was a problem hiding this comment.
@adamjstewart the requirements file is only for testing. In CI or locally.
I'll make a separate PR to move it to ci/requirements.txt.
There was a problem hiding this comment.
Currently they are duplicates. We could use pip install .[tests] in testing if we aren't planning on using dependabot.
There was a problem hiding this comment.
Definitely separate PR, as there are many variations and nuances how to use (or not) these files.
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| all = ["rasterio[docs,ipython,plot,s3,test]"] |
There was a problem hiding this comment.
Note that although this works (and I personally use it in my projects), it's undocumented and not guaranteed to be supported forever.
There was a problem hiding this comment.
I've noticed this too. It has "worked" for pip versions for at least a few years, but I recall it didn't work with earlier versions. I'd expect some PEP like this (currently draft) PEP 771 to eventually support this need.
|
Thanks @mwtoews 👍 |
This PR moves the project metadata to pyproject.toml, following PEP 621. Some other details:
Now it is possible to use modern tools like
uv sync --all-extrasanduv run pytestto build and test everything.