USEPA / pybeepop

EPA's Python wrapper for the EPA/USDA honey bee colony model BeePop+
https://usepa.github.io/pybeepop/
MIT License
1 stars 0 forks source link

If an invalid parameter is passed it still becomes 'set' in the parameter list #8

Open JeffreyMinucci opened 2 months ago

JeffreyMinucci commented 2 months ago

If in invalid parameter is passed to the model, an exception is raised as expected, but the invalid parameter still gets added to the parameter list. As a result, subsequent attempts to set parameters always fail as the entire saved parameter list is checked each time.

Possible solution: check the validity of newly passed parameters only (both via load_input_file() and set_parameters()) and do not set any parameters if any are invalid. Update the exception message to be clear that no parameters were set.