From d3bd4538e8fe847980eedf1b4a526646541d0fb5 Mon Sep 17 00:00:00 2001 From: jstilley Date: Thu, 17 Oct 2024 09:37:49 -0700 Subject: [PATCH] Changing verbage from IGNORED param to UNKNOWN param --- armi/bookkeeping/db/passiveDBLoadPlugin.py | 19 ++++++++++--------- armi/tests/test_plugins.py | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/armi/bookkeeping/db/passiveDBLoadPlugin.py b/armi/bookkeeping/db/passiveDBLoadPlugin.py index b099bb0ab..9afc788b2 100644 --- a/armi/bookkeeping/db/passiveDBLoadPlugin.py +++ b/armi/bookkeeping/db/passiveDBLoadPlugin.py @@ -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 @@ -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) diff --git a/armi/tests/test_plugins.py b/armi/tests/test_plugins.py index 167447fc5..3674f4366 100644 --- a/armi/tests/test_plugins.py +++ b/armi/tests/test_plugins.py @@ -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)