Skip to content

Conversation

@johnnygreco
Copy link
Contributor

📋 Summary

Switches version management from hatch-vcs to uv-dynamic-versioning to 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

  • data-designer-config: Migrated from hatch-vcs to uv-dynamic-versioning
  • data-designer-engine: Added dynamic dependencies with data-designer-config=={{ version }}
  • data-designer: Added dynamic dependencies with data-designer-config=={{ version }} and data-designer-engine=={{ version }}
  • Removed auto-generated _version.py files in favor of importlib.metadata approach

📚 Docs

  • Updated VERSIONING.md to reflect the new versioning approach and standard importlib.metadata access pattern

🔍 Attention Areas

⚠️ Reviewers: Please pay special attention to the following:


🤖 Generated with AI

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
@johnnygreco johnnygreco requested a review from a team as a code owner February 2, 2026 22:25
@greptile-apps
Copy link

greptile-apps bot commented Feb 2, 2026

Greptile Overview

Greptile Summary

Migrates version management from hatch-vcs to uv-dynamic-versioning to enable dynamic inter-package dependency pinning using the {{ version }} template syntax.

Key Changes:

  • Updated all three packages (data-designer-config, data-designer-engine, data-designer) to use uv-dynamic-versioning>=0.7.0
  • Added [tool.hatch.metadata.hooks.uv-dynamic-versioning] sections to data-designer-engine and data-designer packages with {{ version }} template syntax for internal dependencies
  • Removed [tool.hatch.build.hooks.vcs] configuration and auto-generated _version.py files
  • Updated VERSIONING.md to document the new approach and recommend importlib.metadata.version() for version access

How it works:
When packages are published, the {{ version }} template in dependencies like data-designer-config=={{ version }} gets replaced with the actual version tag (e.g., data-designer-config==0.1.0), ensuring all internal packages are pinned to the same release version.

Testing:
According to the PR description, the publishing workflow was successfully tested with TestPyPI.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The migration from hatch-vcs to uv-dynamic-versioning is implemented correctly across all packages. The configuration follows proper patterns, the documentation is updated appropriately, and the PR author has already tested the publishing workflow with TestPyPI. The changes are isolated to versioning configuration with no code logic modifications.
  • No files require special attention

Important Files Changed

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
Loading

Copy link

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

@johnnygreco johnnygreco changed the title feat: switch from hatch-vcs to uv-dynamic-versioning for inter-package dependency pinning feat: switch from hatch-vcs to uv-dynamic-versioning Feb 2, 2026
Copy link

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

@johnnygreco johnnygreco merged commit a578265 into main Feb 3, 2026
46 checks passed
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.

2 participants