Skip to content

[REFACTOR](schema) Extract overture-schema-validation package - #620

Open
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
annex-py-typedfrom
extract-validation-package
Open

[REFACTOR](schema) Extract overture-schema-validation package#620
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
annex-py-typedfrom
extract-validation-package

Conversation

@sethfitz

@sethfitz Seth Fitzsimmons (sethfitz) commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

validate() and validate_json() lived in the umbrella distribution's namespace __init__ (overture-schema/src/overture/schema/__init__.py), so the shared overture.schema namespace root carried real code owned by one distribution. This moves them into a new overture-schema-validation package (overture.schema.validation); the umbrella now depends on it, and its namespace __init__ becomes a bare pkgutil shim.

The immediate driver is packaging: freeing the namespace root of owned code is a precondition for the uv_build migration (PR 3), where a distribution cannot own code at a shared namespace root.

Open design question

Whether a standalone -validation package is the right long-term home, or just the minimal way to vacate the root, is worth deciding here rather than assuming. The larger direction this enables — and the reason a dedicated package earns its place beyond "move code off the root":

  • Pull validation-specific code out of -common and -system into -validation, so those packages carry model/type definitions and this one carries the validation API.
  • Expose PySpark validation through a [pyspark] extra on this package rather than the separate -pyspark runtime distribution.

This PR does none of that consolidation — it takes only the packaging-forced step (vacate the root). The broader move is deliberately out of scope pending agreement on the target shape. Flagging it so the review decides the destination before more code accretes around the current split.

Stacked on #619. Closes #622

validate() and validate_json() lived in the overture-schema umbrella's
namespace __init__ (src/overture/schema/__init__.py), so the shared
overture.schema namespace root carried real code owned by one
distribution.  Move them into their own overture.schema.validation
module in a new overture-schema-validation package; the umbrella now
depends on it and its namespace __init__ is a bare pkgutil shim.

This separates the aggregator role from the validation API and prepares
the namespace root to become code-free -- a precondition for the
uv_build migration, where a distribution cannot own code at a shared
namespace root.

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
@github-actions

Copy link
Copy Markdown

🗺️ Schema reference docs preview is live!

🌍 Preview https://staging.overturemaps.org/schema/pr/620/schema/index.html
🕐 Updated Jul 31, 2026 18:37 UTC
📝 Commit 00b665c
🔧 env SCHEMA_PREVIEW true

Note

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

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.

1 participant