From 9b47fbc9e3a3d3671b2e67eed1bd4dc320902c86 Mon Sep 17 00:00:00 2001 From: Daniel Tollenaar Date: Mon, 4 Nov 2024 12:03:24 +0100 Subject: [PATCH 1/6] start_fixing --- notebooks/noorderzijlvest/00B_get_model.py | 17 + notebooks/noorderzijlvest/00_get_verwerkt.py | 11 + .../noorderzijlvest/01_fix_model_network.py | 404 ++++++++++++++++++ pixi.lock | 6 +- 4 files changed, 436 insertions(+), 2 deletions(-) create mode 100644 notebooks/noorderzijlvest/00B_get_model.py create mode 100644 notebooks/noorderzijlvest/00_get_verwerkt.py create mode 100644 notebooks/noorderzijlvest/01_fix_model_network.py diff --git a/notebooks/noorderzijlvest/00B_get_model.py b/notebooks/noorderzijlvest/00B_get_model.py new file mode 100644 index 0000000..783adf3 --- /dev/null +++ b/notebooks/noorderzijlvest/00B_get_model.py @@ -0,0 +1,17 @@ +# %% +from ribasim_nl import CloudStorage + +cloud = CloudStorage() + +authority = "Noorderzijlvest" +short_name = "nzv" + +cloud = CloudStorage() + +model_url = cloud.joinurl(authority, "modellen", f"{authority}_boezemmodel_2024_10_3") +ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_boezemmodel_2024_10_3", "ribasim.toml") +if not ribasim_toml.exists(): + cloud.download_content(model_url) + +if ribasim_toml.exists(): # get a short_name version to differentiate QGIS layergroup + ribasim_toml.with_name(f"{short_name}.toml").write_text(ribasim_toml.read_text()) diff --git a/notebooks/noorderzijlvest/00_get_verwerkt.py b/notebooks/noorderzijlvest/00_get_verwerkt.py new file mode 100644 index 0000000..fd1b030 --- /dev/null +++ b/notebooks/noorderzijlvest/00_get_verwerkt.py @@ -0,0 +1,11 @@ +# %% +from ribasim_nl import CloudStorage + +cloud = CloudStorage() + +data_url = cloud.joinurl("Noorderzijlvest", "verwerkt") + +# %% +cloud.download_content(data_url) + +# %% diff --git a/notebooks/noorderzijlvest/01_fix_model_network.py b/notebooks/noorderzijlvest/01_fix_model_network.py new file mode 100644 index 0000000..22dde82 --- /dev/null +++ b/notebooks/noorderzijlvest/01_fix_model_network.py @@ -0,0 +1,404 @@ +# %% +import geopandas as gpd +import numpy as np +import pandas as pd +from ribasim import Node +from ribasim.nodes import basin, level_boundary, manning_resistance, outlet + +from ribasim_nl import CloudStorage, Model, NetworkValidator +from ribasim_nl.geometry import split_basin_multi_polygon + +cloud = CloudStorage() + +authority = "DrentsOverijsselseDelta" +short_name = "dod" + +ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_2024_6_3", f"{short_name}.toml") +database_gpkg = ribasim_toml.with_name("database.gpkg") +hydroobject_gdf = gpd.read_file( + cloud.joinpath(authority, "verwerkt", "4_ribasim", "hydamo.gpkg"), layer="hydroobject", fid_as_index=True +) +duikersifonhevel_gdf = gpd.read_file( + cloud.joinpath(authority, "aangeleverd", "Aanlevering_202311", "HyDAMO_WM_20231117.gpkg"), + fid_as_index=True, + layer="duikersifonhevel", +) + +split_line_gdf = gpd.read_file( + cloud.joinpath(authority, "verwerkt", "fix_user_data.gpkg"), layer="split_basins", fid_as_index=True +) + +# level_boundary_gdf = gpd.read_file( +# cloud.joinpath(authority, "verwerkt", "fix_user_data.gpkg"), layer="level_boundary", fid_as_index=True +# ) + +# %% read model +model = Model.read(ribasim_toml) +ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_fix_model_network", f"{short_name}.toml") +network_validator = NetworkValidator(model) + +# %% some stuff we'll need again +manning_data = manning_resistance.Static(length=[100], manning_n=[0.04], profile_width=[10], profile_slope=[1]) +level_data = level_boundary.Static(level=[0]) + +basin_data = [ + basin.Profile(level=[0.0, 1.0], area=[0.01, 1000.0]), + basin.Static( + drainage=[0.0], + potential_evaporation=[0.001 / 86400], + infiltration=[0.0], + precipitation=[0.005 / 86400], + ), + basin.State(level=[0]), +] +outlet_data = outlet.Static(flow_rate=[100]) + + +# %% see: https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393424844 +# Verwijderen duplicate edges + +model.edge.df.drop_duplicates(inplace=True) + +# %% see: https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393458802 + +# Toevoegen ontbrekende basins (oplossen topologie) +model.remove_node(7, remove_edges=True) +model.remove_node(84, remove_edges=True) +basin_edges_df = network_validator.edge_incorrect_connectivity() +basin_nodes_df = network_validator.node_invalid_connectivity() + +for row in basin_nodes_df.itertuples(): + # maak basin-node + basin_node = model.basin.add(Node(geometry=row.geometry), tables=basin_data) + + # update edge_table + model.edge.df.loc[basin_edges_df[basin_edges_df.from_node_id == row.node_id].index, ["from_node_id"]] = ( + basin_node.node_id + ) + model.edge.df.loc[basin_edges_df[basin_edges_df.to_node_id == row.node_id].index, ["to_node_id"]] = ( + basin_node.node_id + ) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393672367 + +# Omdraaien edge-richting rondom outlets (inlaten/uitlaten) +# for edge_id in [2282, ] + +# https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393731749 + +# Opruimen Reeve + +# basin 2484 wordt LevelBoundary (IJssel) +model.update_node(2484, "LevelBoundary", data=[level_data]) + +# nodes 1536, 762, 761, 1486 + aangesloten edges gooien we weg +for node_id in [1536, 762, 761, 1486]: + model.remove_node(node_id, remove_edges=True) + +# edges 2841, 2842, 2843, 2846 gooien we weg +model.remove_edges([2841, 2842, 2843, 2846]) + +# duiker 286309 voegen we toe +kdu = duikersifonhevel_gdf.loc[9063] +outlet_node = model.outlet.add( + Node(geometry=kdu.geometry.interpolate(0.5, normalized=True), name=f"duikersifonhevel.{kdu.objectid}"), + tables=[outlet_data], +) + +model.edge.add(model.level_boundary[10], outlet_node) +model.edge.add(outlet_node, model.basin[2240]) +model.edge.add(model.manning_resistance[849], model.basin[2240]) +model.edge.add(model.manning_resistance[760], model.basin[2240]) +model.edge.add(model.tabulated_rating_curve[187], model.basin[2240]) +model.edge.add(model.basin[2240], model.pump[1100]) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393871075 + +# Ramsgeul bij Ramspol +for node_id in [81, 839]: + model.remove_node(node_id, remove_edges=True) + +model.update_node(83, "Basin", data=basin_data) +model.move_node(83, hydroobject_gdf.at[21045, "geometry"].boundary.geoms[0]) +model.reverse_edge(edge_id=3013) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399104407 + +# Deelstroomgebied Frysland + +# Nieuwe Kanaal / Tussen Linde voorzien van basin nabij gemaal.20 (node_id 701) +basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[19671, "geometry"].boundary.geoms[1]), tables=basin_data) +outlet_node = model.outlet.add( + Node(geometry=hydroobject_gdf.at[19671, "geometry"].interpolate(0.5, normalized=True)), + tables=[outlet_data], +) + +# basin 1623 verbinden met inlaatduikers (3x) en gemaal 1623; overige verbindingen verwijderen. +model.remove_edges([3038, 3040, 3037, 3041, 3039]) + +# nw basin verbinden met gemaal 20, level boundary 94 en alle inlaatduikers +model.reverse_edge(edge_id=2282) +model.edge.add(outlet_node, model.level_boundary[94]) +model.edge.add(basin_node, outlet_node) +model.edge.add(basin_node, model.manning_resistance[1182]) +model.edge.add(basin_node, model.manning_resistance[969]) +model.edge.add(basin_node, model.manning_resistance[1050]) +model.edge.add(basin_node, model.outlet[539]) +model.edge.add(model.pump[701], basin_node) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399209787 + +# Aansluiten NW boezem op Fryslan + +# basin /area 1681 op te knippen nabij basin 1717 (rode lijn) +model.split_basin(split_line_gdf.at[14, "geometry"]) +model.basin.area.df = model.basin.area.df[model.basin.area.df.node_id != 1717] + +# basin 1682 te veranderen in een LevelBoundary +model.update_node(1682, "LevelBoundary", [level_data]) + +# Alle edges die nu naar basin 1717 lopen naar LevelBoundary 1682 of opheffen +model.remove_node(27, remove_edges=True) +model.remove_node(1556, remove_edges=True) +model.remove_edges([945, 2537, 2536]) + +boundary_node = model.level_boundary.add(Node(geometry=hydroobject_gdf.at[7778, "geometry"].boundary.geoms[0])) + +model.edge.add(model.pump[642], boundary_node) +model.update_node(1202, "Outlet", data=[outlet_data]) +model.edge.add(boundary_node, model.outlet[1202]) +model.update_node(1203, "Outlet", data=[outlet_data]) +model.edge.add(boundary_node, model.outlet[1203]) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399328441 + +# Misc pump benedenstroomse edges +for edge_id in [2862, 3006, 3049]: + model.reverse_edge(edge_id=edge_id) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399355028 + +# Misc tabulated_rating_curve (stuwen) stroomrichting +for edge_id in [1884, 2197]: + model.reverse_edge(edge_id=edge_id) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399382478 + +# Misc manning_resistance (duikers) stroomrichting +for edge_id in [1081, 518]: + model.reverse_edge(edge_id=edge_id) + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399425885 +# Opknippen NW boezem + +poly1, poly2 = split_basin_multi_polygon(model.basin.area.df.at[598, "geometry"], split_line_gdf.at[15, "geometry"]) +model.basin.area.df.loc[model.basin.area.df.node_id == 1681, ["geometry"]] = poly1 + +poly1, poly2 = split_basin_multi_polygon(poly2, split_line_gdf.at[16, "geometry"]) +model.basin.area.df.loc[598] = {"node_id": 1686, "geometry": poly1} + +poly1, poly2 = split_basin_multi_polygon(poly2, split_line_gdf.at[17, "geometry"]) +model.basin.area.df.loc[model.basin.area.df.index.max() + 1] = {"geometry": poly1, "node_id": 1695} +model.basin.area.df.crs = model.crs + +tables = basin_data + [basin.Area(geometry=[poly2])] +basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[19608, "geometry"].boundary.geoms[1]), tables=tables) + + +model.move_node(1686, hydroobject_gdf.at[19566, "geometry"].boundary.geoms[1]) +model.merge_basins(basin_id=2426, to_basin_id=1696, are_connected=True) +model.merge_basins(basin_id=2460, to_basin_id=1696, are_connected=True) +model.merge_basins(basin_id=1648, to_basin_id=1696, are_connected=True) + +model.merge_basins(basin_id=1696, to_basin_id=2453, are_connected=True) + +model.merge_basins(basin_id=2453, to_basin_id=1686, are_connected=True) +model.merge_basins(basin_id=1719, to_basin_id=1686, are_connected=True) +model.merge_basins(basin_id=1858, to_basin_id=1686, are_connected=True) + +model.remove_node(1532, remove_edges=True) +model.remove_node(722, remove_edges=True) +model.remove_node(536, remove_edges=True) +model.remove_node(2506, remove_edges=True) + +edge_ids = [ + 2866, + 2867, + 2868, + 2869, + 2870, + 2871, + 2872, + 2873, + 2875, + 2876, + 2877, + 2878, + 2879, + 2880, + 2881, + 2883, + 2885, + 2886, + 2889, + 2890, + 2891, + 2895, + 2897, + 2899, + 2901, + 2902, + 2903, + 2905, + 2906, + 2907, + 2908, + 2910, + 2911, + 2912, + 2913, + 2915, + 2916, + 2918, +] + +for edge_id in edge_ids: + model.redirect_edge(edge_id, to_node_id=basin_node.node_id) + +model.remove_edges([2887, 2892]) +model.edge.add(basin_node, model.pump[547]) +model.edge.add(basin_node, model.outlet[540]) + +for edge_id in [2914, 2894]: + model.redirect_edge(edge_id, to_node_id=31) + +model.redirect_edge(461, to_node_id=1585) + +model.basin.area.df.loc[model.basin.area.df.node_id == 1545, ["node_id"]] = 1585 + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2400050483 + +# Ontbrekende basin beneden-Vecht +basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[12057, "geometry"].boundary.geoms[0]), tables=basin_data) +outlet_node = model.outlet.add( + Node(geometry=hydroobject_gdf.at[12057, "geometry"].interpolate(0.5, normalized=True)), tables=[outlet_data] +) + +for edge_id in [2956, 2957, 2958, 2959, 2960, 2961]: + model.redirect_edge(edge_id, to_node_id=basin_node.node_id) + +model.remove_node(76, remove_edges=True) +model.edge.add(basin_node, model.pump[598]) +model.edge.add(basin_node, outlet_node) +model.edge.add(outlet_node, model.level_boundary[50]) + + +# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399931763 + +# Samenvoegen Westerveldse Aa +model.merge_basins(basin_id=1592, to_basin_id=1645, are_connected=True) +model.merge_basins(basin_id=1593, to_basin_id=1645, are_connected=True) + +model.merge_basins(basin_id=1645, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2567, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2303, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2549, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2568, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2572, to_basin_id=1585, are_connected=True) +model.merge_basins(basin_id=2374, to_basin_id=1585, are_connected=True) + +model.merge_basins(basin_id=2559, to_basin_id=2337, are_connected=False) + +# %% see: https://github.com/Deltares/Ribasim-NL/issues/146#issuecomment-2382572457 + +# Administratie basin node_id in node_table en Basin / Area correct maken +# model.fix_unassigned_basin_area() +# model.fix_unassigned_basin_area(method="closest", distance=100) +# model.fix_unassigned_basin_area() + +# model.unassigned_basin_area.to_file("unassigned_basins.gpkg") +# model.basin.area.df = model.basin.area.df[~model.basin.area.df.node_id.isin(model.unassigned_basin_area.node_id)] + +# %% +# corrigeren knoop-topologie + +# ManningResistance bovenstrooms LevelBoundary naar Outlet +# for row in network_validator.edge_incorrect_type_connectivity().itertuples(): +# model.update_node(row.from_node_id, "Outlet", data=[outlet_data]) + +# # Inlaten van ManningResistance naar Outlet +# for row in network_validator.edge_incorrect_type_connectivity( +# from_node_type="LevelBoundary", to_node_type="ManningResistance" +# ).itertuples(): +# model.update_node(row.to_node_id, "Outlet", data=[outlet_data]) + + +# # buffer out small slivers +# model.basin.area.df.loc[:, ["geometry"]] = ( +# model.basin.area.df.buffer(0.1) +# .buffer(-0.1) +# .apply(lambda x: x if x.geom_type == "MultiPolygon" else MultiPolygon([x])) +# ) +# %% +# basin-profielen updaten + +df = pd.DataFrame( + { + "node_id": np.repeat(model.basin.node.df.index.to_numpy(), 2), + "level": [0.0, 1.0] * len(model.basin.node.df), + "area": [0.01, 1000.0] * len(model.basin.node.df), + } +) +df.index.name = "fid" +model.basin.profile.df = df + +df = model.basin.profile.df.groupby("node_id")[["level"]].max().reset_index() +df.index.name = "fid" +model.basin.state.df = df + +# %% +# tabulated_rating_curves updaten +df = pd.DataFrame( + { + "node_id": np.repeat(model.tabulated_rating_curve.node.df.index.to_numpy(), 2), + "level": [0.0, 5] * len(model.tabulated_rating_curve.node.df), + "flow_rate": [0, 0.1] * len(model.tabulated_rating_curve.node.df), + } +) +df.index.name = "fid" +model.tabulated_rating_curve.static.df = df + + +# %% + +# level_boundaries updaten +df = pd.DataFrame( + { + "node_id": model.level_boundary.node.df.index.to_list(), + "level": [0.0] * len(model.level_boundary.node.df), + } +) +df.index.name = "fid" +model.level_boundary.static.df = df + +# %% +# manning_resistance updaten +length = len(model.manning_resistance.node.df) +df = pd.DataFrame( + { + "node_id": model.manning_resistance.node.df.index.to_list(), + "length": [100.0] * length, + "manning_n": [100.0] * length, + "profile_width": [100.0] * length, + "profile_slope": [100.0] * length, + } +) +df.index.name = "fid" +model.manning_resistance.static.df = df + + +# %% write model +model.use_validation = False +model.write(ribasim_toml) + +# %% diff --git a/pixi.lock b/pixi.lock index e8534b9..399a693 100644 --- a/pixi.lock +++ b/pixi.lock @@ -14706,10 +14706,12 @@ packages: name: peilbeheerst-model version: 0.1.0 path: src/peilbeheerst_model - sha256: e8c270f68d683c802990a8bb905cd665fd327b33e1d17bf3e01dfe9c49ec335e + sha256: 9ec22544800123361c4449542c548c1e3739a3f8d9d5bbe2f91a8d50d304fac5 requires_dist: + - fiona - geopandas - matplotlib + - networkx - numpy - pandas - pydantic @@ -16987,7 +16989,7 @@ packages: timestamp: 1598024297745 - kind: pypi name: ribasim - version: 2024.11.0 + version: 2024.10.0 path: ../Ribasim/python/ribasim sha256: c48692687129085ad19256cbf54c8df9853f6259b31997cc4a282fde86072751 requires_dist: From 1ad2c82e2fd8d09c072d9e97e3a7a7a0c0828d13 Mon Sep 17 00:00:00 2001 From: Daniel Tollenaar Date: Mon, 4 Nov 2024 16:06:57 +0100 Subject: [PATCH 2/6] fix_nzv --- notebooks/noorderzijlvest/00B_get_model.py | 17 - .../noorderzijlvest/01_fix_model_network.py | 349 +++--------------- 2 files changed, 58 insertions(+), 308 deletions(-) delete mode 100644 notebooks/noorderzijlvest/00B_get_model.py diff --git a/notebooks/noorderzijlvest/00B_get_model.py b/notebooks/noorderzijlvest/00B_get_model.py deleted file mode 100644 index 783adf3..0000000 --- a/notebooks/noorderzijlvest/00B_get_model.py +++ /dev/null @@ -1,17 +0,0 @@ -# %% -from ribasim_nl import CloudStorage - -cloud = CloudStorage() - -authority = "Noorderzijlvest" -short_name = "nzv" - -cloud = CloudStorage() - -model_url = cloud.joinurl(authority, "modellen", f"{authority}_boezemmodel_2024_10_3") -ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_boezemmodel_2024_10_3", "ribasim.toml") -if not ribasim_toml.exists(): - cloud.download_content(model_url) - -if ribasim_toml.exists(): # get a short_name version to differentiate QGIS layergroup - ribasim_toml.with_name(f"{short_name}.toml").write_text(ribasim_toml.read_text()) diff --git a/notebooks/noorderzijlvest/01_fix_model_network.py b/notebooks/noorderzijlvest/01_fix_model_network.py index 22dde82..664f549 100644 --- a/notebooks/noorderzijlvest/01_fix_model_network.py +++ b/notebooks/noorderzijlvest/01_fix_model_network.py @@ -3,34 +3,45 @@ import numpy as np import pandas as pd from ribasim import Node -from ribasim.nodes import basin, level_boundary, manning_resistance, outlet +from ribasim.nodes import basin, level_boundary, manning_resistance, outlet, pump from ribasim_nl import CloudStorage, Model, NetworkValidator -from ribasim_nl.geometry import split_basin_multi_polygon cloud = CloudStorage() -authority = "DrentsOverijsselseDelta" -short_name = "dod" +authority = "Noorderzijlvest" +short_name = "nzv" ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_2024_6_3", f"{short_name}.toml") database_gpkg = ribasim_toml.with_name("database.gpkg") -hydroobject_gdf = gpd.read_file( - cloud.joinpath(authority, "verwerkt", "4_ribasim", "hydamo.gpkg"), layer="hydroobject", fid_as_index=True + +pump_gdf = gpd.read_file( + cloud.joinpath(authority, "verwerkt", "5_D_HYDRO_export", "gemalen", "Noorderzijlvest_gemalen.shp"), + fid_as_index=True, ) -duikersifonhevel_gdf = gpd.read_file( - cloud.joinpath(authority, "aangeleverd", "Aanlevering_202311", "HyDAMO_WM_20231117.gpkg"), +pump_gdf["node_type"] = "Pump" +pump_gdf["meta_object_type"] = "pump" + +culvert_gdf = gpd.read_file( + cloud.joinpath( + authority, "verwerkt", "5_D_HYDRO_export", "duikersifonhevel", "Noorderzijlvest_duikersifonhevel.shp" + ), fid_as_index=True, - layer="duikersifonhevel", ) -split_line_gdf = gpd.read_file( - cloud.joinpath(authority, "verwerkt", "fix_user_data.gpkg"), layer="split_basins", fid_as_index=True +culvert_gdf["node_type"] = "Outlet" +culvert_gdf["meta_object_type"] = "weir" + +weir_gdf = gpd.read_file( + cloud.joinpath(authority, "verwerkt", "5_D_HYDRO_export", "stuwen", "Noorderzijlvest_stuwen.shp"), + fid_as_index=True, ) -# level_boundary_gdf = gpd.read_file( -# cloud.joinpath(authority, "verwerkt", "fix_user_data.gpkg"), layer="level_boundary", fid_as_index=True -# ) +weir_gdf["node_type"] = "Outlet" +weir_gdf["meta_object_type"] = "weir" + +structures_gdf = pd.concat([pump_gdf, culvert_gdf, weir_gdf], ignore_index=True) + # %% read model model = Model.read(ribasim_toml) @@ -52,293 +63,49 @@ basin.State(level=[0]), ] outlet_data = outlet.Static(flow_rate=[100]) +pump_data = pump.Static(flow_rate=[10]) +# %% -# %% see: https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393424844 -# Verwijderen duplicate edges - -model.edge.df.drop_duplicates(inplace=True) - -# %% see: https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393458802 - -# Toevoegen ontbrekende basins (oplossen topologie) -model.remove_node(7, remove_edges=True) -model.remove_node(84, remove_edges=True) -basin_edges_df = network_validator.edge_incorrect_connectivity() -basin_nodes_df = network_validator.node_invalid_connectivity() - -for row in basin_nodes_df.itertuples(): - # maak basin-node - basin_node = model.basin.add(Node(geometry=row.geometry), tables=basin_data) - - # update edge_table - model.edge.df.loc[basin_edges_df[basin_edges_df.from_node_id == row.node_id].index, ["from_node_id"]] = ( - basin_node.node_id - ) - model.edge.df.loc[basin_edges_df[basin_edges_df.to_node_id == row.node_id].index, ["to_node_id"]] = ( - basin_node.node_id - ) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393672367 - -# Omdraaien edge-richting rondom outlets (inlaten/uitlaten) -# for edge_id in [2282, ] - -# https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393731749 - -# Opruimen Reeve - -# basin 2484 wordt LevelBoundary (IJssel) -model.update_node(2484, "LevelBoundary", data=[level_data]) - -# nodes 1536, 762, 761, 1486 + aangesloten edges gooien we weg -for node_id in [1536, 762, 761, 1486]: - model.remove_node(node_id, remove_edges=True) - -# edges 2841, 2842, 2843, 2846 gooien we weg -model.remove_edges([2841, 2842, 2843, 2846]) - -# duiker 286309 voegen we toe -kdu = duikersifonhevel_gdf.loc[9063] -outlet_node = model.outlet.add( - Node(geometry=kdu.geometry.interpolate(0.5, normalized=True), name=f"duikersifonhevel.{kdu.objectid}"), - tables=[outlet_data], -) - -model.edge.add(model.level_boundary[10], outlet_node) -model.edge.add(outlet_node, model.basin[2240]) -model.edge.add(model.manning_resistance[849], model.basin[2240]) -model.edge.add(model.manning_resistance[760], model.basin[2240]) -model.edge.add(model.tabulated_rating_curve[187], model.basin[2240]) -model.edge.add(model.basin[2240], model.pump[1100]) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2393871075 - -# Ramsgeul bij Ramspol -for node_id in [81, 839]: - model.remove_node(node_id, remove_edges=True) - -model.update_node(83, "Basin", data=basin_data) -model.move_node(83, hydroobject_gdf.at[21045, "geometry"].boundary.geoms[0]) -model.reverse_edge(edge_id=3013) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399104407 - -# Deelstroomgebied Frysland - -# Nieuwe Kanaal / Tussen Linde voorzien van basin nabij gemaal.20 (node_id 701) -basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[19671, "geometry"].boundary.geoms[1]), tables=basin_data) -outlet_node = model.outlet.add( - Node(geometry=hydroobject_gdf.at[19671, "geometry"].interpolate(0.5, normalized=True)), - tables=[outlet_data], -) - -# basin 1623 verbinden met inlaatduikers (3x) en gemaal 1623; overige verbindingen verwijderen. -model.remove_edges([3038, 3040, 3037, 3041, 3039]) - -# nw basin verbinden met gemaal 20, level boundary 94 en alle inlaatduikers -model.reverse_edge(edge_id=2282) -model.edge.add(outlet_node, model.level_boundary[94]) -model.edge.add(basin_node, outlet_node) -model.edge.add(basin_node, model.manning_resistance[1182]) -model.edge.add(basin_node, model.manning_resistance[969]) -model.edge.add(basin_node, model.manning_resistance[1050]) -model.edge.add(basin_node, model.outlet[539]) -model.edge.add(model.pump[701], basin_node) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399209787 - -# Aansluiten NW boezem op Fryslan - -# basin /area 1681 op te knippen nabij basin 1717 (rode lijn) -model.split_basin(split_line_gdf.at[14, "geometry"]) -model.basin.area.df = model.basin.area.df[model.basin.area.df.node_id != 1717] - -# basin 1682 te veranderen in een LevelBoundary -model.update_node(1682, "LevelBoundary", [level_data]) - -# Alle edges die nu naar basin 1717 lopen naar LevelBoundary 1682 of opheffen -model.remove_node(27, remove_edges=True) -model.remove_node(1556, remove_edges=True) -model.remove_edges([945, 2537, 2536]) - -boundary_node = model.level_boundary.add(Node(geometry=hydroobject_gdf.at[7778, "geometry"].boundary.geoms[0])) - -model.edge.add(model.pump[642], boundary_node) -model.update_node(1202, "Outlet", data=[outlet_data]) -model.edge.add(boundary_node, model.outlet[1202]) -model.update_node(1203, "Outlet", data=[outlet_data]) -model.edge.add(boundary_node, model.outlet[1203]) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399328441 - -# Misc pump benedenstroomse edges -for edge_id in [2862, 3006, 3049]: - model.reverse_edge(edge_id=edge_id) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399355028 - -# Misc tabulated_rating_curve (stuwen) stroomrichting -for edge_id in [1884, 2197]: - model.reverse_edge(edge_id=edge_id) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399382478 - -# Misc manning_resistance (duikers) stroomrichting -for edge_id in [1081, 518]: - model.reverse_edge(edge_id=edge_id) - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399425885 -# Opknippen NW boezem - -poly1, poly2 = split_basin_multi_polygon(model.basin.area.df.at[598, "geometry"], split_line_gdf.at[15, "geometry"]) -model.basin.area.df.loc[model.basin.area.df.node_id == 1681, ["geometry"]] = poly1 - -poly1, poly2 = split_basin_multi_polygon(poly2, split_line_gdf.at[16, "geometry"]) -model.basin.area.df.loc[598] = {"node_id": 1686, "geometry": poly1} - -poly1, poly2 = split_basin_multi_polygon(poly2, split_line_gdf.at[17, "geometry"]) -model.basin.area.df.loc[model.basin.area.df.index.max() + 1] = {"geometry": poly1, "node_id": 1695} -model.basin.area.df.crs = model.crs - -tables = basin_data + [basin.Area(geometry=[poly2])] -basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[19608, "geometry"].boundary.geoms[1]), tables=tables) - - -model.move_node(1686, hydroobject_gdf.at[19566, "geometry"].boundary.geoms[1]) -model.merge_basins(basin_id=2426, to_basin_id=1696, are_connected=True) -model.merge_basins(basin_id=2460, to_basin_id=1696, are_connected=True) -model.merge_basins(basin_id=1648, to_basin_id=1696, are_connected=True) - -model.merge_basins(basin_id=1696, to_basin_id=2453, are_connected=True) - -model.merge_basins(basin_id=2453, to_basin_id=1686, are_connected=True) -model.merge_basins(basin_id=1719, to_basin_id=1686, are_connected=True) -model.merge_basins(basin_id=1858, to_basin_id=1686, are_connected=True) - -model.remove_node(1532, remove_edges=True) -model.remove_node(722, remove_edges=True) -model.remove_node(536, remove_edges=True) -model.remove_node(2506, remove_edges=True) - -edge_ids = [ - 2866, - 2867, - 2868, - 2869, - 2870, - 2871, - 2872, - 2873, - 2875, - 2876, - 2877, - 2878, - 2879, - 2880, - 2881, - 2883, - 2885, - 2886, - 2889, - 2890, - 2891, - 2895, - 2897, - 2899, - 2901, - 2902, - 2903, - 2905, - 2906, - 2907, - 2908, - 2910, - 2911, - 2912, - 2913, - 2915, - 2916, - 2918, -] - -for edge_id in edge_ids: - model.redirect_edge(edge_id, to_node_id=basin_node.node_id) - -model.remove_edges([2887, 2892]) -model.edge.add(basin_node, model.pump[547]) -model.edge.add(basin_node, model.outlet[540]) - -for edge_id in [2914, 2894]: - model.redirect_edge(edge_id, to_node_id=31) - -model.redirect_edge(461, to_node_id=1585) - -model.basin.area.df.loc[model.basin.area.df.node_id == 1545, ["node_id"]] = 1585 - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2400050483 - -# Ontbrekende basin beneden-Vecht -basin_node = model.basin.add(Node(geometry=hydroobject_gdf.at[12057, "geometry"].boundary.geoms[0]), tables=basin_data) -outlet_node = model.outlet.add( - Node(geometry=hydroobject_gdf.at[12057, "geometry"].interpolate(0.5, normalized=True)), tables=[outlet_data] +# toevoegen missende kunstwerken +mask = model.edge.df.to_node_id.isin(model.node_table().df.index) & model.edge.df.from_node_id.isin( + model.node_table().df.index ) +missing_edges_df = model.edge.df[~mask] -for edge_id in [2956, 2957, 2958, 2959, 2960, 2961]: - model.redirect_edge(edge_id, to_node_id=basin_node.node_id) - -model.remove_node(76, remove_edges=True) -model.edge.add(basin_node, model.pump[598]) -model.edge.add(basin_node, outlet_node) -model.edge.add(outlet_node, model.level_boundary[50]) - - -# %% https://github.com/Deltares/Ribasim-NL/issues/147#issuecomment-2399931763 -# Samenvoegen Westerveldse Aa -model.merge_basins(basin_id=1592, to_basin_id=1645, are_connected=True) -model.merge_basins(basin_id=1593, to_basin_id=1645, are_connected=True) +missing_edges_df.loc[:, ["point_from"]] = missing_edges_df.geometry.apply(lambda x: x.boundary.geoms[0]) +missing_edges_df.loc[:, ["point_to"]] = missing_edges_df.geometry.apply(lambda x: x.boundary.geoms[1]) -model.merge_basins(basin_id=1645, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2567, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2303, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2549, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2568, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2572, to_basin_id=1585, are_connected=True) -model.merge_basins(basin_id=2374, to_basin_id=1585, are_connected=True) +missing_nodes_df = network_validator.node_invalid_connectivity() -model.merge_basins(basin_id=2559, to_basin_id=2337, are_connected=False) +# %% https://github.com/Deltares/Ribasim-NL/issues/155#issuecomment-2454955046 -# %% see: https://github.com/Deltares/Ribasim-NL/issues/146#issuecomment-2382572457 +# 38 ontbrekende knopen toevoegen +for row in missing_nodes_df.itertuples(): + # row = next(missing_nodes_df.itertuples()) + structure = structures_gdf.loc[structures_gdf.distance(row.geometry).idxmin()] + table = getattr(model, structure.node_type.lower()) + if structure.node_type == "Pump": + model_node = model.pump.add( + Node(geometry=row.geometry, name=structure["Name"], meta_object_type=structure["meta_object_type"]), + tables=[pump_data], + ) + elif structure.node_type == "Outlet": + model_node = model.outlet.add( + Node(geometry=row.geometry, name=structure["Name"], meta_object_type=structure["meta_object_type"]), + tables=[outlet_data], + ) -# Administratie basin node_id in node_table en Basin / Area correct maken -# model.fix_unassigned_basin_area() -# model.fix_unassigned_basin_area(method="closest", distance=100) -# model.fix_unassigned_basin_area() - -# model.unassigned_basin_area.to_file("unassigned_basins.gpkg") -# model.basin.area.df = model.basin.area.df[~model.basin.area.df.node_id.isin(model.unassigned_basin_area.node_id)] - -# %% -# corrigeren knoop-topologie - -# ManningResistance bovenstrooms LevelBoundary naar Outlet -# for row in network_validator.edge_incorrect_type_connectivity().itertuples(): -# model.update_node(row.from_node_id, "Outlet", data=[outlet_data]) - -# # Inlaten van ManningResistance naar Outlet -# for row in network_validator.edge_incorrect_type_connectivity( -# from_node_type="LevelBoundary", to_node_type="ManningResistance" -# ).itertuples(): -# model.update_node(row.to_node_id, "Outlet", data=[outlet_data]) + # update edge_table + model.edge.df.loc[ + missing_edges_df[(missing_edges_df["point_from"].distance(row.geometry) < 1)].index, ["from_node_id"] + ] = model_node.node_id + model.edge.df.loc[ + missing_edges_df[(missing_edges_df["point_to"].distance(row.geometry) < 1)].index, ["to_node_id"] + ] = model_node.node_id -# # buffer out small slivers -# model.basin.area.df.loc[:, ["geometry"]] = ( -# model.basin.area.df.buffer(0.1) -# .buffer(-0.1) -# .apply(lambda x: x if x.geom_type == "MultiPolygon" else MultiPolygon([x])) -# ) # %% # basin-profielen updaten @@ -398,7 +165,7 @@ # %% write model -model.use_validation = False +model.use_validation = True model.write(ribasim_toml) # %% From afb10da04282df847f76e36d6b7e8361ad29ff1c Mon Sep 17 00:00:00 2001 From: Daniel Tollenaar Date: Mon, 4 Nov 2024 16:14:53 +0100 Subject: [PATCH 3/6] update pixi.lock --- pixi.lock | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/pixi.lock b/pixi.lock index 399a693..fb5ecfa 100644 --- a/pixi.lock +++ b/pixi.lock @@ -4165,6 +4165,16 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: bokeh-helpers + version: 0.1.0 + path: src/bokeh_helpers + sha256: 4c427e6caa50c97d621c7387f257a1f3bc2fd87e136485ddc28f6e658aa99d61 + requires_dist: + - bokeh>3 + - pytest ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: conda name: branca version: 0.7.2 @@ -7067,6 +7077,16 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: hydamo + version: 0.1.0 + path: src/hydamo + sha256: 8981c9d89f3f7f7dd48c6c5cf14396677feed3971cc661e63f398f3b57ae6f4c + requires_dist: + - geopandas + - pytest ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: conda name: hyperframe version: 6.0.1 @@ -14720,6 +14740,24 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: peilbeheerst-model + version: 0.1.0 + path: src/peilbeheerst_model + sha256: 9ec22544800123361c4449542c548c1e3739a3f8d9d5bbe2f91a8d50d304fac5 + requires_dist: + - fiona + - geopandas + - matplotlib + - networkx + - numpy + - pandas + - pydantic + - shapely + - tqdm + - pytest ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: conda name: pexpect version: 4.9.0 @@ -16989,9 +17027,9 @@ packages: timestamp: 1598024297745 - kind: pypi name: ribasim - version: 2024.10.0 + version: 2024.11.0 path: ../Ribasim/python/ribasim - sha256: c48692687129085ad19256cbf54c8df9853f6259b31997cc4a282fde86072751 + sha256: ba8a6a24955e974dd0d7ae81ad59546134417f48eabce10cb280ac5f8c3290db requires_dist: - geopandas - matplotlib @@ -17010,6 +17048,7 @@ packages: - pytest-cov ; extra == 'all' - pytest-xdist ; extra == 'all' - ribasim-testmodels ; extra == 'all' + - teamcity-messages ; extra == 'all' - xugrid ; extra == 'all' - jinja2 ; extra == 'delwaq' - networkx ; extra == 'delwaq' @@ -17019,6 +17058,7 @@ packages: - pytest-cov ; extra == 'tests' - pytest-xdist ; extra == 'tests' - ribasim-testmodels ; extra == 'tests' + - teamcity-messages ; extra == 'tests' requires_python: '>=3.10' editable: true - kind: conda @@ -17059,6 +17099,16 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: ribasim-nl + version: 0.1.0 + path: src/ribasim_nl + sha256: c88a53d538c83ac90850bab1b6312861cccdd0308477e30cc3d8879643db57c0 + requires_dist: + - geopandas + - pytest ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: conda name: rich version: 13.9.2 From a91dd2c5726caf9bbe38a9fccdade36f8c8851aa Mon Sep 17 00:00:00 2001 From: Daniel Tollenaar Date: Tue, 5 Nov 2024 09:24:13 +0100 Subject: [PATCH 4/6] verwijder edges --- .../noorderzijlvest/01_fix_model_network.py | 66 +------------------ 1 file changed, 3 insertions(+), 63 deletions(-) diff --git a/notebooks/noorderzijlvest/01_fix_model_network.py b/notebooks/noorderzijlvest/01_fix_model_network.py index 664f549..a0a4131 100644 --- a/notebooks/noorderzijlvest/01_fix_model_network.py +++ b/notebooks/noorderzijlvest/01_fix_model_network.py @@ -1,8 +1,6 @@ # %% -import geopandas as gpd import numpy as np import pandas as pd -from ribasim import Node from ribasim.nodes import basin, level_boundary, manning_resistance, outlet, pump from ribasim_nl import CloudStorage, Model, NetworkValidator @@ -15,34 +13,6 @@ ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_2024_6_3", f"{short_name}.toml") database_gpkg = ribasim_toml.with_name("database.gpkg") -pump_gdf = gpd.read_file( - cloud.joinpath(authority, "verwerkt", "5_D_HYDRO_export", "gemalen", "Noorderzijlvest_gemalen.shp"), - fid_as_index=True, -) -pump_gdf["node_type"] = "Pump" -pump_gdf["meta_object_type"] = "pump" - -culvert_gdf = gpd.read_file( - cloud.joinpath( - authority, "verwerkt", "5_D_HYDRO_export", "duikersifonhevel", "Noorderzijlvest_duikersifonhevel.shp" - ), - fid_as_index=True, -) - -culvert_gdf["node_type"] = "Outlet" -culvert_gdf["meta_object_type"] = "weir" - -weir_gdf = gpd.read_file( - cloud.joinpath(authority, "verwerkt", "5_D_HYDRO_export", "stuwen", "Noorderzijlvest_stuwen.shp"), - fid_as_index=True, -) - -weir_gdf["node_type"] = "Outlet" -weir_gdf["meta_object_type"] = "weir" - -structures_gdf = pd.concat([pump_gdf, culvert_gdf, weir_gdf], ignore_index=True) - - # %% read model model = Model.read(ribasim_toml) ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_fix_model_network", f"{short_name}.toml") @@ -66,45 +36,15 @@ pump_data = pump.Static(flow_rate=[10]) # %% +# %% https://github.com/Deltares/Ribasim-NL/issues/155#issuecomment-2454955046 -# toevoegen missende kunstwerken +# 76 edges bij opgeheven nodes verwijderen mask = model.edge.df.to_node_id.isin(model.node_table().df.index) & model.edge.df.from_node_id.isin( model.node_table().df.index ) missing_edges_df = model.edge.df[~mask] - -missing_edges_df.loc[:, ["point_from"]] = missing_edges_df.geometry.apply(lambda x: x.boundary.geoms[0]) -missing_edges_df.loc[:, ["point_to"]] = missing_edges_df.geometry.apply(lambda x: x.boundary.geoms[1]) - -missing_nodes_df = network_validator.node_invalid_connectivity() - -# %% https://github.com/Deltares/Ribasim-NL/issues/155#issuecomment-2454955046 - -# 38 ontbrekende knopen toevoegen -for row in missing_nodes_df.itertuples(): - # row = next(missing_nodes_df.itertuples()) - structure = structures_gdf.loc[structures_gdf.distance(row.geometry).idxmin()] - table = getattr(model, structure.node_type.lower()) - if structure.node_type == "Pump": - model_node = model.pump.add( - Node(geometry=row.geometry, name=structure["Name"], meta_object_type=structure["meta_object_type"]), - tables=[pump_data], - ) - elif structure.node_type == "Outlet": - model_node = model.outlet.add( - Node(geometry=row.geometry, name=structure["Name"], meta_object_type=structure["meta_object_type"]), - tables=[outlet_data], - ) - - # update edge_table - model.edge.df.loc[ - missing_edges_df[(missing_edges_df["point_from"].distance(row.geometry) < 1)].index, ["from_node_id"] - ] = model_node.node_id - - model.edge.df.loc[ - missing_edges_df[(missing_edges_df["point_to"].distance(row.geometry) < 1)].index, ["to_node_id"] - ] = model_node.node_id +model.edge.df = model.edge.df[~model.edge.df.index.isin(missing_edges_df.index)] # %% # basin-profielen updaten From ae8cccf5a3ea43883978246a3f73922bcd661c1f Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Thu, 7 Nov 2024 12:40:06 +0100 Subject: [PATCH 5/6] Undo pixi lock change --- pixi.lock | 56 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/pixi.lock b/pixi.lock index fb5ecfa..e8534b9 100644 --- a/pixi.lock +++ b/pixi.lock @@ -4165,16 +4165,6 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true -- kind: pypi - name: bokeh-helpers - version: 0.1.0 - path: src/bokeh_helpers - sha256: 4c427e6caa50c97d621c7387f257a1f3bc2fd87e136485ddc28f6e658aa99d61 - requires_dist: - - bokeh>3 - - pytest ; extra == 'tests' - requires_python: '>=3.10' - editable: true - kind: conda name: branca version: 0.7.2 @@ -7077,16 +7067,6 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true -- kind: pypi - name: hydamo - version: 0.1.0 - path: src/hydamo - sha256: 8981c9d89f3f7f7dd48c6c5cf14396677feed3971cc661e63f398f3b57ae6f4c - requires_dist: - - geopandas - - pytest ; extra == 'tests' - requires_python: '>=3.10' - editable: true - kind: conda name: hyperframe version: 6.0.1 @@ -14726,30 +14706,10 @@ packages: name: peilbeheerst-model version: 0.1.0 path: src/peilbeheerst_model - sha256: 9ec22544800123361c4449542c548c1e3739a3f8d9d5bbe2f91a8d50d304fac5 + sha256: e8c270f68d683c802990a8bb905cd665fd327b33e1d17bf3e01dfe9c49ec335e requires_dist: - - fiona - geopandas - matplotlib - - networkx - - numpy - - pandas - - pydantic - - shapely - - tqdm - - pytest ; extra == 'tests' - requires_python: '>=3.10' - editable: true -- kind: pypi - name: peilbeheerst-model - version: 0.1.0 - path: src/peilbeheerst_model - sha256: 9ec22544800123361c4449542c548c1e3739a3f8d9d5bbe2f91a8d50d304fac5 - requires_dist: - - fiona - - geopandas - - matplotlib - - networkx - numpy - pandas - pydantic @@ -17029,7 +16989,7 @@ packages: name: ribasim version: 2024.11.0 path: ../Ribasim/python/ribasim - sha256: ba8a6a24955e974dd0d7ae81ad59546134417f48eabce10cb280ac5f8c3290db + sha256: c48692687129085ad19256cbf54c8df9853f6259b31997cc4a282fde86072751 requires_dist: - geopandas - matplotlib @@ -17048,7 +17008,6 @@ packages: - pytest-cov ; extra == 'all' - pytest-xdist ; extra == 'all' - ribasim-testmodels ; extra == 'all' - - teamcity-messages ; extra == 'all' - xugrid ; extra == 'all' - jinja2 ; extra == 'delwaq' - networkx ; extra == 'delwaq' @@ -17058,7 +17017,6 @@ packages: - pytest-cov ; extra == 'tests' - pytest-xdist ; extra == 'tests' - ribasim-testmodels ; extra == 'tests' - - teamcity-messages ; extra == 'tests' requires_python: '>=3.10' editable: true - kind: conda @@ -17099,16 +17057,6 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true -- kind: pypi - name: ribasim-nl - version: 0.1.0 - path: src/ribasim_nl - sha256: c88a53d538c83ac90850bab1b6312861cccdd0308477e30cc3d8879643db57c0 - requires_dist: - - geopandas - - pytest ; extra == 'tests' - requires_python: '>=3.10' - editable: true - kind: conda name: rich version: 13.9.2 From 946999ded947affe33be6de9d4cfa6d5daa86930 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Thu, 7 Nov 2024 13:07:56 +0100 Subject: [PATCH 6/6] Update pixi lock file --- pixi.lock | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pixi.lock b/pixi.lock index e8534b9..c07be47 100644 --- a/pixi.lock +++ b/pixi.lock @@ -14706,10 +14706,12 @@ packages: name: peilbeheerst-model version: 0.1.0 path: src/peilbeheerst_model - sha256: e8c270f68d683c802990a8bb905cd665fd327b33e1d17bf3e01dfe9c49ec335e + sha256: 9ec22544800123361c4449542c548c1e3739a3f8d9d5bbe2f91a8d50d304fac5 requires_dist: + - fiona - geopandas - matplotlib + - networkx - numpy - pandas - pydantic @@ -16989,7 +16991,7 @@ packages: name: ribasim version: 2024.11.0 path: ../Ribasim/python/ribasim - sha256: c48692687129085ad19256cbf54c8df9853f6259b31997cc4a282fde86072751 + sha256: ba8a6a24955e974dd0d7ae81ad59546134417f48eabce10cb280ac5f8c3290db requires_dist: - geopandas - matplotlib @@ -17008,6 +17010,7 @@ packages: - pytest-cov ; extra == 'all' - pytest-xdist ; extra == 'all' - ribasim-testmodels ; extra == 'all' + - teamcity-messages ; extra == 'all' - xugrid ; extra == 'all' - jinja2 ; extra == 'delwaq' - networkx ; extra == 'delwaq' @@ -17017,6 +17020,7 @@ packages: - pytest-cov ; extra == 'tests' - pytest-xdist ; extra == 'tests' - ribasim-testmodels ; extra == 'tests' + - teamcity-messages ; extra == 'tests' requires_python: '>=3.10' editable: true - kind: conda