funkelab / ilpy

Unified python wrappers for popular ILP solvers
https://funkelab.github.io/ilpy/
MIT License
3 stars 2 forks source link

feat: ILPY_PREFERENCE env var #59

Closed tlambert03 closed 4 months ago

tlambert03 commented 4 months ago

this PR makes it so that you can select the default solver using ILPY_PREFERENCE=scip or ILPY_PREFERENCE=gurobi. this makes it easier to quickly swap backends without changing code. It only changes what happens when a solver is created without an explicit preference, one can still pass preference=Preference.Any etc. If an environment-specified backend is not available, it will cause an error unless Preference.Any is explicitly passed

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 59.15%. Comparing base (0fdfae7) to head (2b49f01). Report is 6 commits behind head on main.

Files Patch % Lines
ilpy/wrapper.pyx 50.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #59 +/- ## =========================================== - Coverage 75.72% 59.15% -16.58% =========================================== Files 17 19 +2 Lines 828 1087 +259 Branches 154 306 +152 =========================================== + Hits 627 643 +16 - Misses 136 420 +284 + Partials 65 24 -41 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.