Skip to content

Handle omitted optional HDF5 strings in Python readers - #4118

Merged
paulromano merged 4 commits into
openmc-dev:developfrom
paulromano:fix-optional-hdf5-strings
Sep 9, 2026
Merged

Handle omitted optional HDF5 strings in Python readers#4118
paulromano merged 4 commits into
openmc-dev:developfrom
paulromano:fix-optional-hdf5-strings

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

This PR is an alternative to #4088 that preserves the existing HDF5 convention of omitting empty string attributes and datasets. Rather than changing the low-level string writer and every file it produces, this PR makes readers that consume optional strings supply the appropriate default when a field is absent. In particular:

Closes #2285

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • 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)

@paulromano
paulromano requested a review from GuySten September 9, 2026 16:14
@paulromano paulromano mentioned this pull request Sep 9, 2026
5 tasks

@GuySten GuySten 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.

I fixed another unguarded read.

@GuySten GuySten added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Sep 9, 2026
@paulromano
paulromano merged commit 34ceb3d into openmc-dev:develop Sep 9, 2026
19 of 34 checks passed
@paulromano
paulromano deleted the fix-optional-hdf5-strings branch September 9, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merging Soon PR will be merged in < 24 hrs if no further comments are made.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LibMesh::filename_ attribute not written when pointer-based constructors are used.

2 participants