Skip to content

Conversation

ulfworsoe
Copy link
Contributor

@ulfworsoe ulfworsoe commented Jul 18, 2025

Closes #474

Changes proposed in this Pull Request

  • Remove explicit use of mosek.Env, use global environment instead. This avoids checking out new licenses for each new task created, and avoids creating and destroying environment object for each task.

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

Copy link
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ulfworsoe !

Could you update the docstring and add a warning that when env is passed, a DeprecationWarning is thrown to indicate that global env should be used instead? Perhaps also link to their documentation. Right now env is still in the signature but not doing something without any warning

Also pre-commit and types need to be fixed

@ulfworsoe
Copy link
Contributor Author

Docstrings updated and warnings added. Let me know if anything else is necessary.

@maurerle
Copy link
Contributor

maurerle commented Aug 5, 2025

@ulfworsoe you should also run the pre-commits:
pip install pre-commit
and then pre-commit run --all-files

@ulfworsoe
Copy link
Contributor Author

Fixed. I also ran the pre-commits (thank you for instructions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using MOSEK from Linopy
4 participants