Centralized monorepo version-sync tool driven by versions.yaml.
Project description
scitrera-repo-tools
Centralized monorepo version-sync tool driven by versions.yaml.
Install
pip install scitrera-repo-tools
# or, from source:
pip install -e .
Usage
From any directory inside a monorepo containing a versions.yaml:
sync-versions # apply updates (preserves local refs)
sync-versions --check # dry-run, exit 1 on drift
sync-versions --verbose # show every file inspected
sync-versions --config path/to/versions.yaml
Release mode
By default, sync-versions preserves local-reference dep specifiers
(file:../foo, workspace:*, link:, git+..., PEP 508 pkg @ git+...)
so local development keeps working. Before publishing to PyPI/npm, opt in
to rewrite those into canonical version pins from versions.yaml:
sync-versions --release # rewrite local refs to version pins
sync-versions --release --check # preview the release-pass diff in CI
Typical pre-publish flow:
sync-versions --release
git diff # review the version-pin substitutions
# ... build + publish (npm publish / uv publish) ...
git checkout -- . # restore local refs for ongoing dev
versions.yaml schema
# Top-level project versions
my-python-pkg: 0.1.22
my-ts-pkg: 0.1.22
# External dep pins per language (optional)
preferred_versions:
python:
"pydantic": "2.13.4" # bare -> `==2.13.4`; literal w/ operator preserved
typescript:
"@modelcontextprotocol/sdk": "^1.26.0"
go:
"google.golang.org/grpc": "v1.65.0" # bare or `v`-prefixed both accepted
"google.golang.org/protobuf": "1.34.1"
# Per-project file rules (replaces the hardcoded PROJECT_RULES dict)
project_rules:
my-python-pkg:
- { type: pyproject, path: my-python-pkg/pyproject.toml }
- { type: init_py, path: my-python-pkg/src/my_pkg/__init__.py }
my-ts-pkg:
- { type: package, path: my-ts-pkg/package.json }
# Internal monorepo cross-reference sync (optional)
dependency_mappings:
python:
packages:
"my-internal-dir": "my-published-name"
dependencies:
my-consumer:
- "my-internal-dir"
# Lockfile fallback for nulls in preferred_versions (optional)
sources:
python:
- "uv.lock"
# Global Go toolchain directives (optional, no-inject)
# Walks every go.mod referenced in project_rules.gomod_require.
go_toolchain:
go: "1.25" # rewrites the `go X.Y` directive
toolchain: "1.25.10" # rewrites `toolchain goX.Y.Z` (Go 1.21+ feature)
Releases
Releases are automated via GitHub Actions on tag push (v*.*.*):
- CI runs the test suite on Python 3.11/3.12/3.13.
- A guard step asserts the tag matches
pyproject.toml's[project].version. python -m buildproduces an sdist + wheel.- The artifacts are published to PyPI via trusted publishing (OIDC; no API token).
- A GitHub Release is created with the artifacts attached.
License
BSD 3-Clause.
Project details
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 scitrera_repo_tools-0.1.7.tar.gz.
File metadata
- Download URL: scitrera_repo_tools-0.1.7.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae4842d3d4b02eb4f756430a307890501d7ab1abe4162f4000bbfedee6caa578
|
|
| MD5 |
939922be64a43760e44862451e7b6b39
|
|
| BLAKE2b-256 |
2ff6b4d99863c71faba19a461078b6329e42bce02a9f9f4c3fd726ecf1ae64a9
|
Provenance
The following attestation bundles were made for scitrera_repo_tools-0.1.7.tar.gz:
Publisher:
release.yml on scitrera/repo-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitrera_repo_tools-0.1.7.tar.gz -
Subject digest:
ae4842d3d4b02eb4f756430a307890501d7ab1abe4162f4000bbfedee6caa578 - Sigstore transparency entry: 1540519323
- Sigstore integration time:
-
Permalink:
scitrera/repo-tools@683cc834b9a9832bbfd684cbb5086a352c43d785 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/scitrera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@683cc834b9a9832bbfd684cbb5086a352c43d785 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scitrera_repo_tools-0.1.7-py3-none-any.whl.
File metadata
- Download URL: scitrera_repo_tools-0.1.7-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c421fe3db9e072afc861e9361a82b10d4d2b3f4d86b683f9c22076c1cf25fc53
|
|
| MD5 |
f1e247f4c0809541158348bfb591ae38
|
|
| BLAKE2b-256 |
aa3ad385adc6f4b1b9a3295273c02fde821e0dd82741b1909f8abdf16f937124
|
Provenance
The following attestation bundles were made for scitrera_repo_tools-0.1.7-py3-none-any.whl:
Publisher:
release.yml on scitrera/repo-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitrera_repo_tools-0.1.7-py3-none-any.whl -
Subject digest:
c421fe3db9e072afc861e9361a82b10d4d2b3f4d86b683f9c22076c1cf25fc53 - Sigstore transparency entry: 1540519454
- Sigstore integration time:
-
Permalink:
scitrera/repo-tools@683cc834b9a9832bbfd684cbb5086a352c43d785 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/scitrera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@683cc834b9a9832bbfd684cbb5086a352c43d785 -
Trigger Event:
push
-
Statement type: