[REFACTOR](schema) Extract overture-schema-validation package - #620
Open
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Open
[REFACTOR](schema) Extract overture-schema-validation package#620Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Seth Fitzsimmons (sethfitz) wants to merge 1 commit into
Conversation
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>
🗺️ Schema reference docs preview is live!
Note ♻️ This preview updates automatically with each push to this PR. |
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.
validate()andvalidate_json()lived in the umbrella distribution's namespace__init__(overture-schema/src/overture/schema/__init__.py), so the sharedoverture.schemanamespace root carried real code owned by one distribution. This moves them into a newoverture-schema-validationpackage (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
-validationpackage 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":-commonand-systeminto-validation, so those packages carry model/type definitions and this one carries the validation API.[pyspark]extra on this package rather than the separate-pysparkruntime 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