ci: version-sync guard (package.json / pyproject / __init__) — Closes #102 - #570
Merged
Merged
Conversation
Closes #102. - scripts/check-version-sync.py (preferred) aligns npm, PyPI, and __version__ - CI workflow version-sync.yml runs on PR/push to main - publish-pypi.yml runs the same guard before tag verification - __version__ prefers importlib.metadata with static fallback for source trees - RELEASE/CONTRIBUTING docs: single-commit triple-file bump checklist - unit tests for align/mismatch paths; deliberate mismatch exits 1
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.
Summary
Closes #102. Adds a Python version-sync guard and wires it into CI so a partial SemVer bump cannot merge or publish.
Changes
scripts/check-version-sync.py(preferred) — comparespackage.json,pyproject.toml, andsimplicio_mapper/__init__.py; exit 1 on mismatch.github/workflows/version-sync.yml— runs on PR/push tomainpublish-pypi.yml— same guard before tag/version verification__init__.py—importlib.metadata.version("simplicio-mapper")with static fallback string (still the SoT for the file guard).specs/workflow/RELEASE.mdtriple-file bump checklist; CONTRIBUTING/AGENTS/CLAUDE/scripts READMEtests/python/test_check_version_sync.py(align + deliberate mismatch)Legacy
scripts/check-version-sync.jskept as a twin with the same contract.Verification (MEASURED)
Acceptance criteria
__version__stays aligned with both manifests (importlib optional override at runtime)