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

Fixed function to create components node if missing #16

Conversation

caleb-sitton-inl
Copy link
Collaborator

@caleb-sitton-inl caleb-sitton-inl commented Jun 20, 2024


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)

#15

What are the significant changes in functionality due to this change request?

When a HERON XML script containing no <Components> node is input to the src/heron/create_componentsets_in_HERON() function, the function now adds a new <Components> node. It also prints a message stating that the addition was made. This mirrors the function's behavior when dealing with input scripts that are missing <economics> or <CashFlow> nodes.


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 3. Automated Tests should pass, including run_tests, pylint, and manual building tests.
  • 4. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test.
  • 5. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 6. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.

@GabrielSoto-INL GabrielSoto-INL self-requested a review June 20, 2024 16:09
@GabrielSoto-INL
Copy link
Collaborator

@GabrielSoto-INL
Copy link
Collaborator

And I believe the multi-line strings like the input in this docstring should be indented at least to the comma on the previous line (it was bothering me and might as well ask since you're already editing the file!): https://github.com/idaholab/FORCE/pull/16/files#diff-e5a05e2d7232d1a807b092ef316d5d19d9eaec4b6043a74cd4dd42512f90daa2R36

Copy link
Collaborator

@GabrielSoto-INL GabrielSoto-INL left a comment

Choose a reason for hiding this comment

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

Changes look good!
a minor request was made to delete a line (and some extra requests for fixing some indentation right above the updated method).
Good to merge after these changes are made and tests pass

src/heron.py Outdated
heron_comp_list = [] # The list of components
for comp in component:
heron_comp_list.append(comp.attrib["name"]) # The list of components found in the HERON input XML file
# print(f" \n The following components are already in the HERON input XML file:'{heron_comp_list}'")
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be good to delete this commented line since it doesn't seem to serve a purpose anymore

Copy link
Collaborator

@GabrielSoto-INL GabrielSoto-INL left a comment

Choose a reason for hiding this comment

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

Changes look good to me, ok to merge

@GabrielSoto-INL GabrielSoto-INL merged commit a7ab000 into idaholab:main Jun 24, 2024
1 check passed
@caleb-sitton-inl caleb-sitton-inl deleted the fix-create-compsets-heron-function branch June 24, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants