At the moment, dependencies are specified in both setup.cfg and in requirements files under requirements/ 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 the setup.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 using setup.cfg, but the python community seems to be converging on pyproject.toml. If we need to keep setup.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.
:white_check_mark: Checklist before requesting a review
(See the contributing guide for more details on these steps.)
[x] I have installed developer dependencies with pip install -r requirements/requirements.dev.txt and running pre-commit install (or alternatively, manually running ruff format before commiting)
If changing or adding source code:
[x] tests are included and are passing (run pytest).
[x] documentation is included or updated as relevant, including docstrings.
If changing or adding documentation:
[x] docs build successfully (jupyter-book build docs --all) and the changes look good from a manual inspection of the HTML in docs/_build/html/.
:pencil: 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.
:white_check_mark: 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/
.