PyPSA / linopy

Linear optimization with N-D labeled arrays in Python
https://linopy.readthedocs.io
MIT License
162 stars 45 forks source link

make it possible to suppress solver output when running CBC and GLPK #224

Closed maurerle closed 8 months ago

maurerle commented 8 months ago

Currently, the solver output is printed all the time to stdout using print when using CBC or GLPK. This should be fixed, by also using the logging module.

I did set this to INFO, so that users relying on this output can still use it without going to debug logs.

It would be very cool to have release with this change afterwards

maurerle commented 8 months ago

It does not look like I can do anything about 3.9-macos and 3.11-macos failing - it says Fatal Python error: Illegal instruction coming from pyscipopt solving with scip

FabianHofmann commented 8 months ago

Great! thanks @maurerle, would you mind putting a short note to the release notes? CI problem seemed to be due to a wrong installation (is working now).

maurerle commented 8 months ago

Sure, is it fine like this @FabianHofmann ?

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9a34bdb) 89.54% compared to head (9985f1f) 86.88%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #224 +/- ## ========================================== - Coverage 89.54% 86.88% -2.66% ========================================== Files 15 15 Lines 3405 3409 +4 Branches 787 591 -196 ========================================== - Hits 3049 2962 -87 - Misses 245 336 +91 Partials 111 111 ```

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

FabianHofmann commented 8 months ago

awesome, thanks!

maurerle commented 7 months ago

@FabianHofmann could you please publish a release with this version soon?

FabianHofmann commented 7 months ago

@maurerle already happened :) conda should be available within the next hour

maurerle commented 7 months ago

Would you also add the release here: https://github.com/PyPSA/linopy/releases This is also missing for 0.3.3

This would make it possible to easily see the changes since the last release :)