Skip to content

fix: allow Path type in io methods#1417

Merged
lkstrp merged 2 commits intoPyPSA:masterfrom
mgrabovsky:export-path-type
Oct 21, 2025
Merged

fix: allow Path type in io methods#1417
lkstrp merged 2 commits intoPyPSA:masterfrom
mgrabovsky:export-path-type

Conversation

@mgrabovsky
Copy link
Copy Markdown
Contributor

@mgrabovsky mgrabovsky commented Oct 21, 2025

Changes proposed in this Pull Request

Allow passing a Path to n.export_to_netcdf(). It works already, but the argument type didn't allow for the option.

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in docs.
  • Unit tests for new features were added (if applicable) – not necessary, I believe?
  • A note for the release notes docs/release-notes.md of the upcoming release is included – not necessary, I believe?
  • I consent to the release of this PR's code under the MIT license.

Copy link
Copy Markdown
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.

Thanks @mgrabovsky !

Could you also check/ adjust the other io types?

@mgrabovsky
Copy link
Copy Markdown
Contributor Author

I've fixed the type for export_to_csv_folder() as well. All others (including importers) look fine at a quick glance.

@mgrabovsky mgrabovsky changed the title fix: allow Path type in export_to_netcdf fix: allow Path type in io methods Oct 21, 2025
@lkstrp lkstrp merged commit c46dec0 into PyPSA:master Oct 21, 2025
22 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