HopkinsIDD / flepiMoP

The Flexible Epidemic Modeling Pipeline
https://flepimop.org
GNU General Public License v3.0
9 stars 4 forks source link

Code chunk that does not execute in `.../src/gempyor/initial_conditions.py` because it follows a `raise ValueError` statement #312

Open emprzy opened 2 months ago

emprzy commented 2 months ago

Label

bug, gempyor

Priority Label

low priority

Describe the bug/issue

In lines 82-92 and 267-273 of initial_conditions.py (here), there are some if/else statements that will never execute because they immediately follow a raise ValueError(... statement. @jcblemai said that he arranged it this way because there is a bug in the code, and the error is thrown to notify him. Creating this issue at his request!

To Reproduce

Screenshot 2024-09-16 at 3 02 21 PM Screenshot 2024-09-16 at 3 52 03 PM

Images of the code above.

Environment, if relevant

No response

pearsonca commented 2 months ago

related to this: the valueerror in the next branch of this logic is inescapable, despite "allow_missing_subpops" suggesting otherwise. Should be fixed by fixing this.