You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1211 introduced some extra settings to the WriteContext. @Manangka mentioned these are getting kind of outside the scope of this object. The WriteContext docstring mentions it is used for writing options, but validation options upon writing were not its intention.
It is probably good to separate the validation settings into a separate context ValidationContext.
The text was updated successfully, but these errors were encountered:
Fixes#1222
# Description
- Add a ``ValidationContext`` dataclass
- Add a ``_validation_context`` attribute to ``Modflow6Simulation``;
this replaces the ``_is_from_imod5`` attribute.
- The ``ValidationContext`` contains an attribute for strict well
checks, turned on by default. This is set to False when calling
``from_imod5`` or for split simulations.
- Adds a ``_to_mf6_pkg`` method in a similar design as proposed in
#1223, this to preserve public API.
- Refactor ``WriteContext``, to make it a dataclass again. I had to
ignore type annotation for ``write_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.
- Use jit for examples run, this speeds them up considerably. The
examples ran into a TimeOut on TeamCity, and this reduces the change of
that happening again.
# Checklist
<!---
Before requesting review, please go through this checklist:
-->
- [x] Links to correct issue
- [x] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [ ] Unit tests were added
- [ ] **If feature added**: Added/extended example
#1211 introduced some extra settings to the
WriteContext
. @Manangka mentioned these are getting kind of outside the scope of this object. TheWriteContext
docstring mentions it is used for writing options, but validation options upon writing were not its intention.It is probably good to separate the validation settings into a separate context
ValidationContext
.The text was updated successfully, but these errors were encountered: