-
Notifications
You must be signed in to change notification settings - Fork 563
[Xpress] Remove deprecation warnings (#1) #3794
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
base: main
Are you sure you want to change the base?
Conversation
* TXP-7757: removed most deprecation warnings up to current unpublished release * Fixed more warnings * Missing version agnostic functions * Fixed version specific LPStatus enums + renamed get-lb/ub methods * Suggested improvements
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3794 +/- ##
==========================================
- Coverage 89.42% 88.40% -1.02%
==========================================
Files 909 909
Lines 105579 105675 +96
==========================================
- Hits 94411 93419 -992
- Misses 11168 12256 +1088
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g') | ||
| echo "Installing for $PYVER" | ||
| for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" cyipopt pymumps scip; do | ||
| for PKG in 'cplex>=12.10' docplex gurobi "$XPRESS" 'xpress<9.3' cyipopt pymumps scip; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changing the xpress version for every GHA job using conda to install Python packages which is not what I think you intended. During the dev call we talked about installing an older version of xpress on just one or two jobs to exercise the version-specific logic in the solver interface. I think you can do this by modifying the if-tree above that sets the XPRESS environment variable. There is already some special logic there for windows so maybe we use the linux conda job for this. I think you can just modify the else section on line 450 to something like:
if test "${{matrix.TARGET}}" == linux; then
XPRESS='xpress<9.3'
else
XPRESS='xpress'
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I should have asked for clarification during the call!
I've applied the changes, targeting Python 3.10 so the latest Xpress release is still tested in the other jobs. Let me know if there are any other issues.
Hi!
Fixes
Summary/Motivation:
Starting with Xpress 9.8 (Python API version 46), FICO deprecated lowercase function names in favor of camelCase (e.g.,
lpoptimize→lpOptimize) and removed several enum types. The old functions are still available but deprecated, and will be removed in future releases. This PR adds runtime version detection to dispatch to the correct functions and enums based on the installed Xpress version, eliminating deprecation warnings while maintaining backward compatibility.Changes proposed in this PR:
XpressDirectinterface instead of calling Xpress Python APIs directlyLegal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: