pmelchior / scarlet

hyperspectral galaxy modeling and deblending
MIT License
50 stars 22 forks source link

Programmatic versioning #185

Closed kadrlica closed 4 years ago

kadrlica commented 4 years ago

It would be nice to have internal versioning so that scarlet.__version__ does what you would expect it to do. It would be double nice to have that versioning track the GitHub tagged version (or commit).

I've been pretty happy with versioneer for solving these issues. I could probably be convinced to help getting it setup if the developers would be interested.

pmelchior commented 4 years ago

Thanks, Alex. I didn't know versioneer before, and was thinking more along these lines here, especially a combination of ideas 1 and 6.

kadrlica commented 4 years ago

I think this is essentially what versioneer does, but it also syncs with the git tag and commits since the most recent tag.

Here is an example from my skymap package showing the the _version.py created by versioneer, and the implementation in setup.py and init.py

pmelchior commented 4 years ago

We already have code for working with git tags, so I think we just have to connect a few dots.

Btw, have we really coded up the same thing twice?

kadrlica commented 4 years ago

Regarding skymap and skymapper I don't think so, but you can ask some users who have used both (I know we talked about this a long time ago and decided to go our separate ways). skymap itself is coming close to EOL because of the deprecation of basemap, it's going to be replaced by cartosky.

kadrlica commented 4 years ago

With respect to connecting dots, it is completely up to you and the dev team. In my experience, there end up being quite a few edge cases and dots to connect.

pmelchior commented 4 years ago

Fixed by #197