Pygeohydro

Latest version: v0.19.0

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

Scan your dependencies

Page 4 of 9

0.13.5

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

Breaking Changes
~~~~~~~~~~~~~~~~
- Append "Error" to all exception classes for conforming to PEP-8 naming conventions.
- Deprecate ``ssebopeta_byloc`` since it's been replaced with ``ssebopeta_bycoords``
since version 0.13.0.

Internal Changes
~~~~~~~~~~~~~~~~
- Bump the minimum versions of ``pygeoogc`` and ``pygeoutils`` to 0.13.5 and that of
``async-retriever`` to 0.3.5.

0.13.3

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

New Features
~~~~~~~~~~~~
- Add a new argument to ``NID.inventory_byid`` class for staging the entire NID dataset
prior to inventory queries. There a new public method called ``NID.stage_nid_inventory``
that can be used to download the entire NID dataset and save it as a ``feather`` file.
This is useful inventory queries with large number of IDs and is much more efficient
than querying the NID web service.

Bug Fixes
~~~~~~~~~
- The background value in ``cover_statistics`` function should have been 127 not 0.
Also, dropped the background value from the return statistics.

0.13.2

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

Breaking Changes
~~~~~~~~~~~~~~~~
- Set the minimum supported version of Python to 3.8 since many of the
dependencies such as ``xarray``, ``pandas``, ``rioxarray`` have dropped support
for Python 3.7.

Internal Changes
~~~~~~~~~~~~~~~~
- Remove ``USGS`` prefixes from the input station IDs in ``NWIS.get_streamflow``
function. Also, check if the remaining parts of the IDs are all digits and throw
an exception if otherwise. Additionally, make sure that IDs have at least 8 chars by
adding leading zeros (:issue_hydro:`99`).
- Use `micromamba <https://github.com/marketplace/actions/provision-with-micromamba>`__
for running tests
and use `nox <https://github.com/marketplace/actions/setup-nox>`__
for linting in CI.

0.13.1

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

New Features
~~~~~~~~~~~~
- Add a new function called ``get_us_states`` to the ``helpers`` module for obtaining
a GeoDataFrame of the US states. It has an optional argument for returning the
``contiguous`` states, ``continental`` states, ``commonwealths`` states, or
US ``territories``. The data are retrieved from the Census' Tiger 2021 database.
- In the ``NID`` class keep the ``valid_fields`` property as a ``pandas.Series``
instead of a ``list``, so it can be searched easier via its ``str`` accessor.

Internal Changes
~~~~~~~~~~~~~~~~
- Refactor the ``plot.signatures`` function to use ``proplot`` instead of ``matplotlib``.
- Improve performance of ``NWIS.get_streamflow`` by not validating the layer name
when instantiating the ``WaterData`` class. Also, make the function more robust
by checking if streamflow data is available for each station and throw a warning
if not.

Bug Fixes
~~~~~~~~~
- Fix an issue in ``NWIS.get_streamflow`` where ``-9999`` values were not being
filtered out. According to NWIS, these values are reserved for ice-affected
data. This fix sets these values to ``numpy.nan``.

0.13.0

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

New Features
~~~~~~~~~~~~
- Add a new flag to ``nlcd_*`` functions called ``ssl`` for disabling SSL verification.
- Add a new function called ``get_camels`` for getting the
`CAMELS <https://ral.ucar.edu/solutions/products/camels>`__ dataset. The function
returns a ``geopandas.GeoDataFrame`` that includes basin-level attributes
for all 671 stations in the dataset and a ``xarray.Dataset`` that contains
streamflow data for all 671 stations and their basin-level attributes.
- Add a new function named ``overland_roughness`` for getting the overland
roughness values from land cover data.
- Add a new class called ``WBD`` for getting watershed boundary (HUC) data.

.. code-block:: python

from pygeohydro import WBD

wbd = WBD("huc4")
hudson = wbd.byids("huc4", ["0202", "0203"])

Breaking Changes
~~~~~~~~~~~~~~~~
- Remove caching-related arguments from all functions since now they
can be set globally via three environmental variables:

* ``HYRIVER_CACHE_NAME``: Path to the caching SQLite database.
* ``HYRIVER_CACHE_EXPIRE``: Expiration time for cached requests in seconds.
* ``HYRIVER_CACHE_DISABLE``: Disable reading/writing from/to the cache file.

You can do this like so:

.. code-block:: python

import os

os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite"
os.environ["HYRIVER_CACHE_EXPIRE"] = "3600"
os.environ["HYRIVER_CACHE_DISABLE"] = "true"

Internal Changes
~~~~~~~~~~~~~~~~
- Write ``nodata`` attribute using ``rioxarray`` in ``nlcd_bygeom`` since the
clipping operation of ``rioxarray`` uses this value as the fill value.

0.12.4

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

Internal Changes
~~~~~~~~~~~~~~~~
- Return a named tuple instead of a ``dict`` of percentages in the
``cover_statistics`` function. It makes accessing the values easier.
- Add ``pycln`` as a new ``pre-commit`` hooks for removing unused imports.
- Remove time zone info from the inputs to ``plot.signatures`` to avoid
issues with the ``matplotlib`` backend.

Bug Fixes
~~~~~~~~~
- Fix an issue in ``plot.signatures`` where the new ``matplotlib``
version requires a ``numpy`` array instead of a ``pandas.DataFrame``.

Page 4 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.