Skip to content

Commit

Permalink
Changing verbage from IGNORED param to UNKNOWN param
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Oct 17, 2024
1 parent d875560 commit d3bd453
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions armi/bookkeeping/db/passiveDBLoadPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,23 @@ def from_yaml(cls, loader, node, round_trip_data=None):


class PassiveDBLoadPlugin(plugins.ArmiPlugin):
"""Provides the ability to ignore parameters sections of blueprint files.
"""Provides the ability to passively load a reactor data model from an ARMI DB even if there are
unknown parameters and blueprint sections.
This plugin allows you to more easily open a database, because you can ignore sections of the
blueprint files and as many of the parameters as you want.
This plugin allows you two define two things:
This was designed to allow loading an ARMI database without the application that created it.
1. Sections of blueprint files to ignore entirely.
2. A collection of unknown parameters that will be loaded without units or underlying metadata.
Notes
-----
Obviously, if you are ignoring huge groups of parameters or whole sections of the blueprints,
you are losing information. There is no way to use this plugin and still claim full fidelity of
your understanding of the reactor. ARMI does not support any such claims.
Obviously, if you are loading huge numbers of unknown parameters and ignoring whole sections of
blueprints, you are losing information. There is no way to use this plugin and still claim full
fidelity of your understanding of the reactor. ARMI does not support any such claims.
"""

SKIP_BP_SECTIONS = []
SKIP_PARAMS = {}
UNKNOWN_PARAMS = {}

@staticmethod
@plugins.HOOKIMPL
Expand All @@ -80,7 +81,7 @@ def defineParameters():
"""Define parameters for the plugin."""
# build all the parameters we are missing in default ARMI
params = {}
for dataClass, paramNames in PassiveDBLoadPlugin.SKIP_PARAMS.items():
for dataClass, paramNames in PassiveDBLoadPlugin.UNKNOWN_PARAMS.items():
if len(paramNames):
params[dataClass] = PassiveDBLoadPlugin.buildParamColl(paramNames)

Expand Down
2 changes: 1 addition & 1 deletion armi/tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_passiveDBLoadPlugin(self):

# non-empty cases
PassiveDBLoadPlugin.SKIP_BP_SECTIONS = ["hi", "mom"]
PassiveDBLoadPlugin.SKIP_PARAMS = {Block: ["fake1", "fake2"]}
PassiveDBLoadPlugin.UNKNOWN_PARAMS = {Block: ["fake1", "fake2"]}
bpSections = plug.defineBlueprintsSections()
self.assertEqual(len(bpSections), 2)
self.assertTrue(type(bpSections[0]), tuple)
Expand Down

0 comments on commit d3bd453

Please sign in to comment.