Pywbt

Latest version: v0.2.7

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

Scan your dependencies

Page 1 of 2

0.2.7

Fixed

- Fix an issue when a Shapefile exists as input or output in the `arg_dict`. The
issue would have caused an infinite loop when trying to copy the Shapefile
and its auxiliary files. ({{ issue(3) }})

0.2.6

Fixed

- Fix a bug in extracting WBT executable from the zip file. The bug impacted
mostly users who run PyWBT on cluster environments where the `tempfile`
modules uses system's temporary directory which in most cases is not
reliable. The fix is to use the `tempfile.TemporaryDirectory` context
manager to create a temporary directory in the current working directory.

0.2.5

Fixed

- Automatically add auxiliary files of Shapefile when they exist in `arg_dict`.
This ensures that the auxiliary files are also stored to `save_dir` when
`files_to_save` is provided.

0.2.4

Added

- Add a new module called `dem_utils` that contains utilities for downloading
and reading DEM data from 3DEP and NASADEM. Note that the module has some
additional dependencies that need to be installed. To install these
dependencies, use:

bash
pip install pywbt[dem]


or using `micromamba`:

bash
micromamba install -c conda-forge pywbt 'geopandas-base>=1' planetary-computer pystac-client rioxarray

0.2.3

Added

- When an exception occurs during running WBT, propagate the exception and clean up
before existing.
- If for some reason simply running WBT fails, redownload the WBT executable and try
again. This is to avoid the situation where the WBT executable is corrupted or
not downloaded properly or is not compatible with the system platform.
- Add two new helper function that can be used to get the list of available tools, their
respective descriptions and parameters: `list_tools` and `tool_parameters`. For better viewing
and querying the outputs of these two functions, it is recommended to use the `pandas` library.
For example, you can use `pd.Series(pywbt.list_tools())` to get a `pandas.Series` of the available
tools, and `pd.DataFrame(pywbt.tool_parameters("BreachDepressions"))` to get a `pandas.DataFrame`
of the parameters for the `BreachDepressions` tool.

0.2.2

Added

- Make `files_to_save` optional in the `whitebox_tools` function. If not provided, all
generated intermediate files will be stored in `save_dir` (default is the source
directory).
- Improvements to documentation including writing, the look and feel of the
documentations, and a new section for WBT workflows that can be found
[here](https://pywbt.readthedocs.io/latest/workflows).

Changed

- Avoid copying all files from the `src_dir` to the temporary directory,
instead, run the tools in the `src_dir` itself. This change will
avoid copying large files and could improve performance. With this change,
all intermediate files will be stored in `src_dir` unless `files_to_save`
is provided which will save only the specified output files and delete the
rest of the intermediate files.
- Improve performance by extracting and copying the input files using
`zipfile.ZipFile.extractall` and `shutil.copytree`.
- Improve the logic of determining the type of system platform by only calling
`platform.system()` once and caching the result.
- Improve the writing of the documentation.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.