Skip to content

Commit 29d74b1

Browse files
thodson-usgsclaude
andcommitted
docs: fix WQP README example unpacking and stale install instructions
README WQP examples assigned the (DataFrame, metadata) tuple to a single name, so `len(sites)` / `len(results)` printed 2 (the tuple length) instead of the row count. Unpack to `sites, metadata = ...` / `results, metadata = ...` (verified live: prints 25573 sites / 163 measurements). docs/source/meta/installing.rst referenced requirements.txt and requirements-dev.txt, which no longer exist — dependencies moved to pyproject.toml. Point the intro at [project.dependencies] and [project.optional-dependencies], replace the dev-install step with `pip install -e ".[test,doc,nldi]"`, and drop the two dangling rst link targets. The NLDI README examples (feature_source='comid') were checked against the live NLDI API and work as written (get_basin -> 1 feature, get_flowlines -> 7 flowlines), so they are intentionally left unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 906c859 commit 29d74b1

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ Access water quality data from multiple agencies:
125125
```python
126126
from dataretrieval import wqp
127127

128-
# Find water quality monitoring sites
129-
sites = wqp.what_sites(
128+
# Find water quality monitoring sites (returns a DataFrame and metadata)
129+
sites, metadata = wqp.what_sites(
130130
statecode='US:55', # Wisconsin
131131
siteType='Stream'
132132
)
133133

134134
print(f"Found {len(sites)} stream monitoring sites in Wisconsin")
135135

136136
# Get water quality results
137-
results = wqp.get_results(
137+
results, metadata = wqp.get_results(
138138
siteid='USGS-05427718',
139139
characteristicName='Temperature, water'
140140
)

docs/source/meta/installing.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ Installation Guide
33

44
Whether you are a user or developer we recommend installing ``dataretrieval``
55
in a virtual environment. This can be done using something like ``virtualenv``
6-
or ``conda``. Package dependencies are listed in the `requirements.txt`_ file,
7-
a full list of dependencies necessary for development are listed in the
8-
`requirements-dev.txt`_ file.
9-
10-
.. _requirements.txt: https://github.com/DOI-USGS/dataretrieval-python/blob/main/requirements.txt
11-
12-
.. _requirements-dev.txt: https://github.com/DOI-USGS/dataretrieval-python/blob/main/requirements-dev.txt
6+
or ``conda``. Package dependencies are declared in ``pyproject.toml``: the core
7+
runtime dependencies under ``[project.dependencies]``, and optional extras
8+
(``test``, ``doc``, ``nldi``) under ``[project.optional-dependencies]``.
139

1410

1511
User Installation
@@ -59,8 +55,11 @@ the package for development:
5955

6056
.. code-block:: bash
6157
62-
$ pip install -r requirements-dev.txt
63-
$ pip install -e .
58+
$ pip install -e ".[test,doc,nldi]"
59+
60+
This installs ``dataretrieval`` in editable mode along with the development
61+
extras: ``test`` (test runner), ``doc`` (documentation build), and ``nldi``
62+
(``geopandas``, required by the NLDI module).
6463

6564
To check your installation you can run the tests with the following commands:
6665

0 commit comments

Comments
 (0)