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

Unit Test for constraints #1297

Draft
wants to merge 2 commits into
base: pypsa_linopy_update
Choose a base branch
from

Conversation

GbotemiB
Copy link
Collaborator

@GbotemiB GbotemiB commented Jan 15, 2025

Closes #1203 .

Changes proposed in this Pull Request

This PR aims to test constraints functionalities

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and doc/requirements.txt.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@ekatef
Copy link
Member

ekatef commented Jan 16, 2025

Hello @GbotemiB, thanks a lot for taking this issue! This first step looks like a nice and clean implementation!

As discussed, I completely support your idea of taking a test case which is representative for each of the constraints. Agree that the constraints functions could be documented better. That is the point which has been partially tackled in linopy PR: the dosctrings have been added to the most of constraint functions. Though, the coverage can be improved for sure!

I'd suggest you to go trough solve_network_script in linopy PR and use the code review functionality to mark of the point where clarifications are needed for the existing docstrings or adding of the docstrings must be prioritised. Would it work?

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