chore: derive package version from git tags via hatch-vcs

Replaces the static project.version string with dynamic = ["version"],
sourced from the nearest git tag (hatch-vcs). Fixes docs.yml, which read
pyproject.toml's version field directly and would have broken once that
field stopped being a plain string; it now reads the resolved version via
importlib.metadata after `uv sync` installs the package.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
James Veitch
2026-07-04 13:51:55 +01:00
co-authored by Claude Sonnet 5
parent 4f69405af6
commit 335ff5e31a
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -29,5 +29,5 @@ jobs:
- name: Deploy docs with mike
run: |
VERSION=$(uv run python -c "import tomllib; d=tomllib.load(open('pyproject.toml','rb')); print(d['project']['version'])")
VERSION=$(uv run python -c "from importlib.metadata import version; print(version('comfydv'))")
uv run mike deploy --push --update-aliases "$VERSION" stable
+5 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "comfydv"
version = "0.1.0"
dynamic = ["version"]
requires-python = ">=3.11"
description = "Quality of life ComfyUI nodes: dynamic string formatting, seed-controlled random selection, and conditional queue interruption."
readme = "README.md"
@@ -17,9 +17,12 @@ Repository = "https://github.com/darth-veitcher/comfydv"
Documentation = "https://darth-veitcher.github.io/comfydv/stable/"
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[dependency-groups]
dev = [
"playwright>=1.60.0",
Generated
-1
View File
@@ -241,7 +241,6 @@ wheels = [
[[package]]
name = "comfydv"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },