Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ doctest-only:
mypy: uv-sync mypy-only

mypy-only:
@# $$ escapes $ for make - sed needs literal $ for end-of-line anchor
@# $$ escapes $ for make - sed replaces the -theme- infix (packages were
@# renamed overture-schema-<t>-theme -> overture-schema-theme-<t>) so the
@# derived mypy module stays overture.schema.<t>
@find packages -maxdepth 1 -type d -name "overture-schema*" \
| sort \
| sed 's|-theme$$||' \
| sed 's|-theme-|-|' \
| tr - . \
| sed 's|^packages/|-p |' \
| xargs uv run mypy --no-error-summary
Expand Down
12 changes: 6 additions & 6 deletions PYDANTIC_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,13 +848,13 @@ road_segment = RoadSegment(subtype=Subtype.ROAD, ...) # Valid
Instead of making classes abstract, we use **entry point registration** where only specific concrete types are discoverable as map features:

```python
# In packages/overture-schema-transportation-theme/pyproject.toml
# In packages/overture-schema-theme-transportation/pyproject.toml
[project.entry-points."overture.models"]
connector = "overture.schema.transportation:Connector"
segment = "overture.schema.transportation:Segment"
```

**Real example:** See [`packages/overture-schema-transportation-theme/src/overture/schema/transportation/segment/__init__.py`](packages/overture-schema-transportation-theme/src/overture/schema/transportation/segment/__init__.py) where:
**Real example:** See [`packages/overture-schema-theme-transportation/src/overture/schema/transportation/segment/__init__.py`](packages/overture-schema-theme-transportation/src/overture/schema/transportation/segment/__init__.py) where:

- **`Segment`** is a discriminated union: `RoadSegment | RailSegment | WaterSegment`
- **`TransportationSegment`** is the concrete base class that all segment types inherit from
Expand Down Expand Up @@ -1003,11 +1003,11 @@ Organize code by scope and avoid circular imports:

- Used by multiple themes (e.g., `OvertureFeature`, `Names`, `Sources`, `Scope`)

**Theme-level shared**: Theme package root (e.g., `overture-schema-transportation-theme/src/overture/schema/transportation/`)
**Theme-level shared**: Theme package root (e.g., `overture-schema-theme-transportation/src/overture/schema/transportation/`)

- Used by multiple types within a theme (e.g., `AccessRules`, `RoadSurface`)

**Type-specific**: Type subdirectory (e.g., `overture-schema-transportation-theme/src/overture/schema/transportation/segment/`)
**Type-specific**: Type subdirectory (e.g., `overture-schema-theme-transportation/src/overture/schema/transportation/segment/`)

- Only used by one specific type (e.g., `SegmentType`, `LaneConfiguration`)

Expand Down Expand Up @@ -1088,14 +1088,14 @@ properties:
**Pydantic approach:**

```python
# In overture-schema-addresses-theme/src/overture/schema/addresses/address.py
# In overture-schema-theme-addresses/src/overture/schema/addresses/address.py
@no_extra_fields
class Address(BaseModel):
"""A postal address."""
freeform: str | None = None
locality: str | None = None

# In overture-schema-buildings-theme/src/overture/schema/buildings/building.py
# In overture-schema-theme-buildings/src/overture/schema/buildings/building.py
class Building(OvertureFeature):
address: Address | None = None
```
Expand Down
14 changes: 7 additions & 7 deletions README.pydantic.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ This workspace contains the following packages:

### Theme Packages

