Draft
Conversation
Remove hardcoded version strings from all Python pyproject.toml files.
Version is now read at build time from the single source of truth:
- python/bindings (maturin): dynamic = ["version"], maturin reads from Cargo.toml
- python/tensogram-{xarray,zarr,anemoi} (hatchling): [tool.hatch.version] env source
- examples/jupyter (hatchling): same env source; add minimal package dir for hatchling
Makefile python-build:
- Pass VERSION=$(cat VERSION) to all uv pip install steps
- Add install steps for tensogram-anemoi and examples/jupyter (previously missing)
- Switch maturin invocation from 'uv run --with maturin maturin' to 'uvx maturin'
to avoid uv's cross-Python lockfile resolution failing on the zarr/Python<3.11
incompatibility in the optional extras
AGENTS.md: remove pyproject.toml from the release checklist — Python packages
no longer require a manual version bump.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hatchling's env source has no built-in fallback. Switch all four hatchling
packages to source = "code" pointing at a small _version.py that reads the
VERSION env var with a safe default:
__version__ = os.environ.get("VERSION", "0.0.0.dev1")
This means plain 'pip install -e .' works out of the box for developers who
haven't set VERSION, while the Makefile's 'VERSION=$(cat VERSION) uv pip
install' still stamps the correct release version.
Packages updated: tensogram-xarray, tensogram-zarr, tensogram-anemoi,
tensogram-jupyter-examples.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9cc3b08 to
10f393f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the VERSION management easier for python:
Consequences:
Docs Preview
https://sites.ecmwf.int/docs/tensogram/pull-requests/PR-71