-
Notifications
You must be signed in to change notification settings - Fork 13
[WIP] Add Bbox primitive directly to Feature next to geometry #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,34 +1,20 @@ | ||||
| import textwrap | ||||
| from typing import Annotated, Generic, TypeVar | ||||
|
|
||||
| from pydantic import ( | ||||
| BaseModel, | ||||
| ConfigDict, | ||||
| Field, | ||||
| GetJsonSchemaHandler, | ||||
| model_validator, | ||||
| ) | ||||
| from pydantic.json_schema import JsonSchemaValue | ||||
| from pydantic_core import core_schema | ||||
| from typing_extensions import Self | ||||
|
|
||||
| from overture.schema.system.feature import Feature | ||||
| from overture.schema.system.field_constraint import UniqueItemsConstraint | ||||
| from overture.schema.system.model_constraint import no_extra_fields | ||||
| from overture.schema.system.primitive import ( | ||||
| Geometry, | ||||
| ) | ||||
| from overture.schema.system.primitive import BBox, Geometry | ||||
| from overture.schema.system.ref import Id, Identified | ||||
| from overture.schema.system.string import ( | ||||
| CountryCodeAlpha2, | ||||
| ) | ||||
| from overture.schema.system.string import CountryCodeAlpha2 | ||||
| from pydantic import BaseModel, ConfigDict, Field, GetJsonSchemaHandler, model_validator | ||||
| from pydantic.json_schema import JsonSchemaValue | ||||
| from pydantic_core import core_schema | ||||
| from typing_extensions import Self | ||||
|
|
||||
| from .enums import PerspectiveMode | ||||
| from .sources import Sources | ||||
| from .types import ( | ||||
| FeatureVersion, | ||||
| Level, | ||||
| ) | ||||
| from .types import FeatureVersion, Level | ||||
|
|
||||
| ThemeT = TypeVar("ThemeT", bound=str) | ||||
| TypeT = TypeVar("TypeT", bound=str) | ||||
|
|
@@ -49,6 +35,7 @@ class OvertureFeature(Identified, Feature, Generic[ThemeT, TypeT]): | |||
| # this is an enum in the JSON Schema, but that prevents OvertureFeature from being extended | ||||
| type: TypeT | ||||
| geometry: Geometry | ||||
| bbox: BBox | ||||
|
||||
| bbox: BBox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import grouping/order here appears to violate the repo’s Ruff isort convention (third-party imports before first-party). In other core modules (e.g.,
packages/overture-schema-core/src/overture/schema/core/cartography.py:5-12),pydanticis imported beforeoverture.*. Reorder these imports into stdlib / third-party / first-party blocks to avoidruff(I001) failures.