Skip to content
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

Improve cleanliness method print_infeasibilities() #354

Merged

Conversation

kruksik-dev
Copy link
Contributor

Currently, this method takes an argument that is of type None, and by default this parameter is also None. This is confusing when we want to use this method. In this MR, I correct the typing of this method so that it can accept int and None, but by default None is passed.

Additionally, the docstring for this method was difficult to read, so the generated documentation could also mislead the user. In the generated documentation there was no word about what this parameter is and that this method is only available when the gurobi solver is used (only visible in codebase via comment or when exception raised).

image

The revised docstring after generating the documentation should correct this and indicate that this method is only available when using the gurobi solver

…ng for generating better documentation description
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.

Great, thank you @kruksik-dev!

Docs and docstrings improvements are always very welcome!

@lkstrp lkstrp merged commit e11c575 into PyPSA:master Sep 30, 2024
18 of 19 checks passed
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.

2 participants