Remove Defunct NWIS Functions#222
Merged
thodson-usgs merged 2 commits intoDOI-USGS:mainfrom Apr 3, 2026
Merged
Conversation
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.
Recreate PR #216: Remove Defunct NWIS Functions
This PR resubmits the changes from PR #216 which removes four defunct NWIS legacy functions (
get_gwlevels,get_discharge_measurements,get_pmcodes, andget_water_use) by replacing them withNameErrorexceptions that point users to the modernizedwaterdataequivalents.The original PR #216 was superseded by linting changes (PR #219) on the
mainbranch before being merged, which caused conflicts. This PR correctly recreates the exact logical changes from PR #216 directly on top of the newly lintedmainbranch, ensuring we maintainruffcompliance while formally deprecating the defunct functions as planned.All related tests and defunct data files have been removed, and the README has been updated to reflect the new API announcements identically to PR #216.
Notebook Modernization
In addition to the core API changes, a comprehensive review and modernization of 16 demo notebooks (including all legacy
hydroshareexamples) was performed:nwis.get_dv(),nwis.get_iv(), andnwis.get_info()calls were upgraded to their modernwaterdataequivalents.get_water_use,get_pmcodes) were commented out or replaced with modern alternatives (get_reference_table) across all demos (e.g.,R Python Vignette,WaterUsesuite).jupyter nbconvertin the local.venvenvironment to ensure they remain functional and generate correct plots with the new OGC long-format data schema.nb-cleanto strip execution outputs and counts, ensuring a clean version-controlled state.