Skip to content

Commit

Permalink
Fix test model
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Feb 16, 2024
1 parent f0e70c8 commit dd273e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/src/read.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ function initialize_allocation!(p::Parameters, config::Config)::Nothing
(; allocation_network_ids, allocation_models, main_network_connections) = allocation
allocation_network_ids_ = sort(collect(keys(graph[].node_ids)))

if isempty(allocation_network_ids_)
return nothing

Check warning on line 209 in core/src/read.jl

View check run for this annotation

Codecov / codecov/patch

core/src/read.jl#L209

Added line #L209 was not covered by tests
end

errors = non_positive_allocation_network_id(graph)
if errors
error("Allocation network initialization failed.")
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_testmodels/ribasim_testmodels/allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ def allocation_target_model():
df=gpd.GeoDataFrame(
data={
"type": node_type,
"allocation_network_id": 5 * [2],
"subnetwork_id": 5 * [2],
},
index=pd.Index(np.arange(len(xy)) + 1, name="fid"),
geometry=node_xy,
Expand Down

0 comments on commit dd273e6

Please sign in to comment.