Skip to content

Ignore LinopySemanticsWarning in the tests - #75

Closed
dmeoli wants to merge 1 commit into
SPSUnipi:mainfrom
dmeoli:fix/linopy-semantics-warning
Closed

dmeoli wants to merge 1 commit into
SPSUnipi:mainfrom
dmeoli:fix/linopy-semantics-warning

Conversation

@dmeoli

@dmeoli dmeoli commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Since #67 the FutureWarnings are errors, and the tests of main fail: the run of 6b409c9 (#67 itself) and that of 46a3912 (after the revert of #62) fail in the same 22 places, all with LinopySemanticsWarning, e.g.

linopy.config.LinopySemanticsWarning: Variable 'Generator-p' has absent slots (from `mask=` / `.where()` / `.shift()` / `.reindex()`). ...

The warning is raised by linopy 0.10 while PyPSA builds its model, about the change of semantics that linopy announces; nothing of this package raises it. Hence #62 was not the cause, and its revert did not fix main.

This keeps the FutureWarnings as errors and ignores that one class. With it the whole suite passes on main with the FutureWarnings as errors: 43 passed and 16 skipped, with ucblock_solver, tssb_solver and investmentblock_solver of SMS++ develop on the PATH.

Once this is in, #62 can go back in as it was: I will open a new PR with it.

…builds is ignored, the FutureWarnings being errors since SPSUnipi#67
@dmeoli

dmeoli commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: this only made the tests pass with the FutureWarnings as errors of #67, which #77 has reverted.

@dmeoli dmeoli closed this Oct 28, 2026
@dmeoli
dmeoli deleted the fix/linopy-semantics-warning branch October 28, 2026 18:20
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.

1 participant