Skip to content

Commit 8fd4534

Browse files
vcschappsethfitz
authored andcommitted
Rename -core package to -common to remove a source of confusion
Signed-off-by: schapper <schapper@amazon.com>
1 parent 7e188f0 commit 8fd4534

71 files changed

Lines changed: 191 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/scripts/package-versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def level(package: str) -> int:
6161
"""
6262
if package == "overture-schema-system":
6363
return 0
64-
elif package in ["overture-schema-core"]:
64+
elif package in ["overture-schema-common", "overture-schema-core"]:
6565
return 1
6666
elif re.fullmatch(r'overture-schema-.*-theme', package) or package in ["overture-schema", "overture-schema-cli", "overture-schema-codegen", "overture-schema-annex"]:
6767
return 2

PYDANTIC_GUIDE.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This guide helps you work with Overture Maps Pydantic schemas - Python models th
55
## Table of Contents
66

77
- [Quick Start](#quick-start)
8-
- [Core Concepts](#core-concepts)
8+
- [Basic Concepts](#basic-concepts)
99
- [Models and Inheritance](#models-and-inheritance)
1010
- [Field Types](#field-types)
1111
- [Field Enhancement](#field-enhancement)
@@ -40,8 +40,8 @@ from enum import Enum
4040
# Pydantic essentials
4141
from pydantic import BaseModel, Field
4242

43-
# Overture core models
44-
from overture.schema.core import OvertureFeature
43+
# Overture common models
44+
from overture.schema.common import OvertureFeature
4545
from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
4646

4747
# Validation system
@@ -54,7 +54,7 @@ from overture.schema.system.string import (
5454
NoWhitespaceString,
5555
StrippedString,
5656
)
57-
from overture.schema.core.types import ConfidenceScore
57+
from overture.schema.common.types import ConfidenceScore
5858
from overture.schema.system.string import LanguageTag
5959

6060
# Numeric primitives (use these instead of int/float)
@@ -100,7 +100,7 @@ class MyCustomType(BaseModel):
100100
```python
101101
from typing import Annotated, Literal
102102
from pydantic import Field
103-
from overture.schema.core import OvertureFeature
103+
from overture.schema.common import OvertureFeature
104104
from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
105105

106106
class MyFeature(OvertureFeature[Literal["my_theme"], Literal["my_type"]]):
@@ -119,7 +119,7 @@ class MyFeature(OvertureFeature[Literal["my_theme"], Literal["my_type"]]):
119119

120120
---
121121

122-
## Core Concepts
122+
## Basic Concepts
123123

124124
### Models and Inheritance
125125

@@ -151,7 +151,7 @@ class Address(BaseModel):
151151

152152
```python
153153
from typing import Literal
154-
from overture.schema.core import OvertureFeature
154+
from overture.schema.common import OvertureFeature
155155
from overture.schema.system.primitive import float64
156156

157157
class Building(OvertureFeature[Literal["buildings"], Literal["building"]]):
@@ -177,9 +177,9 @@ By specifying `OvertureFeature[Literal["buildings"], Literal["building"]]`, you'
177177

178178
```python
179179
from typing import Literal
180-
from overture.schema.core import OvertureFeature
181-
from overture.schema.core.models import Stacked
182-
from overture.schema.core.names import Named
180+
from overture.schema.common import OvertureFeature
181+
from overture.schema.common.models import Stacked
182+
from overture.schema.common.names import Named
183183
from overture.schema.system.primitive import float64
184184

185185
class Building(OvertureFeature[Literal["buildings"], Literal["building"]], Named, Stacked):
@@ -647,7 +647,7 @@ The fundamental pattern is a direct reference where one feature "points to" anot
647647
```python
648648
from typing import Annotated, Literal
649649
from pydantic import Field
650-
from overture.schema.core import OvertureFeature
650+
from overture.schema.common import OvertureFeature
651651
from overture.schema.system.ref import Id, Reference, Relationship
652652

653653
# COMPOSITION — part points to its whole
@@ -772,7 +772,7 @@ division_id: Id
772772
```python
773773
from typing import Annotated, Literal
774774
from pydantic import Field
775-
from overture.schema.core import OvertureFeature
775+
from overture.schema.common import OvertureFeature
776776

777777
# Base class with common fields
778778
class TransportationSegment(OvertureFeature[Literal["transportation"], Literal["segment"]]):
@@ -999,7 +999,7 @@ class Contact(BaseModel):
999999

10001000
Organize code by scope and avoid circular imports:
10011001

1002-
**Cross-theme shared**: `overture-schema-core` package
1002+
**Cross-theme shared**: `overture-schema-common` package
10031003

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

@@ -1028,7 +1028,7 @@ from enum import Enum
10281028
from pydantic import BaseModel, ConfigDict, Field
10291029

10301030
# Cross-theme imports
1031-
from overture.schema.core import OvertureFeature
1031+
from overture.schema.common import OvertureFeature
10321032
from overture.schema.system.field_constraint import UniqueItemsConstraint
10331033
from overture.schema.system.model_constraint import no_extra_fields
10341034

@@ -1088,7 +1088,7 @@ properties:
10881088
**Pydantic approach:**
10891089
10901090
```python
1091-
# In overture-schema-core/src/overture/schema/core/models.py
1091+
# In overture-schema-common/src/overture/schema/common/models.py
10921092
@no_extra_fields
10931093
class Address(BaseModel):
10941094
"""A postal address."""
@@ -1131,7 +1131,7 @@ allOf:
11311131
**Pydantic equivalent** uses **mixin classes**:
11321132

11331133
```python
1134-
# In core/models.py
1134+
# In common/models.py
11351135
class Named(BaseModel):
11361136
"""Properties defining the names of a feature."""
11371137
names: Names | None = None
@@ -1203,7 +1203,7 @@ class MyCustomType(BaseModel):
12031203
```python models.py
12041204
from typing import Annotated, Literal
12051205
from pydantic import Field
1206-
from overture.schema.core import OvertureFeature
1206+
from overture.schema.common import OvertureFeature
12071207
from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
12081208
12091209
class MyFeature(OvertureFeature[Literal["my_theme"], Literal["my_type"]]):
@@ -1262,7 +1262,7 @@ class Contact(BaseModel):
12621262
```python models.py
12631263
from typing import Annotated, Literal
12641264
from pydantic import Field
1265-
from overture.schema.core import OvertureFeature
1265+
from overture.schema.common import OvertureFeature
12661266
from overture.schema.system.primitive import float64
12671267
from overture.schema.system.ref import Id, Reference, Relationship
12681268
@@ -1346,7 +1346,7 @@ class Status(str, Enum):
13461346
from typing import Annotated, Literal
13471347
from enum import Enum
13481348
from pydantic import Field
1349-
from overture.schema.core import OvertureFeature
1349+
from overture.schema.common import OvertureFeature
13501350
from overture.schema.system.field_constraint import UniqueItemsConstraint
13511351
from overture.schema.system.model_constraint import no_extra_fields
13521352
from overture.schema.system.primitive import int32, float64

README.pydantic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ This workspace contains the following packages:
8888

8989
- **`overture-schema`** - Main entrypoint package that aggregates all types for
9090
convenient usage
91-
- **`overture-schema-core`** - Overture-specific models shared across themes: base
91+
- **`overture-schema-common`** - Overture-specific models shared across themes: base
9292
feature class, scoping framework, names, sources, and cartographic hints
9393
- **`overture-schema-system`** - Portable primitive types, constraints, and a
9494
GeoJSON-aware base model for building Pydantic schemas that serialize to
@@ -200,7 +200,7 @@ buildings = filter_models(
200200
```
201201

202202
Tags are produced by *tag providers* registered on the `overture.tag_providers`
203-
entry-point group. The `system` and `core` packages ship the built-in providers
203+
entry-point group. The `system` and `common` packages ship the built-in providers
204204
(`feature`, `overture`, `overture:theme=*`); third parties can register their own
205205
to attach custom tags during discovery. See the [`overture-schema-system`
206206
README](packages/overture-schema-system/README.md#tagging) for tag format,

packages/overture-schema-addresses-theme/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ maintainers = [
33
{name = "Overture Maps Schema Working Group"},
44
]
55
dependencies = [
6-
"overture-schema-core",
6+
"overture-schema-common",
77
"overture-schema-system",
88
"pydantic>=2.12.0",
99
]
@@ -20,7 +20,7 @@ Source = "https://github.com/OvertureMaps/schema"
2020
Issues = "https://github.com/OvertureMaps/schema/issues"
2121

2222
[tool.uv.sources]
23-
overture-schema-core = { workspace = true }
23+
overture-schema-common = { workspace = true }
2424
overture-schema-system = { workspace = true }
2525

2626

packages/overture-schema-addresses-theme/src/overture/schema/addresses/address.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from pydantic import BaseModel, ConfigDict, Field
99

10-
from overture.schema.core import (
10+
from overture.schema.common import (
1111
OvertureFeature,
1212
)
1313
from overture.schema.system.model_constraint import no_extra_fields

packages/overture-schema-annex/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
maintainers = [
33
{name = "Overture Maps Schema Working Group"},
44
]
5-
dependencies = ["overture-schema-core", "overture-schema-system", "pydantic>=2.12.0"]
5+
dependencies = ["overture-schema-common", "overture-schema-system", "pydantic>=2.12.0"]
66
description = "Add your description here"
77
dynamic = ["version"]
88
license = "MIT"
@@ -11,7 +11,7 @@ readme = "README.md"
1111
requires-python = ">=3.10"
1212

1313
[tool.uv.sources]
14-
overture-schema-core = { workspace = true }
14+
overture-schema-common = { workspace = true }
1515
overture-schema-system = { workspace = true }
1616

1717
[project.urls]

packages/overture-schema-base-theme/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ maintainers = [
33
{name = "Overture Maps Schema Working Group"},
44
]
55
dependencies = [
6-
"overture-schema-core",
6+
"overture-schema-common",
77
"overture-schema-system",
88
"pydantic>=2.12.0",
99
]
@@ -20,7 +20,7 @@ Source = "https://github.com/OvertureMaps/schema"
2020
Issues = "https://github.com/OvertureMaps/schema/issues"
2121

2222
[tool.uv.sources]
23-
overture-schema-core = { workspace = true }
23+
overture-schema-common = { workspace = true }
2424
overture-schema-system = { workspace = true }
2525

2626

packages/overture-schema-base-theme/src/overture/schema/base/bathymetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
from pydantic import ConfigDict, Field
88

9-
from overture.schema.core import (
9+
from overture.schema.common import (
1010
OvertureFeature,
1111
)
12-
from overture.schema.core.cartography import CartographicallyHinted
12+
from overture.schema.common.cartography import CartographicallyHinted
1313
from overture.schema.system.primitive import (
1414
Geometry,
1515
GeometryType,

packages/overture-schema-base-theme/src/overture/schema/base/infrastructure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from pydantic import ConfigDict, Field
1010

1111
from overture.schema.base._common import Height, SourcedFromOpenStreetMap
12-
from overture.schema.core import (
12+
from overture.schema.common import (
1313
OvertureFeature,
1414
)
15-
from overture.schema.core.models import Stacked
16-
from overture.schema.core.names import Named
15+
from overture.schema.common.models import Stacked
16+
from overture.schema.common.names import Named
1717
from overture.schema.system.primitive import (
1818
Geometry,
1919
GeometryType,

packages/overture-schema-base-theme/src/overture/schema/base/land.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from pydantic import ConfigDict, Field
1010

1111
from overture.schema.base._common import Elevation, SourcedFromOpenStreetMap
12-
from overture.schema.core import (
12+
from overture.schema.common import (
1313
OvertureFeature,
1414
)
15-
from overture.schema.core.models import Stacked
16-
from overture.schema.core.names import Named
15+
from overture.schema.common.models import Stacked
16+
from overture.schema.common.names import Named
1717
from overture.schema.system.primitive import (
1818
Geometry,
1919
GeometryType,

0 commit comments

Comments
 (0)