Skip to content

[FEATURE] Branching strategy Phase 2.A - version computing & baselining#534

Open
John McCall (lowlydba) wants to merge 2 commits into
mainfrom
508-devops-branching-strategy---phase-2a---internal-versions
Open

[FEATURE] Branching strategy Phase 2.A - version computing & baselining#534
John McCall (lowlydba) wants to merge 2 commits into
mainfrom
508-devops-branching-strategy---phase-2a---internal-versions

Conversation

@lowlydba
Copy link
Copy Markdown
Contributor

@lowlydba John McCall (lowlydba) commented May 21, 2026

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-version action — computes PEP 440 versions for vnext (dev builds), main (patch increment), and main-bump (reset) contexts
  • code-artifact action — replaces the old shell script for AWS CodeArtifact auth; all callers migrated
  • compute-versions-dry-run workflow — logs computed versions to job summary for visibility until Phase 3 lands
  • Package baselines — all 12 packages pinned with static versions in pyproject.toml (overture-schema at 1.17.1, others at 0.1.1)
  • Workflow cleanup — removed __about__.py path triggers, deleted legacy code-artifact.sh
  • Line ending normalization.gitattributes enforcing LF, 19 legacy CRLF files fixed

Why remove hatch dynamic versions?

Previously, each package used dynamic = ["version"] with [tool.hatch.version] pointing at an __about__.py file 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 in pyproject.toml (bumped intentionally by humans), while <patch> is computed at build time by CI based on what's already published. __about__.py now 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

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

🗺️ Schema reference docs preview is live!

🌍 Preview https://staging.overturemaps.org/schema/pr/534/schema/index.html
🕐 Updated May 21, 2026 17:04 UTC
📝 Commit 720291d
🔧 env SCHEMA_PREVIEW true

Note

♻️ This preview updates automatically with each push to this PR.

@lowlydba John McCall (lowlydba) force-pushed the 508-devops-branching-strategy---phase-2a---internal-versions branch from 93c890b to 3910756 Compare May 21, 2026 16:37
@lowlydba John McCall (lowlydba) force-pushed the 508-devops-branching-strategy---phase-2a---internal-versions branch from 3910756 to 393040a Compare May 21, 2026 16:44
@lowlydba John McCall (lowlydba) force-pushed the 508-devops-branching-strategy---phase-2a---internal-versions branch 2 times, most recently from 7318477 to e1abdfe Compare May 21, 2026 16:49
@lowlydba John McCall (lowlydba) force-pushed the 508-devops-branching-strategy---phase-2a---internal-versions branch from e1abdfe to d33ed40 Compare May 21, 2026 16:52
@lowlydba John McCall (lowlydba) marked this pull request as ready for review May 21, 2026 16:55
@lowlydba John McCall (lowlydba) requested a review from a team as a code owner May 21, 2026 16:55
Copilot AI review requested due to automatic review settings May 21, 2026 16:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml and updated __about__.py modules 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.sh script.
  • 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.

Comment thread packages/overture-schema/pyproject.toml
Comment thread .github/actions/compute-version/action.yml Outdated
Comment thread .github/workflows/compute-versions-dry-run.yaml Outdated
Comment thread gers/examples/python/match_classes.py
Comment thread gers/examples/python/match_classes.py
Comment thread gers/examples/python/utils.py
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Devops] Branching Strategy - Phase 2.A - Internal versions

2 participants