Repository navigation
feat(research): import reviewed administrative boundaries - #186
Merged
Merged
Conversation
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.
Research's persistent area store could not resolve reviewed districts/states imported by an operator: existing importers are municipality-only, and the database constraint did not allow
state.Add
python -m app.research.administrative_areas plan|apply manifest.json. The separate workflow reuses the existing Manifest, Geocoder boundary resolver and operator privilege checks. It validates the whole batch before an atomic upsert, rejects municipality roles and conflicting stored identities, and rejects positive-area overlaps only within the same level. Plan runs read-only. Existing municipality importers and Research resolution/execution remain unchanged.The current Geocoder does not expose the storage-required region code and raw OSM admin level; these are explicit reviewed manifest fields, never classification heuristics. Examples contain verified Schleswig-Holstein and eleven rural-district relation identities. Municipality keys/population remain null. Completeness metadata is not promoted into a persistent inventory guarantee.
Migration 0019 adds
stateto the existing check constraint. No backfill, source changes or new grants. Downgrade refuses existing state rows. Pydantic/Zod/OpenAPI area enums agree. Operator docs include exact protected-environment plan/apply commands; no deployment/runtime auto-import.Validation:
Base: 5f5beb3.