A dynamic version source plugin for uv workspaces.
Project description
uv-workspace-dynamic-versioning
A powerful Hatch plugin for dynamic versioning and dependency injection in uv workspaces.
📖 Context & Origin
This project was created to address a specific limitation in the existing uv-dynamic-versioning plugin when used within complex monorepos and uv workspaces.
As discussed in ninoseki/uv-dynamic-versioning#81, the standard implementation often calculates version distance and commit hashes based on the entire repository history. In a workspace with multiple packages, this leads to:
- False Positives: Packages bumping versions when unrelated code in the workspace changes.
- Inaccurate Metadata: Commit hashes reflecting global repo state rather than the state of the specific package.
uv-workspace-dynamic-versioning introduces Directory-Specific Patching. It re-calculates the Git distance and commit hash by filtering the history to the specific package subdirectory, ensuring that versions only reflect changes relevant to that package.
🚀 Key Features
- VCS-Powered Versioning: Automatically derive versions from Git, Mercurial, and more via Dunamai.
- Workspace Aware: Accurate
distanceandcommithash calculation restricted to the project subdirectory. - Dynamic Dependencies: Inject versions into
dependenciesusing Jinja2 templates (e.g.,pkg == {{ version.base }}). - Secure by Design: Sandboxed Jinja2 environment and Path Traversal protection.
- Highly Configurable: Custom formats, bumping logic, and fallback versions.
🛠 Quick Start
1. Installation
Add the plugin to your build-system.requires in pyproject.toml:
[build-system]
requires = ["hatchling", "uv-workspace-dynamic-versioning"]
build-backend = "hatchling.build"
2. Basic Configuration
Enable the version source and mark the version as dynamic:
[project]
name = "my-awesome-package"
dynamic = ["version"]
[tool.hatch.version]
source = "uv-workspace-dynamic-versioning"
📚 Documentation
For full guides and API reference, visit our Documentation Site.
⚖️ License
Distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uv_workspace_dynamic_versioning-0.1.5.tar.gz.
File metadata
- Download URL: uv_workspace_dynamic_versioning-0.1.5.tar.gz
- Upload date:
- Size: 108.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd263f17c2488393e9f51840cdddd7f66aa1592eea3cdaf235327a88f768a185
|
|
| MD5 |
454c14d490160213e140c91cf43423c2
|
|
| BLAKE2b-256 |
717739e847f98ef13a499a0c3fd5f68cf0ad79dc772548b927eadb4ec3727dbb
|
Provenance
The following attestation bundles were made for uv_workspace_dynamic_versioning-0.1.5.tar.gz:
Publisher:
ci.yml on indiVar0508/uv-workspace-dynamic-versioning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_workspace_dynamic_versioning-0.1.5.tar.gz -
Subject digest:
fd263f17c2488393e9f51840cdddd7f66aa1592eea3cdaf235327a88f768a185 - Sigstore transparency entry: 1243759927
- Sigstore integration time:
-
Permalink:
indiVar0508/uv-workspace-dynamic-versioning@de3af46c1ca8267fff0e0ed2e069f3e3e5adab57 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/indiVar0508
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@de3af46c1ca8267fff0e0ed2e069f3e3e5adab57 -
Trigger Event:
push
-
Statement type:
File details
Details for the file uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl.
File metadata
- Download URL: uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2c37691b6ac1b81f69d2bf2598346a3429afecb56761b5dbd5e6f9d0bc62d98
|
|
| MD5 |
a064983a493063bda1bba392ff9cb649
|
|
| BLAKE2b-256 |
a6ec5f9f19595a474ce534f5850bb3df16e8aac4d0fc2416a663d398c2662d1b
|
Provenance
The following attestation bundles were made for uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl:
Publisher:
ci.yml on indiVar0508/uv-workspace-dynamic-versioning
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_workspace_dynamic_versioning-0.1.5-py3-none-any.whl -
Subject digest:
b2c37691b6ac1b81f69d2bf2598346a3429afecb56761b5dbd5e6f9d0bc62d98 - Sigstore transparency entry: 1243759933
- Sigstore integration time:
-
Permalink:
indiVar0508/uv-workspace-dynamic-versioning@de3af46c1ca8267fff0e0ed2e069f3e3e5adab57 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/indiVar0508
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@de3af46c1ca8267fff0e0ed2e069f3e3e5adab57 -
Trigger Event:
push
-
Statement type: