Skip to content

chore: migrate bump2version to hatch-vcs - #130

Merged
chrisdicaprio merged 1 commit into
mainfrom
chore/hatch-vcs
Jul 15, 2026
Merged

chore: migrate bump2version to hatch-vcs#130
chrisdicaprio merged 1 commit into
mainfrom
chore/hatch-vcs

Conversation

@chrisdicaprio

@chrisdicaprio chrisdicaprio commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace bump2version with hatch-vcs so the package version is derived from git tags at build time instead of being manually bumped in two files.
  • pyproject.toml: version is now dynamic = ["version"], hatch-vcs added to build requires, [tool.hatch.version] / [tool.hatch.build.hooks.vcs] configured to write solvis/_version.py, bump2version dropped from dev deps.
  • solvis/__init__.py now imports __version__ from the generated _version.py.
  • Removed .bumpversion.cfg; .gitignore excludes the generated solvis/_version.py.
  • uv.lock regenerated.

Test plan

  • uv sync --all-extras --all-groups derives version 1.3.4.dev0+g658b5bedd.d20260715 from the v1.3.3 tag
  • uv run python -c "import solvis; print(solvis.__version__)" prints the tag-derived version
  • git check-ignore solvis/_version.py succeeds
  • uv run pytest -q — 302 passed, 26 skipped
  • uv build produces correctly-versioned wheel/sdist

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.31%. Comparing base (c520c39) to head (c086267).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #130   +/-   ##
=======================================
  Coverage   99.31%   99.31%           
=======================================
  Files          24       24           
  Lines        1318     1318           
  Branches       77       77           
=======================================
  Hits         1309     1309           
  Misses          8        8           
  Partials        1        1           
Flag Coverage Δ
unittests 99.31% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisdicaprio
chrisdicaprio merged commit 9a83638 into main Jul 15, 2026
11 checks passed
@chrisdicaprio
chrisdicaprio deleted the chore/hatch-vcs branch July 15, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant