Qiskit-Extensions / circuit-knitting-toolbox

Tools for knitting quantum circuits with Qiskit
https://qiskit-extensions.github.io/circuit-knitting-toolbox/
Apache License 2.0
70 stars 24 forks source link

RFC: Use hatch-vcs to determine project's version from git #578

Closed garrison closed 1 month ago

garrison commented 2 months ago

This uses hatch-vcs to set the version automatically based on the most recent git tag, instead of having it specified and bumped manually in pyproject.toml. Two benefits I can think of

Downside:

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 8944133042

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 8913240803: 0.0%
Covered Lines: 3498
Relevant Lines: 3663

💛 - Coveralls
garrison commented 2 months ago

If we go this route, we'll have to think carefully about what version information should be shown by Sphinx on the stable doc build. Currently, it's going to pick up some of this added stuff in the version specifier, but this can be fixed by changing the following few lines:

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/fe2da9a11b123038227b720edfb59b7ef929f63d/docs/conf.py#L33-L36

My biggest problem with hatch-vcs is that it always seems to think the next release is a patchlevel one, and there seems to be no way to configure this (at least, no way that I've found so far). For instance, it thinks the next release on main is going to be 0.7.2, not 0.8.0.

garrison commented 1 month ago

I'm going to close this for now, at least until I can figure out how to be satisfied with the automatic version strings.