Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
instead of handcoding the version, let's just use the git tags. this is en route to continuous deployment where we just cut a new version by pushing a new tag. it will also let us give unambiguous version information for provenance sake when we start embedding version in configs and output data
v0.0.0
: when you are on a clean checkout (nothing changed, nothing staged) of a commit with a tag with the patternv.*
, that is the version. i.e. when a CI/CD action is triggered by a new tag starting with v, that will be the version. We don't use tags for anything else atm so there shouldn't be a problem of accidentally making a non-version tag that starts withv
, but in any case we'll deal with that in the cd action.v0.0.0.dev{n}+{hash}
(e.g.0.4.2.dev8+g56b32b7
) wheren
is the number of commits after the last version tag andhash
is the short hash: when you are on a clean checkout (nothing changed, nothing stages) of a commit without a version tag. Then
is computed relative to the closest tag in the commit historyv0.0.0.dev{n}+{hash}.d{time:%Y%m%d}
(e.g.0.4.2.dev8+g56b32b7.d20241106
): when you are on a dirty commit with no version - aka you have uncommitted or unstaged changes in the repo.also added
__version__
const as is outdated but still treasured traditionsee: https://backend.pdm-project.org/metadata/#dynamic-project-version
📚 Documentation preview 📚: https://miniscope-io--56.org.readthedocs.build/en/56/