From 29d74b16da096cde7e0abb986053beba72effcf5 Mon Sep 17 00:00:00 2001 From: thodson-usgs Date: Fri, 29 May 2026 14:29:13 -0400 Subject: [PATCH] docs: fix WQP README example unpacking and stale install instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- README.md | 6 +++--- docs/source/meta/installing.rst | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e56d31c2..c1e8b6fe 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,8 @@ Access water quality data from multiple agencies: ```python from dataretrieval import wqp -# Find water quality monitoring sites -sites = wqp.what_sites( +# Find water quality monitoring sites (returns a DataFrame and metadata) +sites, metadata = wqp.what_sites( statecode='US:55', # Wisconsin siteType='Stream' ) @@ -134,7 +134,7 @@ sites = wqp.what_sites( print(f"Found {len(sites)} stream monitoring sites in Wisconsin") # Get water quality results -results = wqp.get_results( +results, metadata = wqp.get_results( siteid='USGS-05427718', characteristicName='Temperature, water' ) diff --git a/docs/source/meta/installing.rst b/docs/source/meta/installing.rst index c799c7b6..1f147a24 100644 --- a/docs/source/meta/installing.rst +++ b/docs/source/meta/installing.rst @@ -3,13 +3,9 @@ Installation Guide Whether you are a user or developer we recommend installing ``dataretrieval`` in a virtual environment. This can be done using something like ``virtualenv`` -or ``conda``. Package dependencies are listed in the `requirements.txt`_ file, -a full list of dependencies necessary for development are listed in the -`requirements-dev.txt`_ file. - -.. _requirements.txt: https://github.com/DOI-USGS/dataretrieval-python/blob/main/requirements.txt - -.. _requirements-dev.txt: https://github.com/DOI-USGS/dataretrieval-python/blob/main/requirements-dev.txt +or ``conda``. Package dependencies are declared in ``pyproject.toml``: the core +runtime dependencies under ``[project.dependencies]``, and optional extras +(``test``, ``doc``, ``nldi``) under ``[project.optional-dependencies]``. User Installation @@ -59,8 +55,11 @@ the package for development: .. code-block:: bash - $ pip install -r requirements-dev.txt - $ pip install -e . + $ pip install -e ".[test,doc,nldi]" + +This installs ``dataretrieval`` in editable mode along with the development +extras: ``test`` (test runner), ``doc`` (documentation build), and ``nldi`` +(``geopandas``, required by the NLDI module). To check your installation you can run the tests with the following commands: