-
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
silence HantushWellModel info msg about r=1.0 #604
Conversation
- add warn keyword argument to methods - add if/else to determine whether rfunc is HantushWM
Coverage summary from CodacyMerging #604 (e769550) into
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
@dbrakenhoff , thanks for the PR. I see that fixing this would be nice. I thought of another (easyier?) fix. Can we not deal with the distance=None issue when creating a WellModel instance? An assign r=1 if no distances are provided? That would fix it as well write? It seems to me that r should not be None in all cases anyway. Cheers, |
That could work, and we could set the default value to 1 m or the distance to the first well. But that would mean users would have to be aware that when using I think my preference is this PR, which provides a warning when users call |
I agree that it's better to make there users aware and raise a warning. Still, could we not do that when creating the stress model without a distance and setting r to 1, and raising the warning once upon creation? Would prevent a lot of code and it would not be a silent assumption right? |
The trouble is that the warning isn't likely to be generated at creation, but when users want to use the Model class convenience methods for getting information from the stressmodels (i.e. |
This PR silences the info message internally by adding a warn keyword argument and checking whether the current rfunc is HantushWellModel in
ps.Model
methods.In my opinion this is a bit ugly, but perhaps worth silencing the confusing message? So far 3 issues have been posted about it, so it is confusing people.
Checklist before PR can be merged: