Update Project Version
Companion Guidance
Use karpathy-guidelines alongside this skill for implementation or review
work. Keep changes scoped, surface assumptions, and define focused validation
before editing.
Use this skill when changing the NeMo Fabric version, including
pre-release or build-metadata variants used during packaging.
Source Of Truth
Cargo.toml [workspace.package].version is the source of truth for the Rust
workspace and the release version stamped into Python and TypeScript package
metadata.
- Keep
Cargo.toml [workspace.dependencies] self-references aligned when the
workspace version changes.
sdk/python/nemo-fabric-runtime/pyproject.toml is the exception among the
Python projects: do not add a literal project.version. Keep
project.dynamic = ["version"] because Maturin derives
nemo-fabric-runtime's version from
crates/fabric-python/Cargo.toml, which inherits the workspace version.
- The setuptools projects do not derive their versions from Cargo. Update the
literal
project.version in every one of these files:
sdk/python/nemo-fabric/pyproject.toml
adapter-contract/python/pyproject.toml
adapters/python/*/pyproject.toml
- Keep internal Python package requirement pins aligned with the Python release
version:
- The unconditional
nemo-fabric-runtime == <version> dependency in the
published sdk/python/nemo-fabric/pyproject.toml.
- All
nemo-fabric-* == <version> requirements in its optional dependencies.
- Each adapter's
nemo-fabric-adapters-common == <version> dependency.
- Keep
adapter-contract/typescript/package.json and the root package entries in
its package-lock.json aligned with the Cargo SemVer release version.
For a normal release, use the same X.Y.Z string everywhere. For a prerelease
or build-metadata version, use valid Cargo SemVer in Cargo.toml and the
equivalent PEP 440 version in explicit Python metadata. Confirm that the
Maturin-built runtime and setuptools-built packages resolve to equivalent
versions rather than blindly copying incompatible syntax.
Workflow
- Read the current version from
Cargo.toml and decide the exact Cargo,
Python, and TypeScript target version strings.
- Run
just set-version <cargo-version>. The recipe preserves the normalized
SemVer for Cargo and TypeScript, converts it to PEP 440 for Python, and
updates:
Cargo.toml [workspace.package].version
Cargo.toml workspace.dependencies.nemo-fabric-core.version
- The setuptools
project.version in the published SDK metapackage,
Python adapter contract, and every adapter pyproject.toml
- Every internal
nemo-fabric-* exact-version requirement
- The TypeScript adapter-contract
package.json and package-lock.json
Cargo.lock through Cargo metadata resolution
- The root, runtime, and adapter
uv.lock files through just lock-python
- Confirm that
sdk/python/nemo-fabric-runtime/pyproject.toml remains dynamic
and unchanged.
- Audit references to the old version with targeted searches. Distinguish
package-version surfaces from examples and unrelated dependency versions.
If editing the helper code, keep these contracts aligned:
set_project_version must call the Cargo, Python, and TypeScript project
version helpers.
set_cargo_workspace_version must update the workspace version and the
nemo-fabric-core workspace dependency, then verify every nemo-fabric-* workspace
package through Cargo metadata.
set_python_project_versions must update the published SDK metapackage,
Python adapter contract, every adapter pyproject.toml discovered under
adapters/python/, and all internal exact-version pins while
rejecting a static version in
sdk/python/nemo-fabric-runtime/pyproject.toml.
set_typescript_project_version must update the package manifest and both
root version entries in the npm lockfile without changing dependency versions.
- The
set-version recipe must run just lock-python after source metadata is
updated.
Validation
- Inspect Cargo version fields:
rg -n '^version =|nemo-fabric-core = \{ path = .*version =' Cargo.toml
- Inspect explicit Python versions and internal pins:
rg -n '^version =|nemo-fabric-[a-z-]+(?:\[[^]]+\])? == ' pyproject.toml sdk adapter-contract/python adapters/python --glob 'pyproject.toml'
- Confirm the runtime remains dynamic:
rg -n 'dynamic = \["version"\]' sdk/python/nemo-fabric-runtime/pyproject.toml
- Inspect the TypeScript package and lockfile root versions:
rg -n '"version":' adapter-contract/typescript/package{,-lock}.json
- Run
cargo check --workspace --locked.
- Run
just build-python to verify all Python package metadata resolves.
- Run
just test-python when the integration version or Python packaging
behavior changes materially.
- Run
just wheels for release-facing validation of every Python wheel.
- Run
just pack-typescript to verify the stamped TypeScript package metadata.
- Run
git diff --check.
Avoid
- Updating only
Cargo.toml and leaving the setuptools packages stale.
- Adding a literal version to
sdk/python/nemo-fabric-runtime/pyproject.toml;
Maturin owns that version.
- Updating Python package versions without their exact internal dependency pins.
- Forgetting
Cargo.lock, the root uv.lock, or per-project uv.lock files.
- Updating the TypeScript package manifest without its npm lockfile root entry.
- Blind repository-wide replacement of version-like strings.
References
Cargo.toml
Cargo.lock
pyproject.toml
uv.lock
sdk/python/nemo-fabric/pyproject.toml
sdk/python/nemo-fabric/uv.lock
sdk/python/nemo-fabric-runtime/pyproject.toml
sdk/python/nemo-fabric-runtime/uv.lock
adapter-contract/python/pyproject.toml
adapter-contract/python/uv.lock
adapters/python/*/pyproject.toml
adapters/python/*/uv.lock
adapter-contract/typescript/package.json
adapter-contract/typescript/package-lock.json
justfile
1---2name: update-project-version3description: Update the NVIDIA NeMo Fabric release version across Cargo, Python, and TypeScript package metadata, internal Python dependency pins, integration metadata, and lockfiles. Use when bumping, synchronizing, or auditing NeMo Fabric package versions for a release.4license: Apache-2.05---678# Update Project Version910## Companion Guidance1112Use `karpathy-guidelines` alongside this skill for implementation or review13work. Keep changes scoped, surface assumptions, and define focused validation14before editing.1516Use this skill when changing the NeMo Fabric version, including17pre-release or build-metadata variants used during packaging.1819## Source Of Truth2021- `Cargo.toml` `[workspace.package].version` is the source of truth for the Rust22 workspace and the release version stamped into Python and TypeScript package23 metadata.24- Keep `Cargo.toml` `[workspace.dependencies]` self-references aligned when the25 workspace version changes.26- `sdk/python/nemo-fabric-runtime/pyproject.toml` is the exception among the27 Python projects: do not add a literal `project.version`. Keep28 `project.dynamic = ["version"]` because Maturin derives29 `nemo-fabric-runtime`'s version from30 `crates/fabric-python/Cargo.toml`, which inherits the workspace version.31- The setuptools projects do not derive their versions from Cargo. Update the32 literal `project.version` in every one of these files:33 - `sdk/python/nemo-fabric/pyproject.toml`34 - `adapter-contract/python/pyproject.toml`35 - `adapters/python/*/pyproject.toml`36- Keep internal Python package requirement pins aligned with the Python release37 version:38 - The unconditional `nemo-fabric-runtime == <version>` dependency in the39 published `sdk/python/nemo-fabric/pyproject.toml`.40 - All `nemo-fabric-* == <version>` requirements in its optional dependencies.41 - Each adapter's `nemo-fabric-adapters-common == <version>` dependency.42- Keep `adapter-contract/typescript/package.json` and the root package entries in43 its `package-lock.json` aligned with the Cargo SemVer release version.4445For a normal release, use the same `X.Y.Z` string everywhere. For a prerelease46or build-metadata version, use valid Cargo SemVer in `Cargo.toml` and the47equivalent PEP 440 version in explicit Python metadata. Confirm that the48Maturin-built runtime and setuptools-built packages resolve to equivalent49versions rather than blindly copying incompatible syntax.5051## Workflow52531. Read the current version from `Cargo.toml` and decide the exact Cargo,54 Python, and TypeScript target version strings.552. Run `just set-version <cargo-version>`. The recipe preserves the normalized56 SemVer for Cargo and TypeScript, converts it to PEP 440 for Python, and57 updates:58 - `Cargo.toml` `[workspace.package].version`59 - `Cargo.toml` `workspace.dependencies.nemo-fabric-core.version`60 - The setuptools `project.version` in the published SDK metapackage,61 Python adapter contract, and every adapter `pyproject.toml`62 - Every internal `nemo-fabric-*` exact-version requirement63 - The TypeScript adapter-contract `package.json` and `package-lock.json`64 - `Cargo.lock` through Cargo metadata resolution65 - The root, runtime, and adapter `uv.lock` files through `just lock-python`663. Confirm that `sdk/python/nemo-fabric-runtime/pyproject.toml` remains dynamic67 and unchanged.684. Audit references to the old version with targeted searches. Distinguish69 package-version surfaces from examples and unrelated dependency versions.7071If editing the helper code, keep these contracts aligned:7273- `set_project_version` must call the Cargo, Python, and TypeScript project74 version helpers.75- `set_cargo_workspace_version` must update the workspace version and the76 `nemo-fabric-core` workspace dependency, then verify every `nemo-fabric-*` workspace77 package through Cargo metadata.78- `set_python_project_versions` must update the published SDK metapackage,79 Python adapter contract, every adapter `pyproject.toml` discovered under80 `adapters/python/`, and all internal exact-version pins while81 rejecting a static version in82 `sdk/python/nemo-fabric-runtime/pyproject.toml`.83- `set_typescript_project_version` must update the package manifest and both84 root version entries in the npm lockfile without changing dependency versions.85- The `set-version` recipe must run `just lock-python` after source metadata is86 updated.8788## Validation8990- Inspect Cargo version fields:91 `rg -n '^version =|nemo-fabric-core = \{ path = .*version =' Cargo.toml`92- Inspect explicit Python versions and internal pins:93 `rg -n '^version =|nemo-fabric-[a-z-]+(?:\[[^]]+\])? == ' pyproject.toml sdk adapter-contract/python adapters/python --glob 'pyproject.toml'`94- Confirm the runtime remains dynamic:95 `rg -n 'dynamic = \["version"\]' sdk/python/nemo-fabric-runtime/pyproject.toml`96- Inspect the TypeScript package and lockfile root versions:97 `rg -n '"version":' adapter-contract/typescript/package{,-lock}.json`98- Run `cargo check --workspace --locked`.99- Run `just build-python` to verify all Python package metadata resolves.100- Run `just test-python` when the integration version or Python packaging101 behavior changes materially.102- Run `just wheels` for release-facing validation of every Python wheel.103- Run `just pack-typescript` to verify the stamped TypeScript package metadata.104- Run `git diff --check`.105106## Avoid107108- Updating only `Cargo.toml` and leaving the setuptools packages stale.109- Adding a literal version to `sdk/python/nemo-fabric-runtime/pyproject.toml`;110 Maturin owns that version.111- Updating Python package versions without their exact internal dependency pins.112- Forgetting `Cargo.lock`, the root `uv.lock`, or per-project `uv.lock` files.113- Updating the TypeScript package manifest without its npm lockfile root entry.114- Blind repository-wide replacement of version-like strings.115116## References117118- `Cargo.toml`119- `Cargo.lock`120- `pyproject.toml`121- `uv.lock`122- `sdk/python/nemo-fabric/pyproject.toml`123- `sdk/python/nemo-fabric/uv.lock`124- `sdk/python/nemo-fabric-runtime/pyproject.toml`125- `sdk/python/nemo-fabric-runtime/uv.lock`126- `adapter-contract/python/pyproject.toml`127- `adapter-contract/python/uv.lock`128- `adapters/python/*/pyproject.toml`129- `adapters/python/*/uv.lock`130- `adapter-contract/typescript/package.json`131- `adapter-contract/typescript/package-lock.json`132- `justfile`