Open caleb-sitton-inl opened 1 month ago
@caleb-sitton-inl I may not understand fully, but from your description, it sounds like we should continue using ET
over TreeStructure
so we have access to all the functions provided by ET
. It seems to me that we should rather rely on a python native library as much as we can before using an in-house wrapper. Also, it appears that ET
seems to be used more widespread throughout RAVEN and HERON.
@PaulTalbot-INL @GabrielSoto-INL Thoughts?
We did discuss this a little on a PR. While using ET is a great way to determine how the XML is used, as we look to use EDDI formats as well (with Workbench for .heron
files), we may need to consider the more agnostic approach. I agree, for now ET is just fine.
Issue Description
Is your feature request related to a problem? Please describe. The exclusive use of
xml.etree.ElementTree
(ET
) in parsing input files may in the future lead to bugs or limit functionality if other non-xml trees are used for input.Describe the solution you'd like Replacement of the
ET
parsing with the broaderTreeStructure
module in RAVEN (RAVEN/ravenframework/utils/TreeStructure.py) will limit future difficulties. Not allET
functions are available in TreeStructure, and naming of functions differs, so more than a simple find-and-replace will be necessary. One suchET
function, used inFORCE/tests/unit-tests/test_heron.py
, that has no counterpart inTreeStructure
, isET.fromstring()
. This function parses a string with xml formatting intoET
structure and is particularly useful for unit tests.Describe alternatives you've considered
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.