-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
- make internal variables more descriptive - clean up loop variables - avoid calling full dictionary path where possible
- expand function names - iso,el -> nuc - rewrite docstrings - add thru_flow return parameter to process_materials - rem_elements -> process_materials
a24d3a1
to
f155719
Compare
f9c3a2f
to
83e4acf
Compare
We do this so that we can retain the other attributes from inflow
There was a problem hiding this 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.
saltproc/process.py
Outdated
# print("Xe concentration in inflow before % f g" % inflow['Xe136']) | ||
# print("Current time %f" % (t)) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samgdotson thoughts?
There was a problem hiding this comment.
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:
- uncomment them
- uncomment them and make an issue to add a verbosity feature
- 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).
There was a problem hiding this comment.
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.
print("Xe concentration in thruflow: %f g" % thru_flow['Xe136']) | ||
print("Waste mass: %f g\n" % waste_stream.mass) |
There was a problem hiding this comment.
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(): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…reprocessing Cleanup reprocessing-related classes and code 86ed1a2
…nup-reprocessing Cleanup reprocessing-related classes and code 86ed1a2
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()
deepcopy
calls where possible inreprocess_materials
process.py
Process.calc_rem_efficiency()
->Process.calculate_removal_efficiency()
sparger.py
Sparger.calc_rem_efficiency()
->Sparger.calculate_removal_efficiency()
separator.py
Separator.calc_rem_efficiency()
->Separator.calculate_removal_efficiency()
Types of changes
Required for Merging
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.