-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issue #1222 validation context #1226
Issue #1222 validation context #1226
Conversation
…defaults accordingly
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cleans things up neatly!
use_absolute_paths: bool = False | ||
write_directory: Path = None # type: ignore | ||
|
||
def __post_init__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Didn't know about this method
46c2e85
into
imod5_converter_feature_branch
Fixes #1222
Description
ValidationContext
dataclass_validation_context
attribute toModflow6Simulation
; this replaces the_is_from_imod5
attribute.ValidationContext
contains an attribute for strict well checks, turned on by default. This is set to False when callingfrom_imod5
or for split simulations._to_mf6_pkg
method in a similar design as proposed in RemoveWriteContext
from public API #1223, this to preserve public API.WriteContext
, to make it a dataclass again. I had to ignore type annotation forwrite_directory
, otherwise MyPy would throw errors. The whole property shebang presumably started with MyPy throwing errors. Reverting it back to a dataclass reduces the lines of code considerably, which makes it more maintainable.Checklist
Issue #nr
, e.g.Issue #737