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

[BUG] fixed dep matrix reader for serpent V 2.2.1 #512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alfoa
Copy link

@alfoa alfoa commented Feb 23, 2024

Update the note depmtrx reader to process output files from serpent version 2.2.1

Closes #511

This modification keeps backward compatibility.

Make sure you have read over the developer guide to ease
the review process. These include:

Include a thorough and concise overview of the changes, and why this PR is overall beneficial to the project.

Once the PR has been created and is nearing closure, make sure that serious changes, including deprecations and incompatible changes are documented in the changelog

@alfoa
Copy link
Author

alfoa commented Feb 27, 2024

@DanKotlyar let me know if this is okay

@DanKotlyar
Copy link
Contributor

DanKotlyar commented Mar 6, 2024 via email

Copy link
Collaborator

@drewejohnson drewejohnson left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @alfoa! Can you add a test that shows this capability is working as expected?

It looks like the test suite is failing, but not for reasons in this PR. Pytest recently removed some functionality we were using so that's a thing for us to fix.

@@ -41,6 +41,8 @@ class DepmtxReader(BaseReader, SparseReaderMixin):
----------
deltaT: float
Length of depletion interval
flx: float
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would prefer to have the full variable name just to be more explicit. And it should be typed as optional float, right? Since for older versions of serpent that don't output this data, users should expect it to not always be a float.

@@ -41,6 +41,8 @@ class DepmtxReader(BaseReader, SparseReaderMixin):
----------
deltaT: float
Length of depletion interval
flx: float
Homogenized flux
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a comment about this not existing for versions of Serpent less than 2.2.1

Comment on lines +104 to +105
if "zeros" in line:
line = stream.readline()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is the zero line added? If that's also new that's one thing but I'm pretty sure this line existed in earlier versions of Serpent.

Related to the removal of the zero line down below?

Comment on lines -107 to +119


if "zeros" in line:
line = stream.readline()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment on why removing the zeros line read

Comment on lines -118 to +133


if "zeros" in line:
line = stream.readline()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment on the removal of the zeros line read

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.

[BUG] depletion matrix reader (crash with Serpent v 2.2.1)
3 participants