Skip to content

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Aug 12, 2025

Fixes N/A (but is a task on #3688)

Summary/Motivation:

We want an easier way for users/devs to query which API version of solvers they are using.

Changes proposed in this PR:

  • Create a standard SolverAPIVersion enum
  • Add the enum as a classmethod to all solver base classes
  • Update some tests

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.

Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

Overall, this will be useful. It just needs some documentation cleanup.

@mrmundt mrmundt requested a review from jsiirola August 12, 2025 22:09
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.88%. Comparing base (58b0a43) to head (03d4062).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
pyomo/opt/base/solvers.py 71.42% 2 Missing ⚠️
pyomo/contrib/appsi/base.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3699      +/-   ##
==========================================
- Coverage   89.19%   87.88%   -1.32%     
==========================================
  Files         892      892              
  Lines      103018   103035      +17     
==========================================
- Hits        91892    90556    -1336     
- Misses      11126    12479    +1353     
Flag Coverage Δ
builders 26.74% <78.94%> (+0.01%) ⬆️
default 85.77% <84.21%> (?)
expensive 34.08% <78.94%> (?)
linux 31.38% <78.94%> (-57.55%) ⬇️
linux_other 31.38% <78.94%> (-55.57%) ⬇️
osx ?
win ?
win_other ?

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.

@michaelbynum
Copy link
Contributor

I like it!

@github-project-automation github-project-automation bot moved this from Todo to Reviewer Approved in Pyomo 6.9.4 Release Aug 19, 2025
@michaelbynum michaelbynum merged commit 7431594 into Pyomo:main Aug 19, 2025
60 of 65 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in Pyomo 6.9.4 Release Aug 19, 2025
@mrmundt mrmundt deleted the solver-api-version branch September 15, 2025 14:30
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
Development

Successfully merging this pull request may close these issues.

3 participants