Skip to content

feat(mf6): opt out of writing default values - #2712

Open
wpbonelli wants to merge 1 commit into
modflowpy:developfrom
wpbonelli:fix-2710
Open

feat(mf6): opt out of writing default values#2712
wpbonelli wants to merge 1 commit into
modflowpy:developfrom
wpbonelli:fix-2710

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Feb 15, 2026

Copy link
Copy Markdown
Member

Add a simulation configuration setting write_defaults=True, toggling whether to include optional fields that have the default value when writing input files. Default to True so this is opt-in, non-breaking. Setting this False can make input files written by FloPy more likely to be compatible with older versions of MF6, at the price of uncertain behavior as defaults may change.

Address #2710

@codecov

codecov Bot commented Feb 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.3%. Comparing base (556c088) to head (e115db5).
⚠️ Report is 205 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/mf6/data/mfdatascalar.py 57.1% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2712      +/-   ##
===========================================
+ Coverage     55.5%    73.3%   +17.8%     
===========================================
  Files          644      659      +15     
  Lines       124135   132238    +8103     
===========================================
+ Hits         68947    97040   +28093     
+ Misses       55188    35198   -19990     
Files with missing lines Coverage Δ
flopy/mf6/data/mfstructure.py 74.2% <100.0%> (+0.5%) ⬆️
flopy/mf6/mfsimbase.py 62.9% <100.0%> (-12.6%) ⬇️
flopy/mf6/data/mfdatascalar.py 58.8% <57.1%> (-0.5%) ⬇️

... and 582 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wpbonelli
wpbonelli marked this pull request as ready for review February 16, 2026 13:17
@wpbonelli wpbonelli added this to the 3.10.1 milestone Feb 16, 2026
@wpbonelli wpbonelli changed the title fix(mfdatascalar): skip fields with default values fix(mfdatascalar): skip multiple choice fields with default values Feb 16, 2026
@wpbonelli
wpbonelli marked this pull request as draft February 17, 2026 19:36
@wpbonelli

This comment was marked as outdated.

@wpbonelli

This comment was marked as resolved.

@wpbonelli wpbonelli changed the title fix(mfdatascalar): skip multiple choice fields with default values fix(mf6): initialize optional variables to None, not default Feb 18, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review February 18, 2026 12:36
@wpbonelli wpbonelli changed the title fix(mf6): initialize optional variables to None, not default fix(mf6): don't write optional default values by default Feb 18, 2026
@wpbonelli wpbonelli changed the title fix(mf6): don't write optional default values by default fix(mf6): opt into writing optional default values Feb 18, 2026
@wpbonelli

This comment was marked as outdated.

@wpbonelli wpbonelli changed the title fix(mf6): opt into writing optional default values feat(mf6): opt into writing optional default values Jul 8, 2026
@wpbonelli wpbonelli added enhancement and removed bug labels Jul 8, 2026
@wpbonelli wpbonelli modified the milestones: 3.10.1, 3.12 Jul 8, 2026
@wpbonelli

This comment was marked as low quality.

@wpbonelli wpbonelli removed this from the 3.12 milestone Aug 14, 2026
@wpbonelli wpbonelli changed the title feat(mf6): opt into writing optional default values feat(mf6): opt out of writing default values Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant