Skip to content

Update Config classes / testing / documentation#3790

Merged
blnicho merged 22 commits intoPyomo:mainfrom
jsiirola:config-updates
Feb 4, 2026
Merged

Update Config classes / testing / documentation#3790
blnicho merged 22 commits intoPyomo:mainfrom
jsiirola:config-updates

Conversation

@jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This PR was motivated by two new features in the Config system:

  • ConfigDict.add() should accept keyword arguments so that users can specify modifiers like visibility without explicitly creating the ConfigValue
  • ConfigDict should derive from MutableMapping so that methods like update() are defined / available.

As part of implementing that, this PR made a number of other improvements

  • [Performance] Split ConfigBase.__call__ so that the ConfigDict-specific logic is in an overload method on ConfigDict
  • [Performance] Avoid unnecessary calls to generate_documentation()
  • [Performance] re-use method documenter in document_class_CONFIG
  • [bugfix] fix logic when trapping recursion errors in domain pickler
  • [feature] Expose additional classes from enum (Flag, IntFlag, EnumType)
  • Update / expand unit testing
  • Significant update / expansion on documentation

Changes proposed in this PR:

  • (see above)

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.44%. Comparing base (739e072) to head (122026c).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3790      +/-   ##
==========================================
+ Coverage   89.43%   89.44%   +0.01%     
==========================================
  Files         904      904              
  Lines      105378   105385       +7     
==========================================
+ Hits        94243    94262      +19     
+ Misses      11135    11123      -12     
Flag Coverage Δ
builders 29.04% <72.72%> (-0.02%) ⬇️
default 83.57% <89.09%> (?)
expensive 35.53% <76.36%> (?)
linux 86.76% <100.00%> (-2.44%) ⬇️
linux_other 86.76% <100.00%> (+0.01%) ⬆️
osx 82.91% <89.09%> (+<0.01%) ⬆️
win 84.98% <89.09%> (+<0.01%) ⬆️
win_other 84.98% <89.09%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@blnicho blnicho self-requested a review December 2, 2025 19:45
Copy link
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo I like this.

@github-project-automation github-project-automation bot moved this from Todo to Reviewer Approved in Pyomo 6.10 Jan 9, 2026
@blnicho blnicho merged commit f2d23a5 into Pyomo:main Feb 4, 2026
35 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in Pyomo 6.10 Feb 4, 2026
@jsiirola jsiirola deleted the config-updates branch February 6, 2026 05:08
@jsiirola jsiirola restored the config-updates branch February 6, 2026 05:08
@jsiirola jsiirola deleted the config-updates branch February 6, 2026 05:08
jsiirola added a commit to jsiirola/pyomo that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants