armi icon indicating copy to clipboard operation
armi copied to clipboard

Remove deprecated core param, fixing optional history.

Open cbroman-usnctech opened this issue 2 years ago • 4 comments

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

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

cbroman-usnctech avatar Oct 25 '23 23:10 cbroman-usnctech

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 25 '23 23:10 CLAassistant

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

john-science avatar Nov 01 '23 20:11 john-science

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.

cbroman-usnctech avatar Nov 02 '23 16:11 cbroman-usnctech

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.

john-science avatar Jan 17 '24 20:01 john-science