Replies: 2 comments 1 reply
-
Flags should define what something isI have not seen this in the code base, and if it exists I want to squash it immediately: I really hope that is a problem of the past. CORE and REACTOR are bad flagsI agree with Chris above, that CORE and REACTOR are bad flags to exist. They are only used in a few places in ARMI: Line 126 in 9dc6760 armi/armi/bookkeeping/db/database3.py Line 860 in 9dc6760 armi/armi/bookkeeping/db/database3.py Line 1422 in 9dc6760 Line 101 in 9dc6760 These are easily replaced with type checks. (Also, I cannot find usages of these two flags downstream of ARMI.) What other flags are unused or counter-useful?I am immediately suspicious of these three flags, which are used nowhere but the docs: Lines 204 to 206 in 9dc6760 |
Beta Was this translation helpful? Give feedback.
-
#1835 Closes this |
Beta Was this translation helpful? Give feedback.
-
There are currently flags for
Core
andReactor
being defined in ourflags
module:armi/armi/reactor/flags.py
Lines 208 to 209 in 9dc6760
I would like to propose that we get rid of the two flags, as well as any other flags whose functionality is duplicated by other parts of the API (if any). My reasoning is the following:
isinstance(myCoreObject, Core)
A concrete example of this causing problems is documented in #1754 . Removing the
Core
andReactor
flags would be one way for us to safeguard against these types of problems, without us losing any actual functionality in the framework.Beta Was this translation helpful? Give feedback.
All reactions