sepandhaghighi / pyrgg

🔧 Python Random Graph Generator
https://www.pyrgg.site
MIT License
203 stars 29 forks source link

Warn on invalid input #152

Closed sadrasabouri closed 10 months ago

sadrasabouri commented 11 months ago

What does this implement/fix? Explain your changes.

There were places in menu which was formerly ignored if user gives invalid input. Some of them (listed below) are now checked before start generating graphs.

Any other comments?

Checking if max_edge > min_edge or max_weight > min_weight seems to be handled in a different way. If it's necessary we should do it in another PR.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (07aace7) 98.11% compared to head (d998d81) 98.58%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #152 +/- ## ========================================== + Coverage 98.11% 98.58% +0.47% ========================================== Files 4 4 Lines 475 491 +16 Branches 74 76 +2 ========================================== + Hits 466 484 +18 + Misses 6 4 -2 Partials 3 3 ``` | [Files](https://app.codecov.io/gh/sepandhaghighi/pyrgg/pull/152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sepand+Haghighi) | Coverage Δ | | |---|---|---| | [pyrgg/functions.py](https://app.codecov.io/gh/sepandhaghighi/pyrgg/pull/152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sepand+Haghighi#diff-cHlyZ2cvZnVuY3Rpb25zLnB5) | `98.15% <100.00%> (+0.91%)` | :arrow_up: | | [pyrgg/params.py](https://app.codecov.io/gh/sepandhaghighi/pyrgg/pull/152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sepand+Haghighi#diff-cHlyZ2cvcGFyYW1zLnB5) | `100.00% <ø> (ø)` | | | [pyrgg/test.py](https://app.codecov.io/gh/sepandhaghighi/pyrgg/pull/152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sepand+Haghighi#diff-cHlyZ2cvdGVzdC5weQ==) | `0.00% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.