Skip to content

fix: pathlib paths in collections#1530

Merged
lkstrp merged 4 commits intoPyPSA:masterfrom
lkstrp:collection-fix
Jan 26, 2026
Merged

fix: pathlib paths in collections#1530
lkstrp merged 4 commits intoPyPSA:masterfrom
lkstrp:collection-fix

Conversation

@lkstrp
Copy link
Copy Markdown
Member

@lkstrp lkstrp commented Jan 19, 2026

Closes #1525

@lkstrp lkstrp requested a review from euronion January 19, 2026 13:26
Copy link
Copy Markdown
Contributor

@euronion euronion left a comment

Choose a reason for hiding this comment

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

Thanks.

Would also be nice to be able to pass dict objects and have nc.items(), such that on can iterate like

for name, network in nc.items():
...

@lkstrp
Copy link
Copy Markdown
Member Author

lkstrp commented Jan 19, 2026

Thanks.

Would also be nice to be able to pass dict objects and have nc.items(), such that on can iterate like

for name, network in nc.items():
...

I agree on passing dicts. But nc.items will not work because the index can be multi dimensional, which will also have an effect on statistics and plots. You can always loop on nc.networks.

@lkstrp lkstrp enabled auto-merge (squash) January 26, 2026 17:02
@lkstrp lkstrp merged commit 71e7a96 into PyPSA:master Jan 26, 2026
26 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.

NetworkCollection(...) should support same path-like types as Network(...)

2 participants