Pynhd

Latest version: v0.18.0

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

Scan your dependencies

Page 2 of 7

0.15.2

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

Bug Fixes
~~~~~~~~~
- Update ``GeoConnex`` based on the latest changes in the web service.

0.15.1

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

Bug Fixes
~~~~~~~~~
- Fix HyRiver libraries requirements by specifying a range instead
of exact version so ``conda-forge`` can resolve the dependencies.

0.15.0

-------------------
From release 0.15 onward, all minor versions of HyRiver packages
will be pinned. This ensures that previous minor versions of HyRiver
packages cannot be installed with later minor releases. For example,
if you have ``py3dep==0.14.x`` installed, you cannot install
``pydaymet==0.15.x``. This is to ensure that the API is
consistent across all minor versions.

New Features
~~~~~~~~~~~~
- Add a new function, called ``nhdplus_h12pp``, for retrieving
HUC12 pour points across CONUS.
- Add ``use_arrow=True`` to ``pynhd.nhdplus_l48`` when reading the NHDPlus
dataset. This speeds up the process since ``pyarrow`` is installed.
- In ``nhdplus_l48`` make ``layer`` option so ``sql`` parameter of
``pyogrio.read_dataframe`` can also be used. This is necessary
since ``pyogrio.read_dataframe`` does not support passing both
``layer`` and ``sql`` parameters.
- Update the mainstems dataset link to version 2.0 in ``mainstem_huc12_nx``.
- Expose ``NHDTools`` class to the public API.
- For now, retain compatibility with ``shapely<2`` while supporting
``shapley>=2``.

Bug Fixes
~~~~~~~~~
- Remove unnecessary conversion of ``id_col`` and ``toid_col`` to ``Int64``
in ``nhdflw2nx`` and ``vector_accumulation``. This ensures that the input
data types are preserved.
- Fix an issue in ``nhdplus_l48``, where if the input ``data_dir`` is not
absolute ``py7zr`` fails to extract the file.

0.14.0

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

New Features
~~~~~~~~~~~~
- Rewrite the ``GeoConnex`` class to provide access to new capabilities
of the web service. Support for spatial queries have been added via
CQL queries. For more information, check out the updated GeoConnex example
`notebook <https://github.com/hyriver/HyRiver-examples/blob/main/notebooks/geoconnex.ipynb>`__.
- Add a new property to ``StreamCat``, called ``metrics_df`` that gets
a dataframe of metric names and their description.
- Create a new private ``StreamCatValidator`` class to avoid polluting
the public ``StreamCat`` class with private attributes and methods.
Moreover, add a new alternative metric names attribute to ``StreamCat``
called ``alt_names`` for handling those metric names that do not follow
``METRIC+YYYY`` convention. This attribute is a dictionary that maps the
alternative names to the actual metric names, so users can use
``METRIC_NAME`` column of ``metrics_df`` and add a year suffix from
``valid_years`` attribute of ``StreamCat`` to get the actual metric name.
- In ``navigate_by*`` functions of ``NLDI`` add ``stop_comid``,
which is another criterion for stopping the navigation in addition
to ``distance``.
- Improve ``UserWarning`` messages of ``NLDI`` and ``WaterData``.

Breaking Changes
~~~~~~~~~~~~~~~~
- Remove ``pynhd.geoconnex`` function since more functionality has been
added to the GeoConnex service that existence of this function does not
make sense anymore. All queries should be done via ``pynhd.GeoConnex``
class.
- Rewrite ``NLDI`` to improve code readability and significantly improving
performance. Now, its methods do now return tuples if there are failed
requests, instead they will be shown as a ``UserWarning``.
- Bump the minimum required version of ``shapely`` to 2.0,
and use its new API.

Internal Changes
~~~~~~~~~~~~~~~~
- Sync all minor versions of HyRiver packages to 0.14.0.

0.13.12

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

New Features
~~~~~~~~~~~~
- Update the link to version 2.0 of the ENHD dataset in ``enhd_attrs``.

Internal Changes
~~~~~~~~~~~~~~~~
- Improve columns data types in ``enhd_attrs`` and ``nhdplus_vaa`` by using
``int32`` instead of ``Int64``, where applicable.
- Sync all patch versions of HyRiver packages to x.x.12.

0.13.11

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

New Features
~~~~~~~~~~~~
- The ``prepare_nhdplus`` now supports NHDPlus HR in addition
to NHDPlus MR. It automatically detects the NHDPlus version based on
the ID column name: ``nhdplusid`` for HR and ``comid`` for MR.

Internal Changes
~~~~~~~~~~~~~~~~
- Fully migrate ``setup.cfg`` and ``setup.py`` to ``pyproject.toml``.
- Convert relative imports to absolute with ``absolufy-imports``.
- Improve performance of ``prepare_nhdplus`` by using ``pandas.merge``
instead of applying a function to each row of the dataframe.

Page 2 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.