[FEATURE] Add packages for modelling your own data with Overture's schema - #62
Open
Seth Fitzsimmons (sethfitz) wants to merge 15 commits into
Open
Seth Fitzsimmons (sethfitz) wants to merge 15 commits into
Seth Fitzsimmons (sethfitz) wants to merge 15 commits into
Conversation
Seth Fitzsimmons (sethfitz)
force-pushed
the
devcontainer-py312
branch
from
September 26, 2026 20:23
835e91d to
c6716a7
Compare
Seth Fitzsimmons (sethfitz)
force-pushed
the
schema-bootstrap
branch
from
September 26, 2026 20:23
0f1387c to
2730c8b
Compare
Workshop attendees at CNG Forum 2026 model their own datasets with Overture's schema framework. my-schema is the starting point: an example Feature model covering a named type, an enum, a struct and a cross-field rule, plus a tag provider so --tag my_schema selects its models. It is a uv workspace member, so the devcontainer's uv sync installs it editable: edits to models.py take effect without reinstalling. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
A field typed as a struct shows an empty description in the generated docs unless the field has its own; codegen doesn't fall back to the struct's docstring yet. The workshop deck shows this row. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
my-schema is a workspace member sharing the root .venv. uv sync inside my-schema/ syncs only that member and removes jupyter, duckdb and the rest; from the root it registers the new entry point and keeps them. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
It keeps the workshop's other packages from any directory, where a bare uv sync inside my-schema/ removes them. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
schema-bootstrap generates an Overture-convention Pydantic model from a data file, seeding field descriptions and enum domains from sidecar metadata. It gives the CNG workshop's schema session a starting point: point it at your own data and edit the model it writes, rather than authoring one from scratch. Adapted from sethfitz/schema-bootstrap at dfc2176: it builds with uv_build like the workshop's other packages, its README and the TIGER/Line fixture link the Census source, and the tag-provider test runs against the real overture-schema it already depends on. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Like my-schema, schema-bootstrap is a uv workspace member, so the devcontainer's uv sync puts the schema-bootstrap command on PATH beside overture-schema. Its own uv.lock goes, since the workspace lock governs members. The workspace lock resolves duckdb to 1.5.5, the floor schema-bootstrap declares (was 1.5.2). Its README's uv sync instructions now name --all-packages, since a bare uv sync in a member directory removes the workshop's other packages. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Seth Fitzsimmons (sethfitz)
force-pushed
the
schema-bootstrap
branch
from
September 27, 2026 04:31
2730c8b to
3ecde3a
Compare
Slide 16 validates two bathymetry YAML features, slide 17 converts a GeoParquet extract with gpq, slide 18 pipes a DuckDB query into the validator. None of those inputs existed in the repo, so a tester couldn't run them. bathymetry.parquet (100 rows, 55 KB) is committed so the slide works without network; bathymetry.sql regenerates it. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
cf9ca2c re-locked on a machine whose global uv config sets exclude-newer = "1 week", so uv.lock recorded exclude-newer-span = "P1W". The workshop doesn't declare that setting, so the lock disagreed with every environment but that one (Codespaces, participants' laptops). Re-locked with XDG_CONFIG_HOME=/nonexistent: only the [options] block changes, no package versions. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Slides 20-35 (fields, types, constraints) as runnable cells against my-schema's RoadSafetyRating, one Try-it exercise per concept that fits in a cell. Cells meant to fail are marked; %xmode Minimal keeps the tracebacks to the field and the rule. Executed locally 2026-09-26: every intended failure fails at the rule it teaches, every other cell passes. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
The deck's STAC slide needs --format stac-table-columns, which is unreleased (OvertureMaps/schema#724). The branch's own sources pull overture-schema-system, -common and -cli from the same commit, so all four come from git until #724 ships. Re-ran every hands-on slide, schema-bootstrap --report and the notebook on this lock (2026-09-26): same results as on the 2.0.0 release. Locked without the local uv cooldown config. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Slides 37-40 describe registering a model, the re-sync an entry point needs, --type once there are two models, and a tag vocabulary; nothing let participants do it. Adapted from a tester's walkthrough to the Codespace (editor, uv sync --all-packages). The tag provider defines the MODE and DRAFTS that slide 39 uses but never shows. Every command and output run end to end in a scratch copy of the repo, 2026-09-26. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Seth Fitzsimmons (sethfitz)
force-pushed
the
schema-bootstrap
branch
from
September 27, 2026 14:58
86163f1 to
a3d92e6
Compare
Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
Nested structs already used @no_extra_fields; the feature itself ignored undeclared keys, so a misspelled top-level field validated and vanished. The model now rejects it, and the notebook's alias and extra-key cells show the rejection instead of the silent drop. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
This branch has not been deployed
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.
What's in this PR?
my-schema, a template package for modelling your own data with Overture's schema framework: an exampleFeaturemodel covering a named type, an enum, a struct and a cross-field rule, plus a tag provider so--tag my_schemaselects itschema-bootstrap, which writes a first draft of such a model from a data file (Shapefile, GeoPackage, GeoJSON or Parquet). Field descriptions and enum domains come from the ISO 19110 or FGDC metadata shipped beside the data; anything it can't source is left as a TODO in the outputuv sync --frozen(locally and in the Codespaces postCreate) installs them editable.schema-bootstraprequires duckdb >= 1.5.5, so the lock moves duckdb from 1.5.2 to 1.5.5devcontainer-py312until that merges