Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yardasol
Copy link
Contributor

This PR changes the structure of the Depcode class to use python's Abstract Base Class to make the changes outlined in #59 .

This PR also adjusts the import statements in the test suite to match the new class names.

@pep8speaks
Copy link
Contributor

pep8speaks commented Oct 15, 2021

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 2021-12-07 18:38:35 UTC

Copy link
Contributor

@gwenchee gwenchee left a comment

Choose a reason for hiding this comment

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

Looks good. I have some comments about variable naming etc. Also, you seem to have some pep8 issues.

----------
dep_file : str
Path to file containing results of depletion simulation
moment : int
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesnt seem very intuitive. Why not a boolean with a variable name read_at_start

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 agree. moment makes me think of moment of force, stuff like that. I'll look into changing this.

yardasol and others added 3 commits October 26, 2021 10:07
Co-authored-by: Gwendolyn Chee <[email protected]>
Co-authored-by: Gwendolyn Chee <[email protected]>
Co-authored-by: Gwendolyn Chee <[email protected]>
@yardasol yardasol requested review from LukeSeifert, munkm and smpark7 and removed request for LukeSeifert and smpark7 November 11, 2021 20:58
Copy link
Contributor

@LukeSeifert LukeSeifert left a comment

Choose a reason for hiding this comment

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

Looks good! Everything seems to be working as well when I ran it with the msbr example case (had to change Andrei's cross section locations to my own and create an empty "data" directory in saltproc, but had to do that before anyways).

Path to user template file for depletion code
inp : str
Path to input file for depletion code rerunning
reactor : Reactor
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this data type is correct

Contains information about power load curve and cumulative
depletion time for the integration test.
dts : int
dep_step : int
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice change here, much more clear variable name than dts

@yardasol yardasol requested a review from gwenchee November 15, 2021 15:57
@yardasol yardasol requested review from gwenchee and removed request for gwenchee and smpark7 November 30, 2021 21:22
@yardasol
Copy link
Contributor Author

@gwenchee @LukeSeifert @munkm I believe I've addressed all requested changes, so if there aren't any more issues could one of you approve so we can merge?

Copy link
Contributor

@gwenchee gwenchee left a comment

Choose a reason for hiding this comment

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

You haven't addressed the moment comment we discussed above but besides that LGTM!

@yardasol
Copy link
Contributor Author

yardasol commented Dec 7, 2021

@gwenchee did you see my follow up comment about that?

Update: moment is used to slice arrays when processing materials, so it makes sense that it's an integer.

I guess since we are only every using 0 or 1 as the value for moment, it does make sense to change it to a boolean and then add an if-statement in the body of read_dep_comp. I'll make a commit for this

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.

The depcode class should not assume a particular depletion code choice. It should be a pure virtual class.

4 participants