Skip to content

[BUG](system) Export Feature from the package root - #738

Merged
Seth Fitzsimmons (sethfitz) merged 1 commit into
OvertureMaps:mainfrom
sethfitz:export-system-feature
Sep 15, 2026
Merged

Seth Fitzsimmons (sethfitz) merged 1 commit into
OvertureMaps:mainfrom
sethfitz:export-system-feature

Conversation

@sethfitz

Copy link
Copy Markdown
Collaborator

Description

overture.schema.common exports OvertureFeature at its package root. overture.schema.system exported only its submodules and create_model, so the parallel name did not resolve:

from overture.schema.common import OvertureFeature  # works
from overture.schema.system import Feature  # ImportError
from overture.schema.system.feature import Feature  # the only working form

AUTHORING.md points third-party authors at the name that did not exist: "You don't have to build on OvertureFeature — subclass system.Feature directly for a GeoJSON-serializing model with none of the Overture conventions." Anyone taking that literally hits an ImportError on their first line.

This adds from .feature import Feature and "Feature" to __all__, matching how common exports FeatureVersion, OvertureFeature, ThemeT and TypeT from its own feature submodule. The deep import keeps working; nothing else changes.

Scope is Feature alone. Geometry and BBox under geometric, and Id under ref, sit in the same position — how wide the system root's surface should be is a separate question, and #737 says so.

Reference

  1. Closes [BUG](system) Feature is not exported from overture.schema.system, unlike OvertureFeature from common #737.

Testing

test_feature_is_exported_from_package_root asserts both the attribute and its presence in __all__. Reverting the __init__.py change alone fails it with AttributeError: module 'overture.schema.system' has no attribute 'Feature'; it is the only added test, and it is a real gate rather than a behaviour-preservation guard.

make lint-only, make mypy-only, make doctest-only and the full suite pass.

Checklist

Checklist of tasks commonly-associated with schema pull requests. Please review the relevant checklists and ensure you do all the tasks that are required for the change you made.

  1. Add relevant examples.
  2. Add relevant counterexamples.
  3. Update any counterexamples that became obsolete. For example, if a counterexample uses property A but is not intended to test property A's validity, and you made a schema change that invalidates property A in that counterexample, fix the counterexample to align it with your schema change.
  4. Update in-schema documentation using plain English written in complete sentences, if an update is required.
  5. Update Docusaurus documentation, if an update is required.
  6. Review change with Overture technical writer to ensure any advanced documentation needs will be taken care of, unless the change is trivial and would not affect the documentation.

Documentation website

Update the hyperlink below to put the pull request number in.

[Docs preview for this PR.](https://dfhx9f55j8eg5.cloudfront.net/pr/<PUT THE PR # HERE>)

`overture.schema.common` exports `OvertureFeature`, but
`overture.schema.system` exported only its submodules and
`create_model`, so `from overture.schema.system import Feature` raised
ImportError while AUTHORING.md tells authors to subclass
`system.Feature` directly.

Closes OvertureMaps#737

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>

@lowlydba John McCall (lowlydba) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sethfitz
Seth Fitzsimmons (sethfitz) merged commit b574b73 into OvertureMaps:main Sep 15, 2026
24 checks passed
@sethfitz
Seth Fitzsimmons (sethfitz) deleted the export-system-feature branch September 15, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change type - minor 🤏 Minor schema change. See https://lf-overturemaps.atlassian.net/wiki/x/GgDa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG](system) Feature is not exported from overture.schema.system, unlike OvertureFeature from common

3 participants