Skip to content

thKernel data type fix #1855

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

Merged
merged 10 commits into from
Sep 9, 2024
Merged

Conversation

daleazer
Copy link
Contributor

@daleazer daleazer commented Sep 5, 2024

What is the change?

The thKernel setting is meant to store the name of the primary thermal hydraulics solver for a run. The default value was False, causing the data type of thKernel to be bool. When a user set the value of thKernel to anything in the settings file, it would only be set to True. Changing the default value to an empty string changes its data type to str, allowing the setting to work as originally intended.

This change resolves issue #1854.

Why is the change being made?

This change is necessary to allow the thKernel setting to work as intended. Without this change, the thKernel can only be set to boolean values. With this change, thKernel can be set to any string.


Checklist

The thKernel setting is meant to store the name of the primary
thermal hydraulics solver for a run. The default value was False,
causing the data type of thKernel to be bool. When a user set the
value of thKernel to anything in the settings file, it would only
be set to True. Changing the default value to an empty string
changes its data type to str, allowing the setting to work as
originally intended.
@CLAassistant
Copy link

CLAassistant commented Sep 5, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ john-science
❌ daleazer
You have signed the CLA already but the status is still pending? Let us recheck it.

@john-science john-science self-requested a review September 5, 2024 18:52
@john-science john-science added the enhancement New feature or request label Sep 5, 2024
@john-science
Copy link
Member

@daleazer Welcome aboard! Do I happen to know you, IRL?

The change itself seems pretty reasonable. I am only surprised to see it, because I didn't think anyone actually used the thKernel setting.

(Oh, it looks like you have some linting and things to clean up.)

@john-science
Copy link
Member

@daleazer Can you add this header to the empty __init__.py file you created:

# Copyright 2024 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Thanks!

@daleazer
Copy link
Contributor Author

daleazer commented Sep 6, 2024

Thank you! I don't believe we know each other.

I have added the license text to __init__.py. Was there anything else?

@john-science john-science self-requested a review September 6, 2024 21:28
@john-science
Copy link
Member

Thank you! I don't believe we know each other.

I have added the license text to __init__.py. Was there anything else?

The black linting is still broken. Can you run black on your PR and merge it again? Thanks!

@daleazer
Copy link
Contributor Author

daleazer commented Sep 7, 2024

Thank you! I don't believe we know each other.
I have added the license text to __init__.py. Was there anything else?

The black linting is still broken. Can you run black on your PR and merge it again? Thanks!

Should be fixed now

Copy link
Member

@john-science john-science left a comment

Choose a reason for hiding this comment

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

Love it! Thanks!

@john-science john-science merged commit f318392 into terrapower:main Sep 9, 2024
11 checks passed
@daleazer daleazer deleted the thKernel-data-type-fix branch September 10, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants