chore(ogc): hide four layers from the public catalog - #871
Merged
Conversation
BDMS-977 (A16), BDMS-978 (A17) and BDMS-979 (A18) all take a layer off the public /ogcapi catalog without touching its data: * avg_tds_wells averages 1.9 observations per well, so the statistic is unreliable for half the catalog, and latest_depth_to_water_wells repeats what water_well_summary already publishes. * locations exposes 11,174 features, 11,173 of which duplicate coverage the 11 thing-type layers already give, at the cost of being one of the two largest layers served. * other_things is internal vocabulary: "Thing" is the data-model name for a monitoring point and "other" names no feature class. Five features. The first three are config entries, so they come out of core/pygeoapi-config.yml and stay in pygeoapi-config-internal.yml. other_things is generated from THING_COLLECTIONS, which feeds both mounts, so it gets an internal_only marker that _thing_collections_block honors and only the internal _write_config call opts into. All backing relations are retained. /ogcapi-internal still publishes all four to staff GIS clients, which is the internal use A18 asked us to check for before dropping ogc_other_things, so no migration here. The A1 and A13 scenario tables lose the rows a public client can no longer request; the SQL-level A1 scenarios still cover those views' release_status filter. A16/A17/A18 scenarios get step definitions and the @production tag so CI enforces them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Coverage✅ 79.12% total — gate is 75%. Coverage for the Python files changed in this PR
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes four OGC API collections from the public /ogcapi catalog while keeping their backing relations and continuing to serve them to staff via /ogcapi-internal, aligning the public catalog with reliability/usability goals without data removal.
Changes:
- Removed
locations,avg_tds_wells, andlatest_depth_to_water_wellsfrom the publiccore/pygeoapi-config.ymlwhile retaining them in the internal catalog. - Added an
internal_onlymarker forother_thingsinTHING_COLLECTIONS, and taught config generation to include those collections only for the internal mount. - Updated pytest + Behave coverage and adjusted README OGC examples away from the removed
locationscollection.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
core/pygeoapi.py |
Adds internal_only handling in thing-collection config generation and enables it for /ogcapi-internal. |
core/pygeoapi-config.yml |
Removes the three specified collections from the public pygeoapi resources list. |
tests/test_ogc.py |
Asserts the four collections are absent from the public /ogcapi/collections response and removes the now-irrelevant locations bbox test. |
tests/test_pygeoapi_mount.py |
Verifies the four collections are absent on the public mount and present on the internal mount. |
tests/features/ogc-cleanup-sprint1.feature |
Updates scenario tables/tags and consolidates A18 retention expectations for internal usage. |
tests/features/steps/ogc-cleanup-sprint1.py |
Adds step definitions validating public catalog absence and backing-relation retention. |
README.md |
Retargets OGC example requests from locations to water_wells. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Closes BDMS-977 (A16), BDMS-978 (A17), BDMS-979 (A18).
What
Three tickets, one shape: take a layer off the public
/ogcapicatalog without touching its data.avg_tds_wellslatest_depth_to_water_wellswater_well_summarylocationsother_thingsHow
The first three are config entries, so they come out of
core/pygeoapi-config.ymland stay incore/pygeoapi-config-internal.yml.other_thingsis generated fromTHING_COLLECTIONS, which feeds both mounts. It gets aninternal_onlymarker that_thing_collections_blockhonors and only the internal_write_configcall opts into — so the public mount drops it and/ogcapi-internalkeeps it.No migration. Every backing relation is retained, and
/ogcapi-internalstill publishes all four to staff GIS clients. That internal usage is exactly what A18 asked us to check for before droppingogc_other_things, so bothogc_other_thingsandogc_internal_other_thingsstay.Acceptance criteria
avg_tds_wells/latest_depth_to_water_wells/locationsentries removed fromcore/pygeoapi-config.ymlother_thingsabsent from the public catalog/ogcapi/collections(asserted intests/test_ogc.pyandtests/test_pygeoapi_mount.py)locationtable, and bothother_thingsviews retainedTests
tests/test_ogc.py::test_ogc_collectionsasserts the four ids are gone; the dead skippedtest_ogc_locations_items_bboxis removed with the collection it targeted.tests/test_pygeoapi_mount.py::test_hidden_layers_are_internal_only— absent on public, present on internal.@productionscenario table drops the four rows a public client can no longer request (the SQL-level A1 scenarios still cover those views'release_statusfilter); the dormant A13 tables dropother_things. A18's two conditional scenarios collapse into one retention scenario recording the internal-use finding. A16/A17/A18 gain step definitions and the@productiontag, so CI enforces them.locations; retargeted atwater_wells.Verification
uv run pytest --ignore=tests/transfers→ 1055 passed, 80 skipped, 6 xpasseduv run behave tests/features/ogc-cleanup-sprint1.feature --tags="@backend and @production and not @skip"→ 20 passed, 0 failedpre-commit(black, flake8) cleangeojson-response,thing-query-parameters,thing-type-path-parameters,transducer-data-response,location-notesandwell-notes. Pre-existing — reproduced on a clean tree with these changes stashed.Deploy note
Removing a collection changes the public catalog for external consumers. The data is untouched and every layer remains available on
/ogcapi-internal.🤖 Generated with Claude Code