Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow maingo_solvermodel to be imported without maingopy #3330

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This resolves recent test failures in the GHA singletest job. MAiNGOpy (@MAiNGO-github) released a new version yesterday (8.1) that only included wheels for Windows. Unfortunately, the MAiNGOpy setup.py has an unconditional required import of skbuild (which is not present in the Pyomo GHA environment), so the build of maingopy fails on Linux & OSX. This highlighted that the pyomo.contrib.appsi.solvers.maingo_solvermodel module is not importable without maingopy (leading to the test failure).

This PR resolves that test failure (but not the availability of maingopy on GHA Linux / OSX builds).

Changes proposed in this PR:

  • rework the imports of maingopy within the appsi_maingo solver so that module imports do not fail if maingopy is missing

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

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.50%. Comparing base (f86ac9d) to head (caa8cb5).
Report is 822 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3330      +/-   ##
==========================================
+ Coverage   88.30%   88.50%   +0.20%     
==========================================
  Files         868      868              
  Lines       98436    98418      -18     
==========================================
+ Hits        86928    87109     +181     
+ Misses      11508    11309     -199     
Flag Coverage Δ
linux 86.02% <88.88%> (+0.26%) ⬆️
osx 75.29% <66.66%> (+<0.01%) ⬆️
other 86.52% <100.00%> (+0.22%) ⬆️
win 83.83% <100.00%> (+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.

@mrmundt mrmundt merged commit 1ada528 into Pyomo:main Jul 25, 2024
32 checks passed
@jsiirola jsiirola deleted the maingopy-import-rework branch July 26, 2024 11:05
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