-
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
Serpent material temps #178
Changes from 11 commits
32c02be
0f690a3
42a1253
5586a09
5f84d01
d0c5b55
df1c026
d51b204
f0e9b22
d206857
08d94a5
aa46951
0c17f30
35cdb8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,54 @@ def test_runtime_input_from_template(serpent_depcode, msr): | |
file_data = serpent_depcode.create_runtime_matfile(file_data) | ||
assert file_data[0].split()[-1] == '\"' + \ | ||
serpent_depcode.runtime_matfile + '\"' | ||
|
||
# get_burnable_material_card_data | ||
_burnable_material_card_data = {'fuel': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this is just a knowledge gap on my part, but why did you add the underscore here? This looks like a variable to me, not a call of that private function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a private attribute There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get that for in line 79. But even when you define it here and use it in line 80? It's still a private attribute in those locations? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, this is just for naming consistency. Should I name it something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would recommend changing the same some when you're not calling the attribute. It was a little confusing to me to have the two things you're comparing be named the same thing. I like to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay I'll do this |
||
(['mat', | ||
'fuel', | ||
'-4.960200000E+00', | ||
'rgb', | ||
'253', | ||
'231', | ||
'37', | ||
'burn', | ||
'1', | ||
'fix', | ||
'09c', | ||
'900', | ||
'vol', | ||
'4.435305E+7', | ||
'%', | ||
'just', | ||
'core', | ||
'volume', | ||
'2.27175E+07'], 13), | ||
'ctrlPois': | ||
(['mat', | ||
'ctrlPois', | ||
'-2.52', | ||
'burn', | ||
'1', | ||
'fix', | ||
'09c', | ||
'900', | ||
'rgb', | ||
'255', | ||
'128', | ||
'0', | ||
'vol', | ||
'1.11635E+04'], 13)} | ||
|
||
|
||
for ref_key, test_key in \ | ||
zip(serpent_depcode._burnable_material_card_data.keys(), | ||
_burnable_material_card_data.keys()): | ||
assert ref_key == test_key | ||
ref_data = serpent_depcode._burnable_material_card_data[ref_key] | ||
test_data = _burnable_material_card_data[test_key] | ||
np.testing.assert_array_equal(np.array(ref_data, dtype=object), | ||
np.array(test_data, dtype=object)) | ||
|
||
remove(serpent_depcode.runtime_matfile) | ||
|
||
# set_power_load | ||
|
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 feels like a hardcoded value. Is this the case?
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.
No this is string formatting
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.
That's what I was thinking. Just wanted to make sure it wasn't hard coding any values.