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

Remove deprecated core param, fixing optional history. #1451

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cbroman-usnctech
Copy link

What is the change?

The plotting utility function armi.utils.reportPlottings:plotReactorPerformance has a deprecated variable named eFuelCycleCost. This PR removes it and also updated the history variable so that it doesn't fail xsHistoryVsTime when the history variable equals the default value of None

The plotting utility function armi.utils.reportPlottings:plotReactorPerformance has an outdated Reactor parameter named eFuelCycleCost causing getHistory function to fail. On line 70.

try:
    data = dbi.getHistory(
        reactor, params=["cycle", "time", "eFeedMT", "eSWU", "eFuelCycleCost"]
    )

plotReactorPerformance also has an input argument named history which defaults to None. This variable is passed to the function xsHistoryVsTime as a required parameter on line 117.

xsHistoryVsTime(reactor.name, history, buGroups, extension=extension)

Why is the change being made?

Fixing plotReactorPerformance

The method has deprecated variable, and doesnt handle default history value.

#1450

Checklist

  • 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.
  • No requirements were altered.
  • The dependencies are still up-to-date in pyproject.toml.

@CLAassistant
Copy link

CLAassistant commented Oct 25, 2023

CLA assistant check
All committers have signed the CLA.

@@ -267,24 +267,24 @@ def buVsTime(name, scalars, extension=None):
report.setData("Burnup Plot", os.path.abspath(figName), report.BURNUP_PLOT)


def xsHistoryVsTime(name, history, buGroups, extension=None):
Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry, but let's not make this change.

This changes the API of ARMI. And, as you can see, that breaks unit tests.

But, more importantly:

  1. People would have to make changes to downstream repos to match the new UI.
  2. And it's not related at all to your "eFuelCycleCost" change above.

Copy link
Member

Choose a reason for hiding this comment

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

@cbroman-usnctech Thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

@john-science sorry for the delay, priorities were shifted. Ok, with me, the refactor was too much. I pushed these changes.

@john-science
Copy link
Member

The error I see in your logs is this one:

  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5a.pyx", line 50, in h5py.h5a.create
RuntimeError: Unable to create attribute (object header message is too large)

This look suspiciously like an ARMI error from some days/weeks ago. But that was fixed.

My guess is that if you merge main into your branch, this problem will go away:

git checkout main
git pull origin main
git checkout fix-plotReactorPerformance
git merge main
git push origin fix-plotReactorPerformance

@cbroman-usnctech
Copy link
Author

Thanks @john-science the tests were failing locally for me because I my version of h5py was throwing an OSError rather than a RuntimeError I reverted the changes I made to database3.py so that should fix this issue.

@john-science john-science added the cleanup Code/comment cleanup: Low Priority label Nov 20, 2023
Copy link
Author

@cbroman-usnctech cbroman-usnctech left a comment

Choose a reason for hiding this comment

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

removing refactor, spell checking

@john-science
Copy link
Member

To be clear, the reason I haven't tried to merge this is that we are currently in a code freeze. I am not ignoring you.

I keep thinking "tomorrow" will be the day we're out of code freeze. Sorry.

As you can see, the ARMI version was bumped to 0.3.0, but we haven't formally "released" that version yet:

https://github.com/terrapower/armi/releases

I am really hoping that happens soon, so I can start ARMI moving again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code/comment cleanup: Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

armi.utils.reportPlotting:plotReactorPerformance has out of date parameters
3 participants