Skip to content

docs(waterdata): point get_samples to get_codes(), not nonexistent *_lookup() helpers#303

Draft
thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:docs/waterdata-samples-code-lookups
Draft

docs(waterdata): point get_samples to get_codes(), not nonexistent *_lookup() helpers#303
thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:docs/waterdata-samples-code-lookups

Conversation

@thodson-usgs
Copy link
Copy Markdown
Collaborator

Problem

The get_samples docstring 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 hits AttributeError. The real code-table mechanism is get_codes(code_service).

Fix

Repoint each parameter to the correct get_codes(...) service (each verified against the live API):

parameter get_codes(...) service
activityMediaName "samplemedia"
characteristicGroup "characteristicgroup"
characteristic "characteristics"
usgsPCode "characteristics" (the parameterCode column)
stateFips "states"
countyFips "counties"
siteTypeCode / siteTypeName "sitetype"

Verification (live API)

get_codes(...) returns data for every referenced service — e.g. get_codes("characteristics") carries a parameterCode column (the usgsPCode values), get_codes("sitetype") has typeCode/typeName, get_codes("states") has fipsCode. Docstring-only change; ruff clean.

🤖 Generated with Claude Code

…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>
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.

1 participant