Pynhd

Latest version: v0.19.0

Safety actively analyzes 711993 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.12.1

-------------------

Internal Changes
~~~~~~~~~~~~~~~~
- Use the three new ``ar.retrieve_*`` functions instead of the old ``ar.retrieve``
function to improve type hinting and to make the API more consistent.
- Revert to the original PyGeoAPI base URL.

0.12.0

-------------------

Breaking Changes
~~~~~~~~~~~~~~~~
- Rewrite ``ScienceBase`` to make it applicable for working with other ScienceBase
items. A new function has been added for staging the Additional NHDPlus attributes items
called ``stage_nhdplus_attrs``.
- Refactor ``AGRBase`` to remove unnecessary functions and make them more general.
- Update ``PyGeoAPI`` class to conform to the new ``pygeoapi`` API. This web service
is undergoing some changes at the time of this release and the API is not stable,
might not work as expected. As soon as the web service is stable, a new version
will be released.

New Features
~~~~~~~~~~~~
- In ``WaterData.byid`` show a warning if there are any missing feature IDs that are
requested but are not available in the dataset.
- For all ``by*`` methods of ``WaterData`` throw a ``ZeroMatched`` exception if no
features are found.
- Add ``expire_after`` and ``disable_caching`` arguments to all functions that use
``async_retriever``. Set the default request caching expiration time to never expire.
You can use ``disable_caching`` if you don't want to use the cached responses. Please
refer to documentation of the functions for more details.

Internal Changes
~~~~~~~~~~~~~~~~
- Refactor ``prepare_nhdplus`` to reduce code complexity by grouping all the
NHDPlus tools as a private class.
- Modify ``AGRBase`` to reflect the latest API changes in ``pygeoogc.ArcGISRESTfull``
class.
- Refactor ``prepare_nhdplus`` by creating a private class that includes all the previously
used private functions. This will make the code more readable and easier to maintain.
- Add all the missing types so ``mypy --strict`` passes.

0.11.4

-------------------

New Features
~~~~~~~~~~~~
- Add a new argument to ``NLDI.get_basins`` called ``split_catchment`` that
if is set to ``True`` will split the basin geometry at the watershed outlet.

Internal Changes
~~~~~~~~~~~~~~~~
- Catch service errors in ``PyGeoAPI`` and show useful error messages.
- Use ``importlib-metadata`` for getting the version instead of ``pkg_resources``
to decrease import time as discussed in this
`issue <https://github.com/pydata/xarray/issues/5676>`__.

0.11.3

-------------------

Internal Changes
~~~~~~~~~~~~~~~~
- More robust handling of inputs and outputs of ``NLDI``'s methods.
- Use an alternative download link for NHDPlus VAA file on Hydroshare.
- Restructure the codebase to reduce the complexity of ``pynhd.py`` file
by dividing it into three files: ``pynhd`` all classes that provide access
to the supported web services, ``core`` that includes base classes, and
``nhdplus_derived`` that has functions for getting databases that provided
additional attributes for the NHDPlus database.

0.11.2

-------------------

New Features
~~~~~~~~~~~~
- Add support for `PyGeoAPI <https://labs.waterdata.usgs.gov/api/nldi/pygeoapi>`__. It offers
four functionalities: ``flow_trace``, ``split_catchment``, ``elevation_profile``, and
``cross_section``.

0.11.1

-------------------

New Features
~~~~~~~~~~~~
- Add a function for getting all NHD ``FCodes`` as a data frame, called ``nhd_fcode``.
- Improve ``prepare_nhdplus`` function by removing all coastlines and better detection
of the terminal point in a network.

Internal Changes
~~~~~~~~~~~~~~~~
- Migrate to using ``AsyncRetriever`` for handling communications with web services.
- Catch the ``ConnectionError`` separately in ``NLDI`` and raise a ``ServiceError`` instead.
So user knows that data cannot be returned due to the out of service status of the server
not ``ZeroMatched``.

Page 5 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.