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

Handle cases where a graphfunction has removed all potential pipe carrying edges #220

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

barneydobson
Copy link
Collaborator

@barneydobson barneydobson commented Jun 13, 2024

Description

It is possible a graph function could result in a graph with no edges - at which point iterate_graphfcns cannot proceed. Since I am often calling swmmanywhere in a single script - it is preferrable that this doesn't simply crash out. This PR handles and tests that

Fixes #216

@barneydobson barneydobson linked an issue Jun 13, 2024 that may be closed by this pull request
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code itself looks ok, but I wonder on the use case. Why would a graph end up with no edges? A graph without edges... is still a graph?

@barneydobson
Copy link
Collaborator Author

Yep it's still a valid graph - but not a valid sewer model - so if I try write this and simulate it in SWMM it will crash.

A graph could end up with no edges, for example, if all of the nodes are within node_merge_distance of each other

Copy link
Collaborator

@cheginit cheginit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@barneydobson barneydobson merged commit e365184 into main Jun 19, 2024
4 of 8 checks passed
@barneydobson barneydobson deleted the 216-possibly-no-streets branch June 19, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibly no streets?
3 participants