- **`overture-schema-addresses-theme`** - Address features
- **`overture-schema-base-theme`** - Foundational geographic features (land, water,
- **`overture-schema-theme-addresses`** - Address features
- **`overture-schema-theme-base`** - Foundational geographic features (land, water,
infrastructure, bathymetry, land cover, land use)
- **`overture-schema-buildings-theme`** - Building footprints and building parts with
- **`overture-schema-theme-buildings`** - Building footprints and building parts with
architectural details
- **`overture-schema-divisions-theme`** - Administrative boundaries, division areas, and
- **`overture-schema-theme-divisions`** - Administrative boundaries, division areas, and
political boundaries
- **`overture-schema-places-theme`** - Points of interest, businesses, and named
- **`overture-schema-theme-places`** - Points of interest, businesses, and named
locations
- **`overture-schema-transportation-theme`** - Road segments and transportation network
- **`overture-schema-theme-transportation`** - Road segments and transportation network
connectors

### Usage (Python)
Expand Down Expand Up @@ -218,7 +218,7 @@ uv sync --all-packages
make check

# Run tests for a specific package
uv run pytest packages/overture-schema-buildings-theme/
uv run pytest packages/overture-schema-theme-buildings/

# Run tests matching a pattern
uv run pytest -k "buildings"
Expand Down
4 changes: 2 additions & 2 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ example:
```bash
# 1. One small markdown file, named <issue-or-pr>.<type>.md
echo 'Fixed brand enum values rejecting valid entries.' \
> packages/overture-schema-places-theme/changelog.d/561.bugfix.md
> packages/overture-schema-theme-places/changelog.d/561.bugfix.md

# 2. Commit it with your change
git add packages/overture-schema-places-theme/changelog.d/561.bugfix.md
git add packages/overture-schema-theme-places/changelog.d/561.bugfix.md
git commit -m 'Add changelog fragment'
```

Expand Down
2 changes: 1 addition & 1 deletion packages/overture-schema-codegen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ overture-codegen list
```

The generator discovers models via `overture.models` entry points (provided by theme
packages like `overture-schema-buildings-theme`), extracts type information, and renders
packages like `overture-schema-theme-buildings`), extracts type information, and renders
output pages with cross-page links, constraint descriptions, and validated examples.

## Architecture
Expand Down
1 change: 1 addition & 0 deletions packages/overture-schema-codegen/changelog.d/649.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
24 changes: 12 additions & 12 deletions packages/overture-schema-codegen/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ requires-python = ">=3.10"
overture-codegen = "overture.schema.codegen.cli:main"

[tool.uv.sources]
overture-schema-addresses-theme = { workspace = true }
overture-schema-base-theme = { workspace = true }
overture-schema-buildings-theme = { workspace = true }
overture-schema-cli = { workspace = true }
overture-schema-common = { workspace = true }
overture-schema-divisions-theme = { workspace = true }
overture-schema-places-theme = { workspace = true }
overture-schema-system = { workspace = true }
overture-schema-transportation-theme = { workspace = true }
overture-schema-theme-addresses = { workspace = true }
overture-schema-theme-base = { workspace = true }
overture-schema-theme-buildings = { workspace = true }
overture-schema-theme-divisions = { workspace = true }
overture-schema-theme-places = { workspace = true }
overture-schema-theme-transportation = { workspace = true }

[dependency-groups]
test = [
"overture-schema-addresses-theme",
"overture-schema-base-theme",
"overture-schema-buildings-theme",
"overture-schema-divisions-theme",
"overture-schema-places-theme",
"overture-schema-transportation-theme",
"overture-schema-theme-addresses",
"overture-schema-theme-base",
"overture-schema-theme-buildings",
"overture-schema-theme-divisions",
"overture-schema-theme-places",
"overture-schema-theme-transportation",
]

[tool.hatch.build.targets.wheel]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps addresses theme models and structures"
version = "0.1.1"
license = "MIT"
name = "overture-schema-addresses-theme"
name = "overture-schema-theme-addresses"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps base theme shared structures and models (bathymetry, infrastructure, land, land_cover, land_use, water)"
version = "0.1.1"
license = "MIT"
name = "overture-schema-base-theme"
name = "overture-schema-theme-base"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps buildings theme shared structures, building types, and building part types"
version = "0.1.1"
license = "MIT"
name = "overture-schema-buildings-theme"
name = "overture-schema-theme-buildings"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps divisions theme shared structures, division, division area and division boundary types"
version = "0.1.1"
license = "MIT"
name = "overture-schema-divisions-theme"
name = "overture-schema-theme-divisions"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps places theme with place type models"
version = "0.1.1"
license = "MIT"
name = "overture-schema-places-theme"
name = "overture-schema-theme-places"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
description = "Overture Maps transportation theme with shared structures and connector and segment types"
version = "0.1.1"
license = "MIT"
name = "overture-schema-transportation-theme"
name = "overture-schema-theme-transportation"
readme = "README.md"
requires-python = ">=3.10"

Expand Down
1 change: 1 addition & 0 deletions packages/overture-schema/changelog.d/649.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename theme packages to improve sorting and grouping characteristics.
24 changes: 12 additions & 12 deletions packages/overture-schema/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ maintainers = [
{name = "Overture Maps Schema Working Group"},
]
dependencies = [
"overture-schema-addresses-theme>=0.1.1",
"overture-schema-base-theme>=0.1.1",
"overture-schema-buildings-theme>=0.1.1",
"overture-schema-divisions-theme>=0.1.1",
"overture-schema-places-theme>=0.1.1",
"overture-schema-transportation-theme>=0.1.1",
"overture-schema-theme-addresses>=0.1.1",
"overture-schema-theme-base>=0.1.1",
"overture-schema-theme-buildings>=0.1.1",
"overture-schema-theme-divisions>=0.1.1",
"overture-schema-theme-places>=0.1.1",
"overture-schema-theme-transportation>=0.1.1",
"overture-schema-common>=0.1.1",
"pydantic>=2.12.0",
"pyyaml>=6.0.2",
Expand All @@ -27,14 +27,14 @@ Source = "https://github.com/OvertureMaps/schema"
Issues = "https://github.com/OvertureMaps/schema/issues"

[tool.uv.sources]
overture-schema-addresses-theme = { workspace = true }
overture-schema-base-theme = { workspace = true }
overture-schema-buildings-theme = { workspace = true }
overture-schema-cli = { workspace = true }
overture-schema-common = { workspace = true }
overture-schema-divisions-theme = { workspace = true }
overture-schema-places-theme = { workspace = true }
overture-schema-transportation-theme = { workspace = true }
overture-schema-theme-addresses = { workspace = true }
overture-schema-theme-base = { workspace = true }
overture-schema-theme-buildings = { workspace = true }
overture-schema-theme-divisions = { workspace = true }
overture-schema-theme-places = { workspace = true }
overture-schema-theme-transportation = { workspace = true }

[build-system]
build-backend = "hatchling.build"
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ markers = [
"baseline: golden file baseline tests",
]
pythonpath = [
"packages/overture-schema-addresses-theme/tests",
"packages/overture-schema-base-theme/tests",
"packages/overture-schema-buildings-theme/tests",
"packages/overture-schema-cli/tests",
"packages/overture-schema-codegen/tests",
"packages/overture-schema-common/tests",
"packages/overture-schema-divisions-theme/tests",
"packages/overture-schema-places-theme/tests",
"packages/overture-schema-pyspark/tests",
"packages/overture-schema-system/tests",
"packages/overture-schema-transportation-theme/tests",
"packages/overture-schema-theme-addresses/tests",
"packages/overture-schema-theme-base/tests",
"packages/overture-schema-theme-buildings/tests",
"packages/overture-schema-theme-divisions/tests",
"packages/overture-schema-theme-places/tests",
"packages/overture-schema-theme-transportation/tests",
"packages/overture-schema/tests",
]
verbosity_subtests = 0
Expand Down
Loading
Loading