MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / keys

Method keys

kratos/python_interface/python_registry.py:69–91  ·  view source on GitHub ↗
(self, Name)

Source from the content-addressed store, hash-verified

67 return PythonRegistryIterator(self)
68
69 def keys(self, Name):
70 # Check if Name registry level is registered and if it is a value
71 if self.HasItem(Name):
72 if not self.HasItems(Name):
73 err_mgs = f"Asking for the keys of '{Name}'. '{Name}' item has no subitems."
74 raise Exception(err_mgs)
75 else:
76 err_msg = f"Asking for the keys of '{Name}' non-registered item."
77 raise Exception(err_msg)
78
79 # Get the c++ registry item keys
80 cpp_keys = None
81 if self.HasItems(Name, RegistryContext.CPP):
82 cpp_keys = self.__GetCppItem(Name).keys()
83 # Get the Python registry item keys
84 # Note that this is a view object of the Python dictionary keys
85 py_keys = None
86 if self.HasItems(Name, RegistryContext.PYTHON):
87 py_keys = self.__GetPythonItem(Name).keys()
88
89 # Return the c++ and Python registry keys in a tuple
90 # Note that we return None if the item was not present in one of the registries
91 return py_keys, cpp_keys
92
93 def values(self, Name):
94 # Check if Name registry level is registered and if it is a value

Callers 15

itemsMethod · 0.95
NumberOfItemsMethod · 0.95
updateRequestMethod · 0.80
isRequestingValueOfMethod · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls 4

HasItemMethod · 0.95
HasItemsMethod · 0.95
__GetCppItemMethod · 0.95
__GetPythonItemMethod · 0.95

Tested by 15

__init__Method · 0.64
_compare_groupsMethod · 0.64
AssembleTestSuitesFunction · 0.64