Py3dep

Latest version: v0.18.0

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

Scan your dependencies

Page 4 of 7

0.13.3

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

Bug Fixes
~~~~~~~~~
- Fix a bug in ``check_3dep_availability`` where due to changes in ``pygeoogc``
``ZeroMatched`` exception is raised instead of ``TypeError`` and as a result
``check_3dep_availability`` was not working as expected.

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
~~~~~~~~~~~~~~~~
- 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
~~~~~~~~~~~~
- In ``deg2mpm`` function look for ``_FillValue`` and ``nodatavals`` in
the attributes and if not found, fall back to ``numpy.nan``.

Internal Changes
~~~~~~~~~~~~~~~~
- Ensure that the ``deg2mpm`` function uses ``dask`` if the input is ``dask``-enabled.
- In the ``elevation_profile`` function use a bounding box to get DEM and a linear
interpolation to get the elevation along the profile.

0.13.0

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

New Features
~~~~~~~~~~~~
- Add a new function called ``query_3dep_sources`` for querying bounds of 3DEP's
data sources within a bounding box. It returns a geo-dataframe that contains
the bounding box of each data source and a column ``dem_res`` identifying the
resolution of the raw topographic data within each geometry.
- Add a new function called ``elevation_profile`` for getting elevation profile
along a line at a given spacing. This function converts the line to a B-spline
and then calculates the elevation along the spline at a given uniform spacing.

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"

0.12.2

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

New Features
~~~~~~~~~~~~
- Add a new DEM source to ``elevation_bycoords`` to get elevation from
the National Map's 3DEP WMS service. This can replace the ``tnm`` source
since ``tnm`` is not stable.
- Add a new function called ``check_3dep_availability`` to check the availability
of 3DEP's native resolutions within an area of interest. It returns a ``dict``
with keys corresponding to the available resolutions and its values are boolean
values indicating whether the resolution is available or not.
- Replace no data values of ``slope`` in ``deg2mm`` with ``np.nan``, so they do not
get converted to another value. The output of this function has ``np.float64`` type.

Internal Changes
~~~~~~~~~~~~~~~~
- Refactor ``ElevationByCoords`` by using ``__post_init__`` for validating the
input parameters rather than ``pydantic``'s validators.
- Refactor ``elevation_bygrid`` by using ``get_map`` to get DEM and ``rioxarray``
for re-projection.
- Add type checking with ``typeguard`` and fixed typing issues raised by
``typeguard``.
- Refactor ``show_versions`` to ensure getting correct versions of all
dependencies.

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.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.