Skip to content

fix(core/pygeoapi): add feature provider to Water Chemistry & Water Levels (BDMS-1536) - #1046

Open
TylerAdamMartinez wants to merge 2 commits into
stagingfrom
BDMS-1536-Bug-When-I-click-the-CSV-button-for-Water-Chemistry-I-get-this-error-Could-not-expo
Open

TylerAdamMartinez wants to merge 2 commits into
stagingfrom
BDMS-1536-Bug-When-I-click-the-CSV-button-for-Water-Chemistry-I-get-this-error-Could-not-expo

Conversation

@TylerAdamMartinez

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • CSV exports for Water Chemistry fail with HTTP 400: Invalid provider type.
  • The /ogcapi-internal/collections/{collection}/items endpoint requires a feature provider, but Water Chemistry and Water Levels previously registered only EDR providers.
  • The frontend relies on the GeoJSON /items response to generate CSV downloads.

How

Implementation summary: the following was changed / added / removed:

  • Added feature providers alongside existing EDR providers for Water Chemistry and Water Levels.
  • Extended DescribedPostgreSQLProvider to construct GeoJSON point geometries from longitude and latitude fields when no geometry column exists.

Author Checklist

  • Changes are limited to the intended scope.
  • Tests were added or updated where appropriate.
  • Relevant tests and lint checks pass.
  • No secrets, credentials, or sensitive data were publicly exposed.
  • Documentation was updated where necessary.

Reviewer Checklist

  • Verify CSV exports for Water Chemistry and Water Levels.
  • Confirm /items returns valid GeoJSON with point geometry and expected properties.
  • Verify limit/offset pagination and bounding-box filtering.
  • Confirm internal authentication and public publication filtering remain enforced.
  • Confirm existing EDR endpoints continue functioning.

Notes

Any special considerations, known limitations, risks, workarounds, or follow-up work to note?

  • The fix is implemented but has not been verified end-to-end.
  • Preview CSV downloads remain untested.
  • Feature providers reuse existing database views; no frontend changes are needed.

@TylerAdamMartinez TylerAdamMartinez self-assigned this Nov 9, 2026
@TylerAdamMartinez TylerAdamMartinez added the bug Something isn't working label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

✅ 81.76% total — gate is 75%.

Coverage for the Python files changed in this PR
Name Stmts Miss Cover Missing
core/feature_provider.py 39 12 69% 54-58, 68-74, 80-87
core/pygeoapi.py 161 20 88% 318, 322, 331, 336, 355, 362, 387-390, 551, 556, 644, 680, 698, 705, 707, 727, 729, 741
TOTAL 200 32 84%

@TylerAdamMartinez TylerAdamMartinez changed the title fix(core/pygeoapi): add feature provider to Water Chemistry & Water Levels fix(core/pygeoapi): add feature provider to Water Chemistry & Water Levels (BDMS-1536) Nov 9, 2026
Comment thread core/pygeoapi.py Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants