Skip to content

Allow Path objects in MGXSLibrary.export_to_hdf5 - #3608

Merged
paulromano merged 3 commits into
openmc-dev:developfrom
shimwell:allowing-paths-when-exporting-mgxs-files
Oct 20, 2025
Merged

paulromano merged 3 commits into
openmc-dev:developfrom
shimwell:allowing-paths-when-exporting-mgxs-files

Conversation

@shimwell

@shimwell shimwell commented Oct 16, 2025 •

Copy link
Copy Markdown
Member

Description

I have got quite use to passing around a Path instead of strings for a filepath. I tried to save a mgxs file using a Path today and got a type error so I thought it would be nice if this function allowed Paths to be put in as well as strings (like we do in most other places in the code).

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@shimwell
shimwell requested a review from nelsonag as a code owner October 16, 2025 09:41

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@paulromano paulromano changed the title allowing path and str for mgxs file saving Allow Path objects in MGXSLibrary.export_to_hdf5 Oct 20, 2025
@paulromano
paulromano enabled auto-merge (squash) October 20, 2025 14:40
@paulromano
paulromano merged commit 3ac5d6f into openmc-dev:develop Oct 20, 2025
14 checks passed
Grego01-biot pushed a commit to Grego01-biot/openmc that referenced this pull request Oct 27, 2025
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
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