-
Notifications
You must be signed in to change notification settings - Fork 57
feat: switch from hatch-vcs to uv-dynamic-versioning #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Switch from hatch-vcs to uv-dynamic-versioning to enable Jinja2
templating in dependencies. This ensures all three subpackages
(data-designer, data-designer-config, data-designer-engine) are
locked to the same version when published to PyPI.
- Use `{{ version }}` template for sibling package dependencies
- Update VERSIONING.md to document importlib.metadata approach
- Remove unused _version.py file generation
Greptile OverviewGreptile SummaryMigrates version management from Key Changes:
How it works: Testing:
|
| Filename | Overview |
|---|---|
| VERSIONING.md | Updated documentation to reflect migration from hatch-vcs to uv-dynamic-versioning with correct importlib.metadata usage pattern |
| packages/data-designer-config/pyproject.toml | Migrated build system from hatch-vcs to uv-dynamic-versioning, removed auto-generated _version.py configuration |
| packages/data-designer-engine/pyproject.toml | Migrated to uv-dynamic-versioning and added dynamic {{ version }} pinning for data-designer-config dependency |
| packages/data-designer/pyproject.toml | Migrated to uv-dynamic-versioning and added dynamic {{ version }} pinning for both internal package dependencies |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant Git as Git Repository
participant UV as uv build/publish
participant Hook as uv-dynamic-versioning Hook
participant PyPI as PyPI Registry
Dev->>Git: git tag v0.1.0
Dev->>Git: git push origin v0.1.0
Dev->>UV: uv build
UV->>Hook: Request version from hook
Hook->>Git: Read latest git tag
Git-->>Hook: v0.1.0
Hook->>Hook: Replace {{ version }} templates<br/>in dependencies section
Note over Hook: data-designer-config=={{ version }}<br/>→ data-designer-config==0.1.0
Hook-->>UV: Return version=0.1.0<br/>with resolved dependencies
UV->>UV: Build packages with<br/>pinned internal deps
UV-->>Dev: Build artifacts created<br/>(data-designer-0.1.0.tar.gz, etc.)
Dev->>UV: uv publish
UV->>PyPI: Upload packages with<br/>version-locked dependencies
PyPI-->>UV: Published successfully
UV-->>Dev: All packages published
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
📋 Summary
Switches version management from
hatch-vcstouv-dynamic-versioningto enable dynamic inter-package dependency pinning using the{{ version }}template syntax. This ensures that when packages are published, internal dependencies (e.g.,data-designer-config,data-designer-engine) are automatically pinned to the same version.Verified: Publishing workflow tested successfully with TestPyPI.
🔄 Changes
🔧 Changed
hatch-vcstouv-dynamic-versioningdata-designer-config=={{ version }}data-designer-config=={{ version }}anddata-designer-engine=={{ version }}_version.pyfiles in favor ofimportlib.metadataapproach📚 Docs
VERSIONING.mdto reflect the new versioning approach and standardimportlib.metadataaccess pattern🔍 Attention Areas
packages/data-designer-engine/pyproject.toml- Dependencies moved under[tool.hatch.metadata.hooks.uv-dynamic-versioning]with dynamic{{ version }}pinningpackages/data-designer/pyproject.toml- Same pattern applied to top-level package🤖 Generated with AI