chore!: remove the nadp module and the deprecated samples shim (1.2.0)#330
Merged
thodson-usgs merged 1 commit intoJun 23, 2026
Merged
Conversation
Ahead of the 1.2.0 release (which allows breaking changes), remove two deprecated modules and every reference to them except the changelog: - `dataretrieval.nadp` — deprecated 2026-05-01. NADP is not a USGS data source; retrieve NADP data directly from https://nadp.slh.wisc.edu/. - `dataretrieval.samples` — the `get_usgs_samples` shim that only forwarded to `waterdata.get_samples()`. Use `waterdata.get_samples()` directly. Deleted: both modules, `tests/nadp_test.py`, and their reference doc pages `docs/source/reference/{nadp,samples}.rst`. Updated references: the `nadp` API-toctree entry, the two NADP rows in the data-portals table, the `nadp`/`samples` entries in `dataretrieval/__init__` (imports, `__all__`, the module-list docstring), the `nadp` mentions in the shared `exceptions`/`utils` docstrings, and the `nadp_test` note in AGENTS.md. A NEWS.md entry records the removal. The modern `waterdata.get_samples()` / `get_samples_summary()` and their demo notebooks are untouched — only the deprecated `samples` shim is removed. (Rebased onto main: the `ngwmn` module + OGC engine added in DOI-USGS#324 are kept; the `samples.rst` autodoc page main added for the now-removed module is dropped.) BREAKING CHANGE: `import dataretrieval.nadp` and `import dataretrieval.samples` now raise ModuleNotFoundError; `samples.get_usgs_samples` is gone — use `waterdata.get_samples()`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sjb14HkwuCydKSKMsaXsgd
8c0c793 to
5633e2c
Compare
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.
Summary
Ahead of the 1.2.0 release (which allows breaking changes), this removes two long-deprecated modules and every reference to them except the changelog.
dataretrieval.nadp— deprecated 2026-05-01 (scheduled for removal on/after 2026-11-01). NADP is not a USGS data source; retrieve NADP data directly from https://nadp.slh.wisc.edu/.dataretrieval.samples— theget_usgs_samplesshim that only emitted aDeprecationWarningand forwarded to the modern getter. Usewaterdata.get_samples()instead.The modern
waterdata.get_samples()/get_samples_summary()and their demo notebooks are untouched — only the deprecatedsamplesshim is removed.Changes
Deleted
dataretrieval/nadp.py,dataretrieval/samples.pytests/nadp_test.py(was module-skipped)docs/source/reference/nadp.rstReference cleanup
dataretrieval/__init__.py— removednadp/samplesfrom the eager imports,__all__, and the module-list docstring.dataretrieval/exceptions.py,dataretrieval/utils.py— droppednadpfrom the "every service module" / "shared by" docstrings.docs/source/reference/index.rst— removed thenadptoctree entry.docs/source/userguide/dataportals.rst— removed the two NADP network rows (National Trends Network, Mercury Deposition Network); kept the USGS Samples portal row (still served bywaterdata.get_samples).AGENTS.md— removed thetests/nadp_test.pynote.NEWS.md— added a dated 1.2.0 breaking-change entry; existing historical NADP/samples changelog lines left intact (per "remove all references except the changelog").Breaking change
import dataretrieval.nadpandimport dataretrieval.samplesnow raiseModuleNotFoundError;samples.get_usgs_samplesis gone. Migrate samples callers towaterdata.get_samples().Verification
import dataretrievalis clean and__all__no longer listsnadp/samples;dataretrieval.nadp/dataretrieval.samplesraiseModuleNotFoundError, whilewqp/waterdata(incl.get_samples) still import.nadpor the deprecatedsamplesmodule (changelog excepted) — verified bygit grep.ruff+mypy --strictclean; 492 tests collect with no import errors.🤖 Generated with Claude Code