Skip to content

Conversation

@tom-welfonder
Copy link
Contributor

Add function to ensure that added variables do not use unvalid dimension names.
Add test for variable assignment with invalid dimension name.
This code adds a more meaning full error message if users try to create new variables with invalid dimension names.
Old behavior is described in #359.

Add function to ensure that added variables do not use unvalid dimension names.
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.

Hey @tom-welfonder, thanks for the contribution! And sorry for taking a while. That looks like a useful check. Just some minor things.

tom-welfonder and others added 4 commits December 8, 2024 14:17
More condensed check of dim_names

Co-authored-by: Lukas Trippe <lkstrp@pm.me>
remove unnecessary else block

Co-authored-by: Lukas Trippe <lkstrp@pm.me>
make check_valid_dim_names private

Co-authored-by: Lukas Trippe <lkstrp@pm.me>
make check_valid_dim_names private

Co-authored-by: Lukas Trippe <lkstrp@pm.me>
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.

Thank you @tom-welfonder !

@lkstrp lkstrp merged commit ede48e3 into PyPSA:master Dec 12, 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