-
Notifications
You must be signed in to change notification settings - Fork 71
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
[ENHANCEMENT] more informative error when no setting is provided #537
Comments
Maybe make providing StressModel settings mandatory? Even though an input time series is long enough. |
|
- improve simulation has NaNs msg to include example code for stressmodel settings - add traps for method is None in fill_before and fill_after, raise ValueError - avoid issues with trailing or leading NaNs in time series by setting tmin/tmax to first/last valid index - add more informative error message when weights and observations are not same length - improve msg formatting
Related to the time series settings. I found out about there exists something like the TypedDict in Python. This can help us to be more informative about the settings have to be provided. For stresses the the following settings have to be known: So code would look something like this:
|
Closed by #639 |
Pastas can not do certain tasks if no settings are provided in the StressModel. For example, when the series is not long enough for the provided warmup, I get the following error:
ValueError: Simulation contains Nan-values. Check stresses time series settings!
.This error is not informative. The series is not long enough and needs to be extended in the past. I suggest to state that no settings are provided to the StressModel so that pastas doesn't know what to do. With instructions on how to do that. Also, there may be easier ways to specify the settings.
The text was updated successfully, but these errors were encountered: