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

Add check to ensure network is a directed acyclical graph #104

Merged
merged 13 commits into from
Nov 15, 2024

Conversation

michael-okeefe
Copy link
Member

This PR enables the check functionality to also detect if there are cycles in the network. Networks in ERIN must be directed acyclical graphs (DAG). In this PR, we also discovered that exit codes were not being bubbled up to main's exit correctly. This PR fixes that as well.

Fixes #36

Expands the checks done on the network with `erin check`.
This uses Tarjan's strongly connected component algorithm
and checks to see if strongly connected components (i.e.,
cycles) exist in the network. If they do, they are reported.
The subcommands were not returning values passed back out to main.
Thus, if a subcommand returned a non-zero exit code, it was not
being passed out of main. This change enables the exit codes to
be captured from subcommands and passed out as main's exit code.
@michael-okeefe michael-okeefe added bug Something isn't working enhancement New feature or request required-functionality This task is a requirement to meet labels Nov 15, 2024
@michael-okeefe michael-okeefe added this to the 2024 (Year End) milestone Nov 15, 2024
@michael-okeefe michael-okeefe self-assigned this Nov 15, 2024
@michael-okeefe michael-okeefe marked this pull request as ready for review November 15, 2024 18:08
@michael-okeefe michael-okeefe merged commit 7f7448a into develop Nov 15, 2024
12 checks passed
@michael-okeefe michael-okeefe deleted the feature/ensure-network-is-DAG branch November 15, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request required-functionality This task is a requirement to meet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add check for TOML input to ensure network is a DAG
1 participant