neuroinformatics-unit / python-cookiecutter

Utility to create a basic Python project structure with tests, CI etc.
BSD 3-Clause "New" or "Revised" License
22 stars 3 forks source link

Consider using both bump2version and setuptool_scm #5

Closed adamltyson closed 1 year ago

adamltyson commented 1 year ago

An excellent idea from @dstansby:

maybe a good way to go would be to use both, and use bump2version to just set the git tag correctly, with setuptools_scm handling setting the Python package version from the git tag?

We should test this. In theory this should allow for the nice bits of bump2version such as being able to set the version semantically rather than numerically, but without the complex setup to define what gets updated and where.

This should also hopefully future proof us a bit to changes in python packaging.

cc @SainsburyWellcomeCentre/neuroinformatics-unit

niksirbi commented 1 year ago

That sounds like a great idea if it actually works in practice, without the two tools clashing

JoeZiminski commented 1 year ago

Interesting discussion on this here, in the end I believe they have also taken this joint approach.

adamltyson commented 1 year ago

Now gone with only setuptools_scm. Need to document this (and remove the bump2version docs).

adamltyson commented 1 year ago

setuptools_scm is now documented