Repository navigation
Fixing Gurobi direct MINLP tests to work with Gurobi 14 - #4104
Conversation
|
|
||
| @unittest.skipUnless(old_gurobipy_available, "Gurobipy >= 12 and < 14 is not available") | ||
| @unittest.pytest.mark.solver("gurobi_direct_minlp") | ||
| class TestOldGurobiMINLPWriter(GurobiMINLPWalkerTests, CommonTest): |
There was a problem hiding this comment.
You did this in test_gurobi_minlp_writer.py already but should this class inherit from OldGurobiTest so you don't have to duplicate the implementation of these methods?
There was a problem hiding this comment.
Yes, whoops, that is totally what I meant to do!
There was a problem hiding this comment.
Yes, whoops, that is totally what I meant to do!
|
|
||
| @unittest.skipUnless(gurobipy_14_available, "Gurobipy >= 14 is not available") | ||
| @unittest.pytest.mark.solver("gurobi_direct_minlp") | ||
| class TestGurobi14MINLPWalker(GurobiMINLPWalkerTests, CommonTest): |
There was a problem hiding this comment.
You did this in test_gurobi_minlp_writer.py already but should this class inherit from Gurobi14Test so you don't have to duplicate the implementation of these methods?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4104 +/- ##
=======================================
Coverage 90.30% 90.30%
=======================================
Files 920 920
Lines 109618 109612 -6
=======================================
- Hits 98987 98984 -3
+ Misses 10631 10628 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: John Siirola <jsiirola@users.noreply.github.com>
Fixes #4084
Summary/Motivation:
Nothing is actually wrong with the current MINLP writer with Gurobi 14 (though we can make it better, which I'm deferring): However, nonlinear constraints became regular citizens in a way that changed a lot of the public APIs we are using for testing. This PR updates the tests, generalizing how we get/test the nonlinear constraints into two separate (tiny) base classes, one for Gurobi versions >= 12 and < 14 and the other for versions >= 14.
Changes proposed in this PR:
AI-Use Disclosure
I used @jsiirola instead! :)
or
AI tools contributed to the development of this PR
Review process (select ONE):
Notes for reviewers (optional):
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: