Skip to content

Keep selected camel-case OGC properties in normalized results - #438

Closed
qorud02 wants to merge 2 commits into
DOI-USGS:mainfrom
qorud02:codex/ogc-requested-property-normalization
Closed

qorud02 wants to merge 2 commits into
DOI-USGS:mainfrom
qorud02:codex/ogc-requested-property-normalization

Conversation

@qorud02

@qorud02 qorud02 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

An explicit OGC properties=["sampleTime"] request currently returns no sample_time column when the response uses camel-case fields. _finalize_ogc normalizes the response column, but _arrange_cols still selects using the original property name.

Normalize the requested names through the same helper before selecting output columns. The existing id alias and geometry handling stay in place, and the caller's property list is unchanged. Add an offline regression test that checks the returned value and column name.

Validation on the current upstream main: python -m pytest tests/waterdata_utils_test.py -q passed 112 tests (4 environment-dependent skips), and python -m pytest tests/waterdata_test.py -q passed 115 tests (1 deselected). Fixes #437.

@thodson-usgs

Copy link
Copy Markdown
Collaborator

Thank you for the clear report and the fix. I'm closing this because no service the package calls returns camelCase properties. On 2026-10-13 the queryables of all 39 Water Data OGC collections and all 6 NGWMN collections were snake_case, so the rename in _finalize_ogc changes nothing in a real call. If a service with camelCase properties is added, the fix will be a dialect field in its adapter (ADR 0014, #448) rather than more normalization in the shared shaping code. That would also keep one spelling for callers: the names they pass in properties would be the names they get back.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selected camel-case OGC properties disappear after column normalization

2 participants