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

Introduce output class using OpenMC API #328

Merged
merged 11 commits into from
Oct 25, 2024
Merged

Conversation

alexvalentine94
Copy link
Collaborator

Description

Introduce output class for openmc using the API. Read code version from statepoint for metadata.

Type of change

Please select what type of change this is.

  • Bug fix (non-breaking change which fixes an issue)
  • New benchmark
    • Non-breaking change which entirely uses exisiting classes, structure etc
    • Breaking change which has implemented new/modified classes etc
  • New feature
    • Non-breaking change which adds functionality
    • Breaking change fix or feature that would cause existing functionality to not work as expected

Testing

  • Added test to make sure version is read from statepoint correctly with API.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • General testing
    • New and existing unit tests pass locally with my changes
    • Coverage is >80%

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 85.18519% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
jade/output.py 87.17% 5 Missing ⚠️
jade/openmc.py 78.57% 3 Missing ⚠️
Files with missing lines Coverage Δ
jade/expoutput.py 92.15% <100.00%> (ø)
jade/openmc.py 95.94% <78.57%> (-4.06%) ⬇️
jade/output.py 75.76% <87.17%> (+0.01%) ⬆️

@alexvalentine94
Copy link
Collaborator Author

Look to improve codecov

@alexvalentine94
Copy link
Collaborator Author

Look to improve codecov
Changes look to be covered.

@alexvalentine94 alexvalentine94 marked this pull request as draft October 22, 2024 08:57
@alexvalentine94 alexvalentine94 marked this pull request as ready for review October 22, 2024 14:41
Copy link
Member

@dodu94 dodu94 left a comment

Choose a reason for hiding this comment

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

Good work, just have a look at the d1s comments

jade/output.py Outdated
file1 = file_name
elif file_name.startswith("statepoint"):
file2 = file_name

Copy link
Member

Choose a reason for hiding this comment

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

maybe it worth to add here a NotImplementedError if another code is requested

jade/output.py Outdated
file2 = None

for file_name in os.listdir(results_path):
if code == "mcnp":
Copy link
Member

Choose a reason for hiding this comment

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

this should be valid also for d1s

jade/output.py Outdated
file2 = file_name


if file1 is None or (code == "mcnp" and file2 is None):
Copy link
Member

Choose a reason for hiding this comment

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

mcnp and d1s behave in the same way here

@alexvalentine94
Copy link
Collaborator Author

Thanks Davide, I have implemented the changes as you suggested.

@dodu94 dodu94 merged commit 130bac5 into developing Oct 25, 2024
9 checks passed
@dodu94 dodu94 deleted the read_code_version_metadata branch October 25, 2024 12:48
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