Surface-water-network

Latest version: v0.8

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

Scan your dependencies

0.8

Released 2 July 2024

New things

- Add [`modflow.SwnMf6.gather_reaches()`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.gather_reaches.html) (#92)
- Add [`swn.SurfaceWaterNetwork.coarsen()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.coarsen.html) to create stream networks with a higher stream order (#100)

Other changes

- Fix warnings and test with [`locate_geoms()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.locate_geoms.html) (#96)
- Change build to hatch, use only ruff format and lint tools, add workflow to publish to PyPI (97)
- Fixes for geopandas-1.0.0 (98)
- Always use native Python types for list outputs (101)

0.7

This is primarily a maintenance release with no exciting features.

- Require FloPy 3.3.6 or later (80)
- Accommodate different reach index names `rno` or `ifno` since FloPy 3.5.0 (83)
- Maintenance updates to work with the latest pandas and FloPy releases (91)
- Update `swn.file.gdf_to_shapefile()` to keep number data types (79)

0.6

Released 25 May 2023

Breaking changes

- Minimum requirements are Python 3.8, geopandas 0.9 (58, 69)
- Remove legacy `modflow.MfSfrNetwork` (56)

New things

- Add [`swn.file.read_formatted_frame()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.file.read_formatted_frame.html) and [`write_formatted_frame()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.file.write_formatted_frame.html) methods (#62, 73)
- Add functionality to allow other MF6 packages to use reaches data with [`modflow.SwnMf6.package_period_frame()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnMf6.package_period_frame.html), [`write_package_period()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnMf6.write_package_period.html), [`flopy_package_period()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnMf6.flopy_package_period.html), and [`set_package_obj()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnMf6.set_package_obj.html) (#72)
- Add functionality to allow other MODFLOW packages to use reaches data with [`modflow.SwnModflow.package_period_frame()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnModflow.package_period_frame.html), [`write_package_period()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnModflow.write_package_period.html), [`flopy_package_period()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnModflow.flopy_package_period.html), and [`set_package_obj()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.modflow.SwnModflow.set_package_obj.html) (#74)

Other changes

- Better `from_swn_flopy` performance (57)
- Change [`swn.spatial.find_location_pairs()`](https://github.com/mwtoews/surface-water-network/releases/ref/swn.spatial.find_location_pairs.html) adding `all_pairs` and `exclude_branches` parameters (#68)

Deprecations

- `swn.spatial.get_sindex()` (58)
- `swn.spatial.wkt_to_dataframe()`, `swn.spatial.wkt_to_geodataframe()`, `swn.spatial.wkt_to_geoseries()` (70)

0.5

Released 20 July 2022

Breaking changes

- Minimum requirements are Python 3.7, pandas 1.2 (38)
- Add outside segnum to modflow if it is downstream from others (50)
- Change behaviour of [`SurfaceWaterNetwork.set_diversions()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.set_diversions.html) which by default will now match to the closest segment line (#52)

New things

- Add [`SurfaceWaterNetwork.locate_geoms()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.locate_geoms.html) method (#41, 48, 51)
- Add `run` option to [`topnet2ts()`](https://mwtoews.github.io/surface-water-network/ref/swn.file.topnet2ts.html), improve error messages (#44)
- Add routing methods: [`SurfaceWaterNetwork.route_segnums()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.route_segnums.html), [`modflow.SwnModflow.route_reaches()`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnModflow.route_reaches.html), and [`modflow.SwnMf6.route_reaches()`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.route_reaches.html) (#45)
- Add [`spatial`](https://mwtoews.github.io/surface-water-network/spatial.html) module functions: [`find_location_pairs()`](https://mwtoews.github.io/surface-water-network/ref/swn.spatial.find_location_pairs.html) and [`location_pair_geoms()`](https://mwtoews.github.io/surface-water-network/ref/swn.spatial.location_pair_geoms.html) (#46)
- Add methods [`modflow.SwnModflow.get_location_frame_reach_info()`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnModflow.get_location_frame_reach_info.html) and [`modflow.SwnMf6.get_location_frame_reach_info()`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.get_location_frame_reach_info.html) (#49)
- Implement diversions for MODFLOW6 (54)

Other changes

- Add packing dependency to check package version (37)
- Convert class attributes to properties for [`modflow.SwnModflow.segment_data`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnModflow.segment_data.html) and [`segment_data_ts`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnModflow.segment_data_ts.html) (#42)
- Convert class attributes to properties for [`modflow.SwnMf6.segments`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.segments.html), [`diversions`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.diversions.html), and [`reaches`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.reaches.html) (#43)
- Rename `SurfaceWaterNetwork.query()` → [`gather_segnums()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.gather_segnums.html); show `DeprecationWarning` with former method (#47)
- Move project metadata to `pyproject.toml`, add a few optional dependencies (53)

0.4

Released 20 October 2021

Breaking changes

- Change `SurfaceWaterNetwork(lines.geometry)` → [`SurfaceWaterNetwork.from_lines(lines.geometry)`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.from_lines.html)
- Change `MfSfrNetwork(n, m, ...)` → [`SwnModflow.from_swn_flopy(n, m)`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnModflow.from_swn_flopy.html)
- Legacy `modflow.MfSfrNetwork` kept, but will be dropped by version 0.6

New things

- Add `.to_pickle()` and `.from_pickle()` methods to core classes
- Support MODFLOW 6 models with [`modflow.SwnMf6`](https://mwtoews.github.io/surface-water-network/ref/swn.modflow.SwnMf6.html) (#12)
- Add [`SurfaceWaterNetwork.segments_series()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.segments_series.html) and [`pair_segments_frame()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.pair_segments_frame.html) methods (#15)
- Add methods for setting stream bed elevations (27)
- Add `compat` module for compatibility
- Add Sphinx documentation, with doctests (18)

Other changes

- Improve performance of [`SurfaceWaterNetwork.from_lines()`](https://mwtoews.github.io/surface-water-network/ref/swn.SurfaceWaterNetwork.from_lines.html) (#33)
- Add `mult` multiplier to [`topnet2ts()`](https://mwtoews.github.io/surface-water-network/ref/swn.file.topnet2ts.html)
- Use declarative configuration for project setup, remove `setup.py` (35)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.