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

Refactor Axial Expansion #1435

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft

Conversation

albeanth
Copy link
Member

@albeanth albeanth commented Oct 16, 2023

What is the change?

This PR does a fairly large refactor of the axial expansion functionality in ARMI. A new directory is structure is created to enable better traceability with testing and general maintainability.

Original:

armi/reactor/converters/
|-- axialExpansionChanger.py

and unit tests:

armi/reactor/converters/tests
|-- test_axialExpansionChanger.py

New:

armi/reactor/converters/axialExpansion
|
|-- assemblyAxialLinkage.py
|-- axialExpansionChanger.py
|-- expansionData.py

and unit tests

armi/reactor/converters/axialExpansion/tests
|
|-- test_assemblyAxialLinkage.py
|-- test_axialExpansionChanger.py
|-- test_expansionData.py

Notes:

  1. though there are a lot of diffs in the "Files Changed" tab, no new functionality is added.
  2. the original testing file had lots of "integration" tests within it. Those are kept and smaller accompanying unit tests are added here.
  3. to reviewers: if you want me to try and interactive rebase this or split it up into multiple PRs, let me know.

This does include the changes from PR #1427.

Why is the change being made?

  1. The original axialExpansionChanger.py file was responsible for too many things. It was ready to be split up to improve maintainability.
  2. The original test_axialExpansionChanger.py was likewise too big and doing too much. It has now been split up and is easier to maintain.

Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@john-science john-science added the feature request Smaller user request label Oct 16, 2023
@john-science
Copy link
Member

  1. I think this needs a release note. It's a non-trivial re-write.
  2. How much does the Axial Expansion API change? (For people writing code downstream, does this change the API at all?)

@albeanth
Copy link
Member Author

  1. I think this needs a release note. It's a non-trivial re-write.

Yes. I will add one once we get further into the review.

  1. How much does the Axial Expansion API change? (For people writing code downstream, does this change the API at all?)

The API actually should not have changed at all actually. At least not to that I can remember off the top of my head. I am going to run this on the slough of internal tests though to confirm.

@albeanth
Copy link
Member Author

The API actually should not have changed at all actually. At least not to that I can remember off the top of my head. I am going to run this on the slough of internal tests though to confirm.

The API for unit testing did change. And the refactor changed some imports downstream. So there is an another (minor) downstream PR.

@albeanth
Copy link
Member Author

@john-science @keckler giving a bump on this.

just started doing QA work for the axial expansion changer and it would be really nice to push this through. the improved unit testing and accompanying refactor will help keep things clean imo.

happy to chat offline too.

@john-science
Copy link
Member

Put something on my calendar for this, @albeanth

@albeanth
Copy link
Member Author

albeanth commented Nov 2, 2023

Put something on my calendar for this, @albeanth

I'll put something on your calendar for next week. Some of the downstream testing is freaking out. I have no idea why and don't have enough time to figure it out this week unfortunately...

@albeanth albeanth marked this pull request as draft November 25, 2023 16:12
"""
Ensures that target components can be manually set (is done in practice via blueprints).

.. test:: Allow user-specified target axial expansion components on a given block.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewers: this was moved to test_expansionData.py

@john-science john-science added feature request Smaller user request and removed feature request Smaller user request labels Apr 30, 2024
@albeanth
Copy link
Member Author

@john-science an update -- this PR is blocked by some downstream work but is in line to be completed. Fingers crossed it's finished soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants