diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..107c90ba4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,19 @@ +# Normalize all text files to LF in the repository. +# Contributors on Windows get CRLF in their working tree via core.autocrlf, +# but the repo itself always stores LF. +* text=auto eol=lf + +# Ensure these are always treated as text (LF in repo). +*.py text eol=lf +*.toml text eol=lf +*.yaml text eol=lf +*.yml text eol=lf +*.md text eol=lf +*.sh text eol=lf +*.json text eol=lf + +# Binary files — do not normalize. +*.png binary +*.jpg binary +*.gif binary +*.ico binary diff --git a/.github/actions/code-artifact/action.yml b/.github/actions/code-artifact/action.yml new file mode 100644 index 000000000..d64b607c9 --- /dev/null +++ b/.github/actions/code-artifact/action.yml @@ -0,0 +1,67 @@ +name: CodeArtifact credentials +description: > + Retrieves an authorization token and constructs index/publish URLs for AWS + CodeArtifact. Assumes AWS credentials are already configured in the job. + +inputs: + aws_account_id: + description: AWS account ID that owns the CodeArtifact domain. + required: false + default: "505071440022" + aws_region: + description: AWS region where the CodeArtifact repository is hosted. + required: false + default: us-west-2 + domain: + description: CodeArtifact domain name. + required: false + default: overture-pypi + repository: + description: CodeArtifact repository name. + required: false + default: overture + +outputs: + token: + description: CodeArtifact authorization token (masked in logs). + value: ${{ steps.creds.outputs.token }} + index_url: + description: > + Full index URL with embedded credentials, suitable for + `--index-url` / `--extra-index-url` in pip/uv. + value: ${{ steps.creds.outputs.index_url }} + publish_url: + description: > + Publish endpoint URL (no credentials embedded — pass token separately). + value: ${{ steps.creds.outputs.publish_url }} + +runs: + using: composite + steps: + - name: Get CodeArtifact credentials + id: creds + shell: bash + env: + AWS_ACCOUNT_ID: ${{ inputs.aws_account_id }} + AWS_REGION: ${{ inputs.aws_region }} + DOMAIN: ${{ inputs.domain }} + REPOSITORY: ${{ inputs.repository }} + run: | + set -euo pipefail + + token=$(aws codeartifact get-authorization-token \ + --region "$AWS_REGION" \ + --domain "$DOMAIN" \ + --domain-owner "$AWS_ACCOUNT_ID" \ + --query authorizationToken \ + --output text) + echo "::add-mask::${token}" + echo "token=${token}" >> "$GITHUB_OUTPUT" + + base_url="https://${DOMAIN}-${AWS_ACCOUNT_ID}.d.codeartifact.${AWS_REGION}.amazonaws.com/pypi/${REPOSITORY}" + + index_url="https://aws:${token}@${DOMAIN}-${AWS_ACCOUNT_ID}.d.codeartifact.${AWS_REGION}.amazonaws.com/pypi/${REPOSITORY}/simple/" + echo "::add-mask::${index_url}" + echo "index_url=${index_url}" >> "$GITHUB_OUTPUT" + + echo "publish_url=${base_url}" >> "$GITHUB_OUTPUT" diff --git a/.github/actions/compute-version/action.yml b/.github/actions/compute-version/action.yml new file mode 100644 index 000000000..8d639f42b --- /dev/null +++ b/.github/actions/compute-version/action.yml @@ -0,0 +1,114 @@ +name: Compute package version +description: > + Computes the version string for a package given branch context. + + Contexts: + - `vnext`: `+dev.` (PEP 440 local version). + Falls back to `..0+dev.` if never published. + Local versions are rejected by PyPI — only suitable for private indexes + like CodeArtifact. + - `main`: `..` — increments the highest + published patch for the same major.minor series. + - `main-bump`: `..0` — used when a major/minor bump commit + lands on main (patch resets to 0). + + Prerequisites: repo must be checked out and `uv` must be available. + +inputs: + package: + description: Distribution package name (e.g. overture-schema-common). + required: true + context: + description: > + Branch context controlling the version formula. + Supported values: `vnext`, `main`, `main-bump`. + required: true + index_url: + description: > + PyPI simple index URL with embedded credentials for querying + CodeArtifact. Obtain via the `.github/actions/code-artifact` action's + `index_url` output after configuring AWS credentials. + required: true + +outputs: + version: + description: Computed version string (PEP 440). + value: ${{ steps.compute.outputs.version }} + +runs: + using: composite + steps: + - name: Compute version + id: compute + shell: bash + env: + PACKAGE: ${{ inputs.package }} + CONTEXT: ${{ inputs.context }} + INDEX_URL: ${{ inputs.index_url }} + RUN_NUMBER: ${{ github.run_number }} + run: | + set -euo pipefail + + # --- Read seed version from pyproject.toml --- + SEED=$(cd "packages/${PACKAGE}" && uv version --short) + MAJOR_MINOR=$(echo "$SEED" | grep -oE '^[0-9]+\.[0-9]+') + echo "Seed version for ${PACKAGE}: ${SEED} (major.minor: ${MAJOR_MINOR})" + + # --- Query CodeArtifact for the latest published version --- + # uv pip compile resolves the latest matching version from the index. + # We constrain to the current major.minor series for `main` context. + resolve_latest() { + local constraint="$1" + local output + # uv pip compile exits non-zero on network/auth errors; let those surface. + # "Could not find a version" is a normal empty-result — grep returns 1, which is OK. + output=$(echo "$constraint" \ + | uv pip compile - --index-url "$INDEX_URL" --no-deps --quiet 2>&1) || { + echo "ERROR: uv pip compile failed for '${constraint}':" >&2 + echo "$output" >&2 + exit 1 + } + echo "$output" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true + } + + # --- Compute version based on context --- + case "$CONTEXT" in + vnext) + LATEST=$(resolve_latest "$PACKAGE") + if [ -n "$LATEST" ]; then + BASE="$LATEST" + echo "Latest published version: ${LATEST}" + else + BASE="${MAJOR_MINOR}.0" + echo "No published version found — falling back to ${BASE}" + fi + VERSION="${BASE}+dev.${RUN_NUMBER}" + ;; + + main) + # Resolve the highest patch within the current major.minor series. + LATEST_IN_SERIES=$(resolve_latest "${PACKAGE}>=${MAJOR_MINOR}.0,<${MAJOR_MINOR}.99999") + if [ -n "$LATEST_IN_SERIES" ]; then + CURRENT_PATCH=$(echo "$LATEST_IN_SERIES" | grep -oE '[0-9]+$') + NEXT_PATCH=$((CURRENT_PATCH + 1)) + echo "Latest in ${MAJOR_MINOR}.x series: ${LATEST_IN_SERIES} → next patch: ${NEXT_PATCH}" + else + NEXT_PATCH=0 + echo "No published version in ${MAJOR_MINOR}.x series — starting at patch 0" + fi + VERSION="${MAJOR_MINOR}.${NEXT_PATCH}" + ;; + + main-bump) + VERSION="${MAJOR_MINOR}.0" + echo "Major/minor bump — patch resets to 0" + ;; + + *) + echo "::error::Unknown context '${CONTEXT}'. Supported: vnext, main, main-bump." + exit 1 + ;; + esac + + echo "Computed version for ${PACKAGE} (${CONTEXT}): ${VERSION}" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/check-python-package-versions.yaml b/.github/workflows/check-python-package-versions.yaml index 0ea47f1d3..1277c9dcf 100644 --- a/.github/workflows/check-python-package-versions.yaml +++ b/.github/workflows/check-python-package-versions.yaml @@ -4,8 +4,6 @@ on: pull_request: paths: - '**/pyproject.toml' - - 'packages/**/__about__.py' - permissions: contents: read diff --git a/.github/workflows/compute-versions-dry-run.yaml b/.github/workflows/compute-versions-dry-run.yaml new file mode 100644 index 000000000..962556b67 --- /dev/null +++ b/.github/workflows/compute-versions-dry-run.yaml @@ -0,0 +1,124 @@ +name: Compute versions (dry run) + +# Runs on pushes to vnext and main. Computes and logs the version that would +# be published for each affected package — but does not build or publish. +# Remove this workflow once Phase 3 publish workflows are live. + +on: + push: + branches: [main, vnext] + paths: + - '**/pyproject.toml' + workflow_dispatch: + inputs: + context: + description: "Version context to simulate" + type: choice + options: [vnext, main, main-bump] + default: vnext + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + compute-versions: + name: Compute versions + if: github.event.repository.full_name == github.repository + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # Required for OIDC authentication to AWS + + steps: + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + with: + version: latest + + - name: Check out code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Determine context + id: context + env: + INPUT_CONTEXT: ${{ inputs.context }} + REF_NAME: ${{ github.ref_name }} + run: | + if [ -n "$INPUT_CONTEXT" ]; then + echo "value=$INPUT_CONTEXT" >> "$GITHUB_OUTPUT" + elif [ "$REF_NAME" = "vnext" ]; then + echo "value=vnext" >> "$GITHUB_OUTPUT" + else + echo "value=main" >> "$GITHUB_OUTPUT" + fi + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1 + with: + aws-region: us-west-2 + role-to-assume: arn:aws:iam::505071440022:role/GithubActions_Schema_CodeArtifact_ReadOnly + role-session-name: GitHubActions_${{github.job}}_${{github.run_id}} + + - name: Get CodeArtifact credentials + id: ca + uses: ./.github/actions/code-artifact + + - name: Compute version for each package + env: + CONTEXT: ${{ steps.context.outputs.value }} + INDEX_URL: ${{ steps.ca.outputs.index_url }} + run: | + echo "## Computed versions (context: ${CONTEXT})" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "| Package | Version |" >> "$GITHUB_STEP_SUMMARY" + echo "|---------|---------|" >> "$GITHUB_STEP_SUMMARY" + + for pkg_dir in packages/overture-schema*/; do + pkg=$(basename "$pkg_dir") + [ -f "${pkg_dir}/pyproject.toml" ] || continue + + SEED=$(cd "$pkg_dir" && uv version --short) + MAJOR_MINOR=$(echo "$SEED" | grep -oE '^[0-9]+\.[0-9]+') + + # Resolve latest from CA + resolve_latest() { + local output + output=$(echo "$1" \ + | uv pip compile - --index-url "$INDEX_URL" --no-deps --quiet 2>&1) || { + echo "ERROR: uv pip compile failed for '$1':" >&2 + echo "$output" >&2 + exit 1 + } + echo "$output" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true + } + + case "$CONTEXT" in + vnext) + LATEST=$(resolve_latest "$pkg") + BASE="${LATEST:-${MAJOR_MINOR}.0}" + VERSION="${BASE}+dev.${GITHUB_RUN_NUMBER}" + ;; + main) + LATEST_IN_SERIES=$(resolve_latest "${pkg}>=${MAJOR_MINOR}.0,<${MAJOR_MINOR}.99999") + if [ -n "$LATEST_IN_SERIES" ]; then + CURRENT_PATCH=$(echo "$LATEST_IN_SERIES" | grep -oE '[0-9]+$') + NEXT_PATCH=$((CURRENT_PATCH + 1)) + else + NEXT_PATCH=0 + fi + VERSION="${MAJOR_MINOR}.${NEXT_PATCH}" + ;; + main-bump) + VERSION="${MAJOR_MINOR}.0" + ;; + esac + + echo "| \`${pkg}\` | \`${VERSION}\` |" >> "$GITHUB_STEP_SUMMARY" + echo " ${pkg} → ${VERSION}" + done diff --git a/.github/workflows/publish-python-packages.yaml b/.github/workflows/publish-python-packages.yaml index ed2dcfd88..1246c4736 100644 --- a/.github/workflows/publish-python-packages.yaml +++ b/.github/workflows/publish-python-packages.yaml @@ -5,7 +5,6 @@ on: branches: [main] paths: - '**/pyproject.toml' - - 'packages/**/__about__.py' workflow_dispatch: inputs: aws_iam_role_name: @@ -75,16 +74,9 @@ jobs: role-to-assume: arn:aws:iam::505071440022:role/GithubActions_Schema_CodeArtifact_Publish role-session-name: GitHubActions_${{github.job}}_${{github.run_id}} - - name: Get CodeArtifact publish URL + - name: Get CodeArtifact credentials id: get-code-artifact-params - run: | - token=$(./.github/workflows/scripts/code-artifact.sh token \ - 505071440022 us-west-2 overture-pypi) - echo "::add-mask::${token}" - echo "token=${token}" >> $GITHUB_OUTPUT - publish_url=$(./.github/workflows/scripts/code-artifact.sh publish-url \ - 505071440022 us-west-2 overture-pypi overture) - echo "publish_url=${publish_url}" >> $GITHUB_OUTPUT + uses: ./.github/actions/code-artifact - name: Publish package ${{ matrix.package }} version ${{ matrix.after }} to PyPI env: diff --git a/.github/workflows/reusable-check-python-package-versions.yaml b/.github/workflows/reusable-check-python-package-versions.yaml index 19bf5ef30..1ce727507 100644 --- a/.github/workflows/reusable-check-python-package-versions.yaml +++ b/.github/workflows/reusable-check-python-package-versions.yaml @@ -133,17 +133,12 @@ jobs: - name: Get CodeArtifact index URL id: get-code-artifact-index-url if: steps.save-changes.outputs.num_changed_packages > 0 - env: - AWS_ACCOUNT_ID: ${{ inputs.aws_account_id }} - AWS_REGION: ${{ inputs.aws_region }} - DOMAIN: ${{ inputs.domain }} - REPOSITORY: ${{ inputs.repository }} - run: | - index_url=$(./.github/workflows/scripts/code-artifact.sh index-url \ - "$AWS_ACCOUNT_ID" "$AWS_REGION" \ - "$DOMAIN" "$REPOSITORY") - echo "::add-mask::${index_url}" - echo "index_url=${index_url}" >> $GITHUB_OUTPUT + uses: ./.github/actions/code-artifact + with: + aws_account_id: ${{ inputs.aws_account_id }} + aws_region: ${{ inputs.aws_region }} + domain: ${{ inputs.domain }} + repository: ${{ inputs.repository }} - name: Fail if any of the new versions already exist in the repo if: steps.save-changes.outputs.num_changed_packages > 0 diff --git a/.github/workflows/scripts/code-artifact.sh b/.github/workflows/scripts/code-artifact.sh deleted file mode 100755 index 488bdc5b0..000000000 --- a/.github/workflows/scripts/code-artifact.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -readonly subcommand="$1" - -function token() { - local -r aws_account_id="$1" - local -r aws_region="$2" - local -r domain="$3" - - aws codeartifact get-authorization-token \ - --region "$aws_region" \ - --domain "$domain" \ - --domain-owner "$aws_account_id" \ - --query authorizationToken \ - --output text -} - -function repo_url() { - local -r token="$1" - local -r credentials="${token:+aws:$token@}" - local -r aws_account_id="$2" - local -r aws_region="$3" - local -r domain="$4" - local -r repository="$5" - local -r suffix="$6" - - printf "https://%s%s-%s.d.codeartifact.%s.amazonaws.com/pypi/%s%s\n" \ - "$credentials" "$domain" "$aws_account_id" "$aws_region" "$repository" "$suffix" -} - -case "$subcommand" in - token) - if [ $# -ne 4 ]; then - >&2 echo "Usage: $0 token " - exit 1 - fi - token "$2" "$3" "$4" - ;; - - index-url|publish-url) - if [ $# -ne 5 ]; then - >&2 echo "Usage: $0 $subcommand " - exit 1 - fi - - if [ "$subcommand" = "index-url" ]; then - repo_url "$(token "$2" "$3" "$4")" "$2" "$3" "$4" "$5" "/simple/" - else - repo_url "" "$2" "$3" "$4" "$5" "" - fi - ;; - - *) - >&2 echo "Unknown subcommand: ${subcommand:-}" - >&2 echo "Valid subcommands: token | index-url | publish-url" - exit 1 - ;; -esac diff --git a/.github/workflows/scripts/package-versions.py b/.github/workflows/scripts/package-versions.py index c28ad8520..2be0b735a 100755 --- a/.github/workflows/scripts/package-versions.py +++ b/.github/workflows/scripts/package-versions.py @@ -20,7 +20,7 @@ def collect(): packages = sorted( d.name for d in packages_dir.iterdir() - if d.is_dir() and d.name.startswith("overture-schema") + if d.is_dir() and d.name.startswith("overture-schema") and (d / "pyproject.toml").exists() ) package_versions = [ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5e2a9525..b0abd3f3e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,6 +115,12 @@ If the automatic rebase fails, a GitHub issue is opened and assigned to the auth > `git pull --rebase` (or `git fetch origin && git rebase origin/vnext`) on your branch before > pushing again. +### Version dry-run (informational) + +After each push to `main` or `vnext`, CI runs the `compute-versions-dry-run` workflow. It logs what package versions **would** be stamped at publish time — no artifacts are actually produced. Check the workflow's job summary for a table of computed versions. + +This workflow will be replaced by actual publish workflows in Phase 3. + ## Migration Notes When Phases 0-4 are complete, this area can be removed in favor of more permanent documentation. @@ -134,7 +140,14 @@ If your fork still references `dev` or `staging`, update your remotes accordingl - vnext compatibility check added: every PR to `main` verifies that `vnext` can rebase cleanly on top; posts exact fix commands on conflict. - Post-merge automatic rebase added: `vnext` is force-rebased onto `main` after every merge; if it fails, a GitHub issue is opened. -### [Phase 2](https://github.com/OvertureMaps/schema/issues/508) +### [Phase 2.A](https://github.com/OvertureMaps/schema/issues/508), May 2026 + +- All packages baselined with static versions in `pyproject.toml` (`overture-schema` at `1.17.1`, others at `0.1.1`). +- `compute-version` composite action added: computes PEP 440 versions for vnext (dev), main (patch), and main-bump (reset) contexts. +- `code-artifact` composite action added: replaces the legacy shell script for AWS CodeArtifact auth. +- `compute-versions-dry-run` workflow added for version visibility until Phase 3 publish workflows land. + +### [Phase 2.B](https://github.com/OvertureMaps/schema/issues/533) - WIP / Pending diff --git a/counterexamples/divisions/division_area/bad-missing-is-land.yaml b/counterexamples/divisions/division_area/bad-missing-is-land.yaml index 98842b080..41ecd711d 100644 --- a/counterexamples/divisions/division_area/bad-missing-is-land.yaml +++ b/counterexamples/divisions/division_area/bad-missing-is-land.yaml @@ -1,13 +1,13 @@ ---- -id: counterexample:division_area:bad-is-territorial -type: Feature -geometry: - type: LineString - coordinates: [[0, 1], [1, 2]] -properties: - theme: divisions - type: division_area - version: 0 +--- +id: counterexample:division_area:bad-is-territorial +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_area + version: 0 subtype: country division_id: counterexample:division_boundary:some-division is_territorial: false diff --git a/counterexamples/transportation/segment/road/bad-road-destinations.yaml b/counterexamples/transportation/segment/road/bad-road-destinations.yaml index ac39be034..d283b3b13 100644 --- a/counterexamples/transportation/segment/road/bad-road-destinations.yaml +++ b/counterexamples/transportation/segment/road/bad-road-destinations.yaml @@ -1,52 +1,52 @@ ---- -id: overture:transportation:segment:example:destinations:1 -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 0 - connectors: - - connector_id: overture:transportation:connector:123 - at: 0 - - connector_id: overture:transportation:connector:678 - at: 1 - destinations: - - labels: - - value: Seattle - type: unknown - - value: Seattle - type: unknown - - value: Redmond - - value: - foo: bar - type: unknown - - value: Bellevue - type: other - - value: Main Street - type: street - - value: I90 - type: route - symbols: - - airport - from: - - segment_id: overture:transportation:segment:234 - - segment_id: overture:transportation:segment:567 - connector_id: overture:transportation:connector:567 - foo: bar - when: - heading: forward - to_connector_id: overture:transportation:connector:123 - final_heading: backward - - labels: - - value: Kirkland - type: unknown - from: - - segment_id: overture:transportation:segment:567 - connector_id: overture:transportation:connector:567 - ext_expected_errors: - - "destinations/items/properties/labels/uniqueItems]: items at 0 and 1 are equal" +--- +id: overture:transportation:segment:example:destinations:1 +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 0 + connectors: + - connector_id: overture:transportation:connector:123 + at: 0 + - connector_id: overture:transportation:connector:678 + at: 1 + destinations: + - labels: + - value: Seattle + type: unknown + - value: Seattle + type: unknown + - value: Redmond + - value: + foo: bar + type: unknown + - value: Bellevue + type: other + - value: Main Street + type: street + - value: I90 + type: route + symbols: + - airport + from: + - segment_id: overture:transportation:segment:234 + - segment_id: overture:transportation:segment:567 + connector_id: overture:transportation:connector:567 + foo: bar + when: + heading: forward + to_connector_id: overture:transportation:connector:123 + final_heading: backward + - labels: + - value: Kirkland + type: unknown + from: + - segment_id: overture:transportation:segment:567 + connector_id: overture:transportation:connector:567 + ext_expected_errors: + - "destinations/items/properties/labels/uniqueItems]: items at 0 and 1 are equal" diff --git a/packages/overture-schema-addresses-theme/pyproject.toml b/packages/overture-schema-addresses-theme/pyproject.toml index a550ec79f..9efd0ce6e 100644 --- a/packages/overture-schema-addresses-theme/pyproject.toml +++ b/packages/overture-schema-addresses-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic>=2.12.0", ] description = "Overture Maps addresses theme models and structures" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-addresses-theme" readme = "README.md" @@ -28,9 +28,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/addresses/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-addresses-theme/src/overture/schema/addresses/__about__.py b/packages/overture-schema-addresses-theme/src/overture/schema/addresses/__about__.py index 5e3bb11ca..73d661b36 100644 --- a/packages/overture-schema-addresses-theme/src/overture/schema/addresses/__about__.py +++ b/packages/overture-schema-addresses-theme/src/overture/schema/addresses/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-addresses-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-annex/pyproject.toml b/packages/overture-schema-annex/pyproject.toml index 95a45d362..af7ea058d 100644 --- a/packages/overture-schema-annex/pyproject.toml +++ b/packages/overture-schema-annex/pyproject.toml @@ -4,7 +4,7 @@ maintainers = [ ] dependencies = ["overture-schema-common", "overture-schema-system", "pydantic>=2.12.0"] description = "Add your description here" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-annex" readme = "README.md" @@ -23,9 +23,6 @@ Issues = "https://github.com/OvertureMaps/schema/issues" build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-annex/src/overture/schema/__about__.py b/packages/overture-schema-annex/src/overture/schema/__about__.py index 5e3bb11ca..6e94b6bec 100644 --- a/packages/overture-schema-annex/src/overture/schema/__about__.py +++ b/packages/overture-schema-annex/src/overture/schema/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-annex") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-base-theme/pyproject.toml b/packages/overture-schema-base-theme/pyproject.toml index c671e1d88..cd0644108 100644 --- a/packages/overture-schema-base-theme/pyproject.toml +++ b/packages/overture-schema-base-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic>=2.12.0", ] description = "Overture Maps base theme shared structures and models (bathymetry, infrastructure, land, land_cover, land_use, water)" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-base-theme" readme = "README.md" @@ -28,9 +28,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/base/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-base-theme/src/overture/schema/base/__about__.py b/packages/overture-schema-base-theme/src/overture/schema/base/__about__.py index 5e3bb11ca..89a6dd9ca 100644 --- a/packages/overture-schema-base-theme/src/overture/schema/base/__about__.py +++ b/packages/overture-schema-base-theme/src/overture/schema/base/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-base-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-buildings-theme/pyproject.toml b/packages/overture-schema-buildings-theme/pyproject.toml index 833b67a23..2ab6a3352 100644 --- a/packages/overture-schema-buildings-theme/pyproject.toml +++ b/packages/overture-schema-buildings-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic>=2.12.0", ] description = "Overture Maps buildings theme shared structures, building types, and building part types" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-buildings-theme" readme = "README.md" @@ -28,9 +28,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/buildings/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-buildings-theme/src/overture/schema/buildings/__about__.py b/packages/overture-schema-buildings-theme/src/overture/schema/buildings/__about__.py index 5e3bb11ca..6b9d493bf 100644 --- a/packages/overture-schema-buildings-theme/src/overture/schema/buildings/__about__.py +++ b/packages/overture-schema-buildings-theme/src/overture/schema/buildings/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-buildings-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-cli/pyproject.toml b/packages/overture-schema-cli/pyproject.toml index dd0aa1bd8..f32fd78ef 100644 --- a/packages/overture-schema-cli/pyproject.toml +++ b/packages/overture-schema-cli/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "yamlcore>=0.0.4", ] description = "Command-line interface for Overture Maps schema validation and JSON Schema generation" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-cli" readme = "README.md" @@ -38,9 +38,6 @@ dev = [ "mypy>=1.17.0", ] -[tool.hatch.version] -path = "src/overture/schema/cli/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-cli/src/overture/schema/cli/__about__.py b/packages/overture-schema-cli/src/overture/schema/cli/__about__.py index 5e3bb11ca..302de4ff4 100644 --- a/packages/overture-schema-cli/src/overture/schema/cli/__about__.py +++ b/packages/overture-schema-cli/src/overture/schema/cli/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-cli") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-codegen/pyproject.toml b/packages/overture-schema-codegen/pyproject.toml index 3019a6a92..816223318 100644 --- a/packages/overture-schema-codegen/pyproject.toml +++ b/packages/overture-schema-codegen/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "tomli>=2.0; python_version < '3.11'", ] description = "Code generator that produces documentation and code from Pydantic models" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-codegen" @@ -24,8 +24,5 @@ overture-schema-cli = { workspace = true } overture-schema-common = { workspace = true } overture-schema-system = { workspace = true } -[tool.hatch.version] -path = "src/overture/schema/codegen/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-codegen/src/overture/schema/codegen/__about__.py b/packages/overture-schema-codegen/src/overture/schema/codegen/__about__.py index 3dc1f76bc..2fce0d82a 100644 --- a/packages/overture-schema-codegen/src/overture/schema/codegen/__about__.py +++ b/packages/overture-schema-codegen/src/overture/schema/codegen/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.0" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-codegen") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-common/pyproject.toml b/packages/overture-schema-common/pyproject.toml index de356fa4a..8daaa6dac 100644 --- a/packages/overture-schema-common/pyproject.toml +++ b/packages/overture-schema-common/pyproject.toml @@ -7,7 +7,7 @@ name = "overture-schema-common" maintainers = [ {name = "Overture Maps Schema Working Group"}, ] -dynamic = ["version"] +version = "0.1.1" description = "Common components that are shared across Overture theme schemas" license = "MIT" dependencies = [ @@ -24,9 +24,6 @@ Issues = "https://github.com/OvertureMaps/schema/issues" [tool.uv.sources] overture-schema-system = { workspace = true } -[tool.hatch.version] -path = "src/overture/schema/common/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-common/src/overture/schema/common/__about__.py b/packages/overture-schema-common/src/overture/schema/common/__about__.py index 5e3bb11ca..b83d77678 100644 --- a/packages/overture-schema-common/src/overture/schema/common/__about__.py +++ b/packages/overture-schema-common/src/overture/schema/common/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-common") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-divisions-theme/pyproject.toml b/packages/overture-schema-divisions-theme/pyproject.toml index 0314d8d1b..2da546006 100644 --- a/packages/overture-schema-divisions-theme/pyproject.toml +++ b/packages/overture-schema-divisions-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic>=2.12.0", ] description = "Overture Maps divisions theme shared structures, division, division area and division boundary types" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-divisions-theme" readme = "README.md" @@ -27,9 +27,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/divisions/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-divisions-theme/src/overture/schema/divisions/__about__.py b/packages/overture-schema-divisions-theme/src/overture/schema/divisions/__about__.py index 5e3bb11ca..f0e512b45 100644 --- a/packages/overture-schema-divisions-theme/src/overture/schema/divisions/__about__.py +++ b/packages/overture-schema-divisions-theme/src/overture/schema/divisions/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-divisions-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-places-theme/pyproject.toml b/packages/overture-schema-places-theme/pyproject.toml index 58fa3dd7a..995fd707a 100644 --- a/packages/overture-schema-places-theme/pyproject.toml +++ b/packages/overture-schema-places-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic[email]>=2.12.0", ] description = "Overture Maps places theme with place type models" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-places-theme" readme = "README.md" @@ -27,9 +27,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/places/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-places-theme/src/overture/schema/places/__about__.py b/packages/overture-schema-places-theme/src/overture/schema/places/__about__.py index 5e3bb11ca..bb205eaf6 100644 --- a/packages/overture-schema-places-theme/src/overture/schema/places/__about__.py +++ b/packages/overture-schema-places-theme/src/overture/schema/places/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-places-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-system/pyproject.toml b/packages/overture-schema-system/pyproject.toml index 0646d7a0a..48f01c1d3 100644 --- a/packages/overture-schema-system/pyproject.toml +++ b/packages/overture-schema-system/pyproject.toml @@ -7,7 +7,7 @@ name = "overture-schema-system" maintainers = [ {name = "Overture Maps Schema Working Group"}, ] -dynamic = ["version"] +version = "0.1.1" description = "Foundational types at the base of the Overture Maps schema system" readme = "README.md" requires-python = ">=3.10" @@ -29,9 +29,6 @@ dev = [ "mypy>=1.17.0", ] -[tool.hatch.version] -path = "src/overture/schema/system/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-system/src/overture/schema/system/__about__.py b/packages/overture-schema-system/src/overture/schema/system/__about__.py index 5e3bb11ca..459f0551b 100644 --- a/packages/overture-schema-system/src/overture/schema/system/__about__.py +++ b/packages/overture-schema-system/src/overture/schema/system/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-system") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema-transportation-theme/pyproject.toml b/packages/overture-schema-transportation-theme/pyproject.toml index 547b54401..50407ed4a 100644 --- a/packages/overture-schema-transportation-theme/pyproject.toml +++ b/packages/overture-schema-transportation-theme/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "pydantic>=2.12.0", ] description = "Overture Maps transportation theme with shared structures and connector and segment types" -dynamic = ["version"] +version = "0.1.1" license = "MIT" name = "overture-schema-transportation-theme" readme = "README.md" @@ -28,9 +28,6 @@ overture-schema-system = { workspace = true } build-backend = "hatchling.build" requires = ["hatchling"] -[tool.hatch.version] -path = "src/overture/schema/transportation/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema-transportation-theme/src/overture/schema/transportation/__about__.py b/packages/overture-schema-transportation-theme/src/overture/schema/transportation/__about__.py index 5e3bb11ca..214099d7c 100644 --- a/packages/overture-schema-transportation-theme/src/overture/schema/transportation/__about__.py +++ b/packages/overture-schema-transportation-theme/src/overture/schema/transportation/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema-transportation-theme") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/packages/overture-schema/pyproject.toml b/packages/overture-schema/pyproject.toml index eb9bb8940..bb748c46e 100644 --- a/packages/overture-schema/pyproject.toml +++ b/packages/overture-schema/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "overture-schema-cli", ] description = "Complete Overture Maps schema collection with all themes and types" -dynamic = ["version"] +version = "1.17.1" license = "MIT" name = "overture-schema" readme = "README.md" @@ -47,8 +47,5 @@ dev = [ "yamlcore>=0.0.4", ] -[tool.hatch.version] -path = "src/overture/schema/__about__.py" - [tool.hatch.build.targets.wheel] packages = ["src/overture"] diff --git a/packages/overture-schema/src/overture/schema/__about__.py b/packages/overture-schema/src/overture/schema/__about__.py index 5e3bb11ca..7f4ff3688 100644 --- a/packages/overture-schema/src/overture/schema/__about__.py +++ b/packages/overture-schema/src/overture/schema/__about__.py @@ -1 +1,6 @@ -__version__ = "0.1.1.dev1" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("overture-schema") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/reference/counterexamples/divisions/division_area/bad-missing-is-land.yaml b/reference/counterexamples/divisions/division_area/bad-missing-is-land.yaml index 3c7018342..c7bfe5675 100644 --- a/reference/counterexamples/divisions/division_area/bad-missing-is-land.yaml +++ b/reference/counterexamples/divisions/division_area/bad-missing-is-land.yaml @@ -1,14 +1,14 @@ ---- -id: counterexample:division_area:bad-is-territorial -type: Feature -geometry: - type: LineString - coordinates: [[0, 1], [1, 2]] -properties: - theme: divisions - type: division_area - version: 0 - subtype: country - division_id: counterexample:division_boundary:some-division - is_territorial: false +--- +id: counterexample:division_area:bad-is-territorial +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_area + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_territorial: false country: ZZ \ No newline at end of file diff --git a/reference/counterexamples/transportation/segment/road/bad-road-destinations.yaml b/reference/counterexamples/transportation/segment/road/bad-road-destinations.yaml index a52da0d0b..d30e98f59 100644 --- a/reference/counterexamples/transportation/segment/road/bad-road-destinations.yaml +++ b/reference/counterexamples/transportation/segment/road/bad-road-destinations.yaml @@ -1,52 +1,52 @@ ---- -id: overture:transportation:segment:example:destinations:1 -type: Feature -geometry: - type: LineString - coordinates: [[0, 0], [1, 1]] -properties: - theme: transportation - type: segment - subtype: road - class: secondary - version: 0 - connectors: - - connector_id: overture:transportation:connector:123 - at: 0 - - connector_id: overture:transportation:connector:678 - at: 1 - destinations: - - labels: - - value: Seattle - type: unknown - - value: Seattle - type: unknown - - value: Redmond - - value: - foo: bar - type: unknown - - value: Bellevue - type: other - - value: Main Street - type: street - - value: I90 - type: route - symbols: - - airport - from: - - segment_id: overture:transportation:segment:234 - - segment_id: overture:transportation:segment:567 - connector_id: overture:transportation:connector:567 - foo: bar - when: - heading: forward - to_connector_id: overture:transportation:connector:123 - final_heading: backward - - labels: - - value: Kirkland - type: unknown - from: - - segment_id: overture:transportation:segment:567 - connector_id: overture:transportation:connector:567 - ext_expected_errors: - - "items at 0 and 1 are equal" +--- +id: overture:transportation:segment:example:destinations:1 +type: Feature +geometry: + type: LineString + coordinates: [[0, 0], [1, 1]] +properties: + theme: transportation + type: segment + subtype: road + class: secondary + version: 0 + connectors: + - connector_id: overture:transportation:connector:123 + at: 0 + - connector_id: overture:transportation:connector:678 + at: 1 + destinations: + - labels: + - value: Seattle + type: unknown + - value: Seattle + type: unknown + - value: Redmond + - value: + foo: bar + type: unknown + - value: Bellevue + type: other + - value: Main Street + type: street + - value: I90 + type: route + symbols: + - airport + from: + - segment_id: overture:transportation:segment:234 + - segment_id: overture:transportation:segment:567 + connector_id: overture:transportation:connector:567 + foo: bar + when: + heading: forward + to_connector_id: overture:transportation:connector:123 + final_heading: backward + - labels: + - value: Kirkland + type: unknown + from: + - segment_id: overture:transportation:segment:567 + connector_id: overture:transportation:connector:567 + ext_expected_errors: + - "items at 0 and 1 are equal" diff --git a/uv.lock b/uv.lock index 0bbdf1cda..458434c6e 100644 --- a/uv.lock +++ b/uv.lock @@ -7,7 +7,7 @@ resolution-markers = [ ] [options] -exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer = "2026-05-14T16:33:24.6787743Z" exclude-newer-span = "P1W" [manifest] @@ -650,6 +650,7 @@ wheels = [ [[package]] name = "overture-schema" +version = "1.17.0" source = { editable = "packages/overture-schema" } dependencies = [ { name = "overture-schema-addresses-theme" }, @@ -694,6 +695,7 @@ dev = [ [[package]] name = "overture-schema-addresses-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-addresses-theme" } dependencies = [ { name = "overture-schema-common" }, @@ -710,6 +712,7 @@ requires-dist = [ [[package]] name = "overture-schema-annex" +version = "0.1.0" source = { editable = "packages/overture-schema-annex" } dependencies = [ { name = "overture-schema-common" }, @@ -726,6 +729,7 @@ requires-dist = [ [[package]] name = "overture-schema-base-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-base-theme" } dependencies = [ { name = "overture-schema-common" }, @@ -742,6 +746,7 @@ requires-dist = [ [[package]] name = "overture-schema-buildings-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-buildings-theme" } dependencies = [ { name = "overture-schema-common" }, @@ -758,6 +763,7 @@ requires-dist = [ [[package]] name = "overture-schema-cli" +version = "0.1.0" source = { editable = "packages/overture-schema-cli" } dependencies = [ { name = "click" }, @@ -796,6 +802,7 @@ dev = [ [[package]] name = "overture-schema-codegen" +version = "0.1.0" source = { editable = "packages/overture-schema-codegen" } dependencies = [ { name = "click" }, @@ -818,6 +825,7 @@ requires-dist = [ [[package]] name = "overture-schema-common" +version = "0.1.0" source = { editable = "packages/overture-schema-common" } dependencies = [ { name = "overture-schema-system" }, @@ -848,6 +856,7 @@ dev = [ [[package]] name = "overture-schema-divisions-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-divisions-theme" } dependencies = [ { name = "overture-schema-common" }, @@ -864,6 +873,7 @@ requires-dist = [ [[package]] name = "overture-schema-places-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-places-theme" } dependencies = [ { name = "overture-schema-common" }, @@ -880,6 +890,7 @@ requires-dist = [ [[package]] name = "overture-schema-system" +version = "0.1.0" source = { editable = "packages/overture-schema-system" } dependencies = [ { name = "pydantic" }, @@ -908,6 +919,7 @@ dev = [ [[package]] name = "overture-schema-transportation-theme" +version = "0.1.0" source = { editable = "packages/overture-schema-transportation-theme" } dependencies = [ { name = "overture-schema-common" },