[FEATURE] Branching strategy Phase 2.A - version computing & baselining#534
Open
John McCall (lowlydba) wants to merge 2 commits into
Open
Conversation
Enforce LF storage in the repository via .gitattributes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
🗺️ Schema reference docs preview is live!
Note ♻️ This preview updates automatically with each push to this PR. |
93c890b to
3910756
Compare
3910756 to
393040a
Compare
7318477 to
e1abdfe
Compare
e1abdfe to
d33ed40
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Phase 2.A of the branching strategy: move Python packages to static baseline versions in pyproject.toml, introduce reusable CI building blocks for CodeArtifact auth and version computation, and add a dry-run workflow to surface what versions would be published on main / vnext.
Changes:
- Baselined package versions in
pyproject.tomland updated__about__.pymodules to read runtime version from installed package metadata. - Added composite actions for CodeArtifact credentials and branch-context-aware version computation, and migrated workflows off the legacy
code-artifact.shscript. - Added a “compute versions (dry run)” workflow plus line-ending normalization via
.gitattributes.
Reviewed changes
Copilot reviewed 34 out of 50 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates lock metadata and adds editable package version fields. |
| reference/counterexamples/transportation/segment/road/bad-road-destinations.yaml | Line ending/format normalization. |
| reference/counterexamples/divisions/division_area/bad-missing-is-land.yaml | Line ending/format normalization. |
| packages/overture-schema/src/overture/schema/about.py | Switches to runtime metadata-based version lookup. |
| packages/overture-schema/pyproject.toml | Replaces dynamic Hatch versioning with a static baseline version. |
| packages/overture-schema-transportation-theme/src/overture/schema/transportation/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-transportation-theme/pyproject.toml | Static baseline version. |
| packages/overture-schema-system/src/overture/schema/system/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-system/pyproject.toml | Static baseline version. |
| packages/overture-schema-places-theme/src/overture/schema/places/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-places-theme/pyproject.toml | Static baseline version. |
| packages/overture-schema-divisions-theme/src/overture/schema/divisions/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-divisions-theme/pyproject.toml | Static baseline version. |
| packages/overture-schema-common/src/overture/schema/common/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-common/pyproject.toml | Static baseline version. |
| packages/overture-schema-codegen/src/overture/schema/codegen/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-codegen/pyproject.toml | Static baseline version. |
| packages/overture-schema-cli/src/overture/schema/cli/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-cli/pyproject.toml | Static baseline version. |
| packages/overture-schema-buildings-theme/src/overture/schema/buildings/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-buildings-theme/pyproject.toml | Static baseline version. |
| packages/overture-schema-base-theme/src/overture/schema/base/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-base-theme/pyproject.toml | Static baseline version. |
| packages/overture-schema-annex/src/overture/schema/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-annex/pyproject.toml | Static baseline version. |
| packages/overture-schema-addresses-theme/src/overture/schema/addresses/about.py | Runtime metadata-based version lookup. |
| packages/overture-schema-addresses-theme/pyproject.toml | Static baseline version. |
| gers/examples/python/utils.py | Line ending normalization; no functional intent changes. |
| gers/examples/python/tests/utils_test.py | Line ending normalization. |
| gers/examples/python/tests/test_setup.py | Line ending normalization. |
| gers/examples/python/tests/match_traces_test.py | Line ending normalization. |
| gers/examples/python/route_utils.py | Line ending normalization. |
| gers/examples/python/README.md | Line ending normalization. |
| gers/examples/python/match_traces.py | Line ending normalization. |
| gers/examples/python/MATCH_TRACES.md | Line ending normalization. |
| gers/examples/python/match_classes.py | Line ending normalization. |
| gers/examples/python/constants.py | Line ending normalization. |
| gers/examples/python/init.py | Line ending normalization. |
| counterexamples/transportation/segment/road/bad-road-destinations.yaml | Line ending/format normalization. |
| counterexamples/divisions/division_area/bad-missing-is-land.yaml | Line ending/format normalization. |
| CONTRIBUTING.md | Documents Phase 2.A and the dry-run workflow. |
| .github/workflows/scripts/package-versions.py | Filters package discovery to dirs with pyproject.toml. |
| .github/workflows/scripts/code-artifact.sh | Removes legacy CodeArtifact helper script. |
| .github/workflows/reusable-check-python-package-versions.yaml | Migrates CodeArtifact auth to composite action. |
| .github/workflows/publish-python-packages.yaml | Migrates CodeArtifact auth to composite action and updates triggers. |
| .github/workflows/compute-versions-dry-run.yaml | Adds workflow to compute/log versions per context without publishing. |
| .github/workflows/check-python-package-versions.yaml | Updates triggers (removes __about__.py path trigger). |
| .github/actions/compute-version/action.yml | New composite action for context-aware version calculation. |
| .github/actions/code-artifact/action.yml | New composite action to produce CodeArtifact token + index/publish URLs. |
| .gitattributes | Enforces LF normalization and declares common binary patterns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Introduce reusable GitHub Actions for CodeArtifact credentials and version computation. Baseline all packages to static versions (overture-schema at 1.17.0, others at 0.1.0). Add dry-run workflow for version visibility. Migrate callers off legacy code-artifact.sh. Closes #508 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
d33ed40 to
720291d
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.
Description
Phase 2.A of the branching strategy: establish version baselines and build the CI infrastructure that future publish workflows (Phases 2.B & 3) will consume.
Changes
compute-versionaction — computes PEP 440 versions for vnext (dev builds), main (patch increment), and main-bump (reset) contextscode-artifactaction — replaces the old shell script for AWS CodeArtifact auth; all callers migratedcompute-versions-dry-runworkflow — logs computed versions to job summary for visibility until Phase 3 landspyproject.toml(overture-schemaat1.17.1, others at0.1.1)__about__.pypath triggers, deleted legacycode-artifact.sh.gitattributesenforcing LF, 19 legacy CRLF files fixedWhy remove hatch dynamic versions?
Previously, each package used
dynamic = ["version"]with[tool.hatch.version]pointing at an__about__.pyfile containing a hardcoded string. This meant version bumps required editing source files and committing them — tightly coupling human commits to version identity. The new model separates concerns:<major>.<minor>lives inpyproject.toml(bumped intentionally by humans), while<patch>is computed at build time by CI based on what's already published.__about__.pynow reads from installed package metadata at runtime, so it always reflects whatever version was actually stamped during build — no manual sync needed.Reference
Testing
Ensure existing CI tests work - otherwise, no functional changes expected.
Checklist
N/A
Documentation website
N/A