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

Cleanup reprocessing-related classes and code #160

Merged
merged 23 commits into from
Aug 11, 2022

Conversation

yardasol
Copy link
Contributor

@yardasol yardasol commented Jul 26, 2022

Summary of changes

This PR addresses various, inconsistencies, unclear functionality and comments, and some inefficiencies in the functions and classes that perform reprocessing work in SaltProc.

Specifically, this PR does the following:

  • app.py
    • reprocessing() -> reprocess_materials()
    • refill() -> refill_materials()
    • read_feeds_from_input() -> get_feeds()
    • read_processes_from_input() -> get_extraction_processes()
    • read_dot() -> get_extraction_process_paths()
    • Fix incorrect parameter descriptions in the changed functions
    • Removed deepcopy calls where possible in reprocess_materials
    • Grammar and style adjustments to docstrings for the changed functions.
  • process.py
    • Process.calc_rem_efficiency() -> Process.calculate_removal_efficiency()
    • Docstring updates
  • sparger.py
    • Sparger.calc_rem_efficiency() -> Sparger.calculate_removal_efficiency()
    • Docstring updates
  • separator.py
    • Separator.calc_rem_efficiency() -> Separator.calculate_removal_efficiency()
    • Docstring updates
  • Corresponding changes to test files.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Required for Merging

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • My change is a source code change
    • I have added/modified tests to cover my changes
    • I have explained why my change does not require new/modified tests
  • My change is a user-facing change
    • I have recorded my changes in the changelog for the upcoming release
  • My change is exclusively related to the repository (e.g. GitHub actions workflows, PR/issue templates, etc.)
    • I have verified or justified that my change will work as intended.
  • All new and existing tests passed.
    • CI tests pass
    • Local tests pass (including Serpent2 integration tests)

Associated Issues and PRs

None

Associated Developers

Checklist for Reviewers

Reviewers should use this link to get to the
Review Checklist before they begin their review.

@pep8speaks
Copy link
Contributor

pep8speaks commented Jul 26, 2022

Hello @yardasol! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-08-10 03:33:57 UTC

@yardasol yardasol force-pushed the cleanup-reprocessing branch 2 times, most recently from a24d3a1 to f155719 Compare July 26, 2022 16:56
@yardasol yardasol marked this pull request as ready for review July 28, 2022 22:12
@yardasol yardasol requested a review from nsryan2 August 1, 2022 17:42
Copy link
Contributor

@samgdotson samgdotson left a comment

Choose a reason for hiding this comment

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

This PR primarily changes names and function doc strings for clarity. Some of the name changes are neutral (w.r.t to clarity). For example "read_materials_from_input" --> "get_materials" is neutral, to me, because "get_materials" is less specific but much cleaner.

As long as tests still pass, I'm happy to merge.

Comment on lines 102 to 103
# print("Xe concentration in inflow before % f g" % inflow['Xe136'])
# print("Current time %f" % (t))
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these print statements erroneous?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll look into it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, they aren't erroneous, but I don't think they need to be here. i'm okay with purging them. Alternatively, I could leave them as-is for now and create a verbose command line option that would allow a user to specify that they want this extra infro printed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@samgdotson thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see your options being:

  1. uncomment them
  2. uncomment them and make an issue to add a verbosity feature
  3. delete them

It doesn't matter to me which option you choose, but leaving commented print statements in your code doesn't seem like good practice (I am also guilty of this).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I'll do option 2.

Comment on lines +132 to +133
print("Xe concentration in thruflow: %f g" % thru_flow['Xe136'])
print("Waste mass: %f g\n" % waste_stream.mass)
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes me think that the above-commented print statements should be uncommented.

@@ -21,6 +21,139 @@
import numpy as np


def run():
Copy link
Contributor

Choose a reason for hiding this comment

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

Did anything about this function change besides its location?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Other than using the new function names and signatures, (and some adjustments to the print statements), no.

@yardasol
Copy link
Contributor Author

@samgdotson

@samgdotson samgdotson merged commit 86ed1a2 into arfc:master Aug 11, 2022
github-actions bot pushed a commit that referenced this pull request Aug 11, 2022
…reprocessing

Cleanup reprocessing-related classes and code 86ed1a2
github-actions bot pushed a commit to khurrumsaleem/saltproc that referenced this pull request Aug 12, 2022
…nup-reprocessing

Cleanup reprocessing-related classes and code 86ed1a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants