TEAL is a financial performance calculator plugin for the RAVEN code, framework, resolving around the computation of Net Present Value and associated financial metrics.
Apache License 2.0
9
stars
21
forks
source link
[DEFECT] CashFlowPlot list index out of range error when too many components are selected #82
When generating cashflow plots for a list of components longer than the colormap list in the code, TEAL errors out.
What did you see instead?
The list of components is longer than the given colorLib. This is from a HERON debug run of the wind workshop case.
Exception has occurred: IndexError
list index out of range
File "C:\Users\sotogj\projects\TEAL\src\CashFlowPlot.py", line 124, in run
_cmap = plt.get_cmap(colorLib[i])
File "C:\Users\sotogj\projects\raven\ravenframework\OutStreams\PlotEntity.py", line 103, in addOutput
self._plotter.run()
File "C:\Users\sotogj\projects\raven\ravenframework\Steps\IOStep.py", line 264, in _localTakeAstepRun
output.addOutput()
File "C:\Users\sotogj\projects\raven\ravenframework\Steps\Step.py", line 317, in takeAstep
self._localTakeAstepRun(inDictionary)
File "C:\Users\sotogj\projects\raven\ravenframework\Simulation.py", line 834, in executeStep
stepInstance.takeAstep(stepInputDict)
File "C:\Users\sotogj\projects\raven\ravenframework\Simulation.py", line 901, in run
self.executeStep(stepInputDict, stepInstance)
File "C:\Users\sotogj\projects\raven\ravenframework\Driver.py", line 160, in raven
simulation.run()
File "C:\Users\sotogj\projects\raven\ravenframework\Driver.py", line 207, in main
raven()
File "C:\Users\sotogj\projects\raven\raven_framework.py", line 25, in <module>
sys.exit(main(True))
IndexError: list index out of range
Do you have a suggested fix for the development team?
If there are more components than colormaps, TEAL should repeat the sequence and maybe add different hatching patterns for the repeated sequences.
Describe how to Reproduce
Steps to reproduce the behavior:
Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.
Platform (please complete the following information):
OS: [e.g. iOS]
Version: [e.g. 22]
Dependencies Installation: [CONDA or PIP]
For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
[x] 1. Is it tagged with a type: defect or task?
[x] 2. Is it tagged with a priority: critical, normal or minor?
[x] 3. If it will impact requirements or requirements tests, is it tagged with requirements?
[x] 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[x] 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.
[x] 1. If the issue is a defect, is the defect fixed?
[x] 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
[x] 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[x] 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[x] 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
Defect Description
Describe the defect
What did you expect to see happen?
When generating cashflow plots for a list of components longer than the colormap list in the code, TEAL errors out.
What did you see instead?
The list of components is longer than the given
colorLib
. This is from a HERON debug run of thewind
workshop case.Do you have a suggested fix for the development team?
If there are more components than colormaps, TEAL should repeat the sequence and maybe add different hatching patterns for the repeated sequences.
Describe how to Reproduce Steps to reproduce the behavior:
Screenshots and Input Files Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.
Platform (please complete the following information):
For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.