alan-turing-institute / deepsensor

A Python package for tackling diverse environmental prediction tasks with NPs.
https://alan-turing-institute.github.io/deepsensor/
MIT License
94 stars 16 forks source link

Update to use `pyproject.toml` for packaging metadata #137

Open davidwilby opened 1 week ago

davidwilby commented 1 week ago

:pencil: Description

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.)

If changing or adding source code:

If changing or adding documentation: