The Framework for Optimization of ResourCes and Economics is a collection of software tools, models, and datasets acquired and developed under the Integrated Energy Systems (IES) program to enable analysis of technical and economic viability of myriad IES configurations. FORCE is the consolidating interface and data repository for all the IES toolsets ranging from macro technoeconomic analysis to transient process modeling and experimental validation for integrated energy systems.
MIT License
7
stars
13
forks
source link
[DEFECT] Confusing response to bad input to create_componentsets_in_HERON function #15
If the FORCE/src/heron.py/create_componentsets_in_HERON function is called with a HERON xml input that does not contain a <Components> node, it will not respond with clarity. It prints that the components node is missing, then continues until it encounters an error when it tries to reference the unassigned heron_comp_list variable and gives an unhelpful error message.
Steps to Reproduce
Create xml file with contents: <HERON></HERON>
Call FORCE/src/heron.py/create_componentsets_in_HERON(<any_comp_sets_folder>, <my_xml>) where my_xml is the file created above
Expected Behavior
Decisive behavior is preferred. Multiple options are available, including:
<Components> node is created by the function
An error is thrown
The input is trusted and there is no check for whether the <Components> node exists
Screenshots and Input Files
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
[x] Is it tagged with a type: defect or task?
[x] Is it tagged with a priority: critical, normal or minor?
[x] If it will impact requirements or requirements tests, is it tagged with requirements?
[x] If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[x] Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
[x] If the issue is a defect, is the defect fixed?
[x] If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
[x] 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] 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] If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
Thank you for the defect report
FORCE
.Defect Description
If the
FORCE/src/heron.py/create_componentsets_in_HERON
function is called with a HERON xml input that does not contain a<Components>
node, it will not respond with clarity. It prints that the components node is missing, then continues until it encounters an error when it tries to reference the unassignedheron_comp_list
variable and gives an unhelpful error message.Steps to Reproduce
<HERON></HERON>
FORCE/src/heron.py/create_componentsets_in_HERON(<any_comp_sets_folder>, <my_xml>)
wheremy_xml
is the file created aboveExpected Behavior
Decisive behavior is preferred. Multiple options are available, including:
<Components>
node is created by the function<Components>
node existsScreenshots and Input Files
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
For Change Control Board: Issue Closure