17
17
API of a Pyke.knowlege_base, so that we can list its case-specific facts, as
18
18
used in :meth:`iris.fileformats.netcdf._actions_activation_stats`.
19
19
20
- TODO: get rid of redundact fact-database identifier arguments.
21
-
22
20
"""
23
21
from .actions import run_actions
24
22
@@ -98,6 +96,17 @@ def activate(self):
98
96
"""
99
97
run_actions (self )
100
98
99
+ def get_kb (self ):
100
+ """
101
+ Get a FactEntity, which mimic (bits of) a knowledge-base.
102
+
103
+ Just allowing
104
+ :meth:`iris.fileformats.netcdf._action_activation_stats` to list the
105
+ facts.
106
+
107
+ """
108
+ return self .facts
109
+
101
110
def print_stats (self ):
102
111
"""
103
112
No-op, called by
@@ -110,32 +119,21 @@ def add_case_specific_fact(self, fact_name, fact_arglist):
110
119
"""
111
120
Record a fact about the current output operation.
112
121
113
- Roughly, self.facts.entity_lists[fact_name].append(fact_arglist).
114
-
115
- NOTE: 'kb_name' is no longer used.
122
+ Roughly,
123
+ facts = self.facts.entity_lists[fact_name].case_specific_facts
124
+ facts.append(fact_arglist)
116
125
117
126
"""
118
127
self .facts .add_fact (fact_name , fact_arglist )
119
128
120
- def get_kb (self ):
121
- """
122
- Get a FactEntity, which mimic (bits of) a knowledge-base.
123
-
124
- Just allowing
125
- :meth:`iris.fileformats.netcdf._action_activation_stats` to list the
126
- facts.
127
-
128
- """
129
- return self .facts
130
-
131
129
def fact_list (self , fact_name ):
132
130
"""
133
131
Return the facts (arg-lists) for one fact name.
134
132
135
133
A shorthand form used only by the new 'actions' routines.
136
134
137
135
AKA 'case-specific-facts', in the original.
138
- Roughly "return self.facts.entity_lists[fact_name]".
136
+ Roughly = " self.facts.entity_lists[fact_name].case_specific_facts ".
139
137
140
138
"""
141
139
return self .facts .sect_facts (fact_name )
0 commit comments