Repository navigation
fix(waterdata): keep sublocation_identifier from shifting positional arguments - #447
Merged
thodson-usgs merged 1 commit intoOct 12, 2026
Conversation
…arguments Follow-ups from review of DOI-USGS#436, which is unreleased: - Move sublocation_identifier to the end of the get_field_measurements and get_field_measurements_metadata signatures. Inserted mid-signature, it shifted every later positional argument: a positional skip_geometry or properties would have been sent as a sublocation filter. - Test against real features from USGS-05435943 (Backup, HWM, Primary) and assert the values; the shared fixture's site records no sublocation, so the old test only checked a hand-added null column. - Describe the parameter in get_time_series_metadata and get_combined_metadata, and use observed values in the examples. - Date the NEWS entry by its land date (10/07), unwrap it, and note that the field already worked through **queryables. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HBt3Ee7eneKtdKQWq2T3YK
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.
Follow-ups from a review of #436 after it merged. #436 is not in a release yet (v1.4.0 predates it), so moving the parameter breaks no released caller.
sublocation_identifiermid-signature inget_field_measurements(beforeskip_geometry) andget_field_measurements_metadata(beforeproperties). Every later positional argument shifted, so a positionalskip_geometryorpropertieswould have been sent as a sublocation filter. The parameter now comes last, before**queryables.get_continuous'smethod_category(fix(waterdata): accept the continuous method_category queryable #423) has the same problem but shipped in v1.4.0, so it is left alone.Backup,HWMandPrimary(newtests/data/waterdata_sublocation_fixtures.json), and asserts those values.get_time_series_metadataandget_combined_metadatalistedsublocation_identifierwith no description; it is described now, with free-text values observed there (YSI DOWN,30 CM). The field-measurement examples now use observed values;UPSTREAMwas not among them.**queryables.Not done: an offline test comparing each getter's parameters with
tests/data/waterdata_queryables.json. Queryables are filters and not all are meant to be named parameters (monitoring-locations has about 240), so the existing/schemacolumns check from #424 is the better place for this.Overlap with #446
#446 rewrites the list-case assertion in
test_sublocation_identifier_is_sent_as_a_filter, from a comma join to a CQL2in. This PR changes the adjacent lines, so whichever PR merges second needs a trivial rebase.Verification
get_field_measurements(monitoring_location_id="USGS-05435943", sublocation_identifier="HWM")returns 2 rows, andget_field_measurements_metadata(..., sublocation_identifier="Backup")returns 1.🤖 Generated with Claude Code
https://claude.ai/code/session_01HBt3Ee7eneKtdKQWq2T3YK