Interface SCIP methods - #1237
Conversation
There was a problem hiding this comment.
@Joao-Dionisio were there some changes in the ruff config? I didn't even touch these lines in my commits.
If it's ok I can refactor it to use the more modern X | Y syntax as suggested in the error message
There was a problem hiding this comment.
This is likely just a new ruff version flagging some errors. I'd just merge without caring much about this, but if you're offering to fix this, I'm more than happy to accept :)
I'll take a little bit to review, but everything seems to be in order. Can you please make sure that the optimized_model() manages to find primal solutions?
There was a problem hiding this comment.
I checked that optmized_model() wasn't able to find any primal solution, so I 've increased the node limit parameter and now it finds 1.
Regarding the X | Y syntax, I only changed it in scip.pyi to pass the pipeline checks and because this syntax is already used there.
I was thinking about replacing typing.Union in the entire repo, but in general such fixes are considered unsafe for Python versions prior to 3.10 (see for reference: https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/) and pyproject.toml only requires python>=3.8. Maybe there's no point in touching it until the project moves to python>=3.10?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1237 +/- ##
==========================================
- Coverage 57.91% 57.29% -0.62%
==========================================
Files 26 27 +1
Lines 5807 5936 +129
==========================================
+ Hits 3363 3401 +38
- Misses 2444 2535 +91 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds the following methods:
getNNodesLeft(),getNRuns(),getNReoptRuns(),addNNodes(),getDeterministicTime(),getAvgDualbound(),getMaxTotalDepth(),getNBacktracks(),getFocusNode(),getAvgLowerbound(),getFirstPrimalBound(),getLowerboundRoot(),getUpperbound(),getNObjlimLeaves()Adds tests in
tests/test_statistics.pyfor migrated methodsAdds function signatures to
scip.pyifor hintsUpdates
CHANGELOG.md