Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python edge validation #1765

Merged
merged 32 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b1470cd
connectivity validation function implemented
Jingru923 Aug 26, 2024
a3ec21f
raise error if when adding edge
Jingru923 Aug 26, 2024
d71736a
fix build error
Jingru923 Aug 27, 2024
8618950
fix pytest error
Jingru923 Aug 27, 2024
fed1102
fix pytest error 2
Jingru923 Aug 27, 2024
e408fd7
fix build error 2
Jingru923 Aug 27, 2024
979b993
fix build error 3
Jingru923 Aug 27, 2024
d4c97e6
add unit test for validation
Jingru923 Aug 27, 2024
a0e3214
adding neighbor limit
Jingru923 Aug 28, 2024
df50143
check minimum for flow edge
Jingru923 Aug 28, 2024
f326e39
pass pytest
Jingru923 Aug 28, 2024
26bc35d
added unit test for flow edge neighbor bound
Jingru923 Aug 28, 2024
aa0a173
add another tests for outneighbor
Jingru923 Aug 28, 2024
b330e95
unit tests for minimum in-/outneighbor
Jingru923 Aug 29, 2024
1d26183
wrote unit test for maximum control edge neighbor
Jingru923 Aug 29, 2024
103958d
delete useless print line
Jingru923 Aug 29, 2024
a997501
Merge branch 'main' into py-validation
Jingru923 Aug 29, 2024
66d5a1e
add keyword of validation in Model class
Jingru923 Aug 29, 2024
7c52bd8
fix mypy error
Jingru923 Aug 29, 2024
7688be2
fix py311 py310 test 1
Jingru923 Aug 29, 2024
59c5233
fix julia unit test
Jingru923 Aug 29, 2024
58911ea
move validation unit tests to a different file
Jingru923 Aug 29, 2024
6c9622f
adding unit test for minimum control edge amount
Jingru923 Aug 29, 2024
be13e64
move validation of edge.add to a separate function
Jingru923 Aug 30, 2024
4177665
suggest possible downstream notetype in error message
Jingru923 Aug 30, 2024
894d8c7
address all comments
Jingru923 Sep 2, 2024
d9d5394
refactor and split check_neighbor_amount function
Jingru923 Sep 2, 2024
fe203cf
Merge branch 'main' into py-validation
Jingru923 Sep 2, 2024
088b869
fix outlets after merge
Jingru923 Sep 2, 2024
bae5d6f
2nd round of refactoring
Jingru923 Sep 3, 2024
450d81c
move validation function up a bit
Jingru923 Sep 3, 2024
2761043
3rd round of refactor
Jingru923 Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix pytest error 2
  • Loading branch information
Jingru923 committed Aug 27, 2024
commit fed110257c5c389f159c0eb9a7bc0c0f9f6de297
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"TabulatedRatingCurve",
"Pump",
"Outlet",
"UserDdemand",
"UserDemand",
],
"LinearResistance": ["Basin", "LevelBoundary"],
"ManningResistance": ["Basin"],
Expand Down Expand Up @@ -37,4 +37,4 @@
def can_connect(node_up: str, node_down: str) -> bool:
Jingru923 marked this conversation as resolved.
Show resolved Hide resolved
Jingru923 marked this conversation as resolved.
Show resolved Hide resolved
if node_up in connectivity:
return node_down in connectivity[node_up]
return False

Check warning on line 40 in python/ribasim/ribasim/validation.py

View check run for this annotation

Codecov / codecov/patch

python/ribasim/ribasim/validation.py#L40

Added line #L40 was not covered by tests
Loading