GPlates / gplately

GPlately is a Python package to interrogate tectonic plate reconstructions.
https://gplates.github.io/gplately/
GNU General Public License v2.0
55 stars 12 forks source link

Create a `pyproject.toml` next to setup.py #140

Closed brmather closed 7 months ago

brmather commented 7 months ago

Apparently pyproject.toml files are going to become the new standard for python packages. Currently setup.py is still recommended to stay, but there are some advantages to the new packaging system - build time dependencies in particular!

It would be good to grab the version number from the current git tag at build time. I found this python-versioneer package that might be able to do this. Could you look into it, @michaelchin? I always accidentally release a package without updating the version number in setup.py which means it is not uploaded to PYPI or conda, and then I have to release another point release to fix my mistake...

michaelchin commented 7 months ago

https://packaging.python.org/en/latest/guides/single-sourcing-package-version/

michaelchin commented 7 months ago

I will create a script to update version, create tag, create release and publish to PyPI, usage example ./create-release.py 1.1.1,

Basically copy these files from plate-model-manager project

Let me know if this look OK.

brmather commented 7 months ago

It would be preferable if this could be done via GitHub actions if we ever want to publish a new version of this software on JOSS. I also like to create new releases on GitHub because it can generate release notes that link to all the merged PRs. Is there a way to grab the version number from the tag and propagate that to setup.py?

brmather commented 7 months ago

Also, if I’m travelling and don’t have access to my computer it’s handy to create new releases on GitHub from my phone 😉