Update to use pyproject.toml
for packaging metadata
#137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
At the moment, dependencies are specified in both
setup.cfg
and in requirements files underrequirements/
which is a little odd and opens up potential errors such as in #131 where I bumped the version of neuralprocesses in the requirements file but not in thesetup.cfg
- the tests pass because they use the requirements file, but the built package would not have the same dependency version specification.In this PR, I suggest moving to using
pyproject.toml
for specifying package metadata. This does solve the above problem, though that could also be solved usingsetup.cfg
, but the python community seems to be converging onpyproject.toml
. If we need to keepsetup.py
for any reason, that is also possible.This PR also updates the workflows and docs accordingly.
I've tested that builds succeed and all seems to work as expected.
Feel free to close this @tom-andersson if it isn't to your taste.
✅ Checklist before requesting a review
(See the contributing guide for more details on these steps.)
pip install -r requirements/requirements.dev.txt
and runningpre-commit install
(or alternatively, manually runningruff format
before commiting)If changing or adding source code:
pytest
).If changing or adding documentation:
jupyter-book build docs --all
) and the changes look good from a manual inspection of the HTML indocs/_build/html/
.