Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading source file with time attribute #2228

Merged
merged 2 commits into from
Oct 5, 2022

Conversation

paulromano
Copy link
Contributor

This PR addresses an issue identified by @yrrepy in #2223. It's a one-line fix, but I've gone one step further to add a test that would have caught it in the first place.

Copy link
Contributor

@gridley gridley left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

I don't see how this test actually tests anything? The test reads source.h5 but the PR adds a file with a different name (presumably this new file has a time attribute in the source). Should the test be reading this new source file?

@gonuke
Copy link
Contributor

gonuke commented Oct 5, 2022

Is this related to @ypark234 's addition of surface source read/write?

@paulromano
Copy link
Contributor Author

@gonuke The unit test and the update of the surface_source_true.h5 file are independent of one another:

  • The surface_source regression test generates a surface source and the format has now changed since it includes a time attribute, hence the update of the "true" .h5 file for comparison
  • The unit test checks that a source file created from the Python API (source.h5) can be used by the underlying C++ code (this test fails without the corresponding fix in the PR)

Copy link
Contributor

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

LGTM!

@gridley gridley merged commit 9a86c9c into openmc-dev:develop Oct 5, 2022
@paulromano paulromano deleted the sourcefile-fix branch October 10, 2022 10:11
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.

3 participants