Skip to content

Conversation

@jsiirola
Copy link
Member

@jsiirola jsiirola commented Jan 16, 2026

Fixes #N/A; Follow-on to #3815.

Summary/Motivation:

#3815 got the documentation builds running again, but the custom Sphinx extensions were not getting correctly activated / run. This PR is a follow-on that monkey-patches additional functions within Sphinx's autosummary extensions so that Pyomo's extensions will run correctly in Sphinx 9.x.

This PR also adds tests for verifying that Sphinx is generating correct html:

(Note that this PR will initially fail tests -- I am checking that the new unit tests pick up the sphinx-doc/sphinx#14223 error)

This PR will also disallow 9.0.x and 9.1 because of the reference bug.

Changes proposed in this PR:

  • clean up / document the Sphinx extension
  • Add additional monkeypatches to work around ausosummary not honoring autodoc_use_legacy_class_based
  • Add tests to catch the recent doc build errors
  • Disallow recent (9.x) Sphinx releases

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 Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.43%. Comparing base (c9ebf1a) to head (45f612d).
⚠️ Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3818      +/-   ##
==========================================
- Coverage   89.43%   89.43%   -0.01%     
==========================================
  Files         906      905       -1     
  Lines      105445   105422      -23     
==========================================
- Hits        94307    94286      -21     
+ Misses      11138    11136       -2     
Flag Coverage Δ
builders 29.12% <ø> (-0.03%) ⬇️
default 86.05% <ø> (?)
expensive 35.75% <ø> (?)
linux 86.74% <ø> (-2.46%) ⬇️
linux_other 86.74% <ø> (-0.01%) ⬇️
osx 82.92% <ø> (ø)
win 85.00% <ø> (ø)
win_other 85.00% <ø> (ø)

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.

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.

I am fine with this as-is but have one silly nitpick.

Removed duplicate directory path definitions for HTML build.
@blnicho blnicho merged commit fc1e962 into Pyomo:main Jan 19, 2026
63 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants