Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I set the version number between releases? [closed]

I have a Python project on GitHub (ModelicaRes). I'm trying to follow Semantic Versioning. I post releases the main project site and upload them to PyPI. For the releases, I write the version number in the main __init__.py file (__version__=...). Between releases, I push updates to GitHub (usually on the main branch---nothing fancy).

How should I set the version number for these inter-release updates? The commits are usually working copies. They aren't fully tested, but others may download and use these copies (via GitHub). Usually, I'm not ready to determine the new version number. Lately I've been setting the version number to None and putting an auto-generated "UNRELEASED COPY" file in the base folder with the commit date and other info. However, I'm not convinced this is the best approach.

This may apply to other languages, but right now I'm just interested in Python.

I guess I could try to use an "alpha", "beta", or "rc" suffix on the next version number, but again I don't always know the next version number (could be major or minor or bugfixes only). I also want to keep this simple---not a lot of branching, etc.

Thanks!

like image 979
kdavies4 Avatar asked Dec 26 '22 07:12

kdavies4


1 Answers

The current recommendations for versioning of Python packages / distributions are summarizied in the Python Packaging User Guide here:

1.2.0.dev1  # Development release
1.2.0a1     # Alpha Release
1.2.0b1     # Beta Release
1.2.0rc1    # Release Candidate
1.2.0       # Final Release
1.2.0.post1 # Post Release
15.10       # Date based release
23          # Serial release

following the recommendations of draft PEP 440.

like image 144
Ned Deily Avatar answered Dec 31 '22 14:12

Ned Deily