docs(waterdata): point get_samples to get_codes(), not nonexistent *_lookup() helpers#303
Draft
thodson-usgs wants to merge 1 commit into
Draft
Conversation
…okup() The get_samples docstring told users 8 times to "Check the `activityMediaName_lookup()` / `characteristicGroup_lookup()` / ... function in this module" — but no such functions exist, so following the docs raises AttributeError. The actual code-table mechanism is get_codes(code_service). Repointed each parameter to the right service (all verified against the live API): activityMediaName -> samplemedia, characteristicGroup -> characteristicgroup, characteristic -> characteristics, usgsPCode -> characteristics (the parameterCode column), stateFips -> states, countyFips -> counties, siteTypeCode/siteTypeName -> sitetype. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
get_samplesdocstring tells users 8 times to "Check the<name>_lookup()function in this module" —activityMediaName_lookup(),characteristicGroup_lookup(),characteristic_lookup(),stateFips_lookup(),countyFips_lookup(),siteType_lookup(). None of these functions exist anywhere in the package, so a user who follows the docstring hitsAttributeError. The real code-table mechanism isget_codes(code_service).Fix
Repoint each parameter to the correct
get_codes(...)service (each verified against the live API):get_codes(...)serviceactivityMediaName"samplemedia"characteristicGroup"characteristicgroup"characteristic"characteristics"usgsPCode"characteristics"(theparameterCodecolumn)stateFips"states"countyFips"counties"siteTypeCode/siteTypeName"sitetype"Verification (live API)
get_codes(...)returns data for every referenced service — e.g.get_codes("characteristics")carries aparameterCodecolumn (theusgsPCodevalues),get_codes("sitetype")hastypeCode/typeName,get_codes("states")hasfipsCode. Docstring-only change;ruffclean.🤖 Generated with Claude Code