src.mdtf_info module¶
Functions to collect settings metadata about installed PODs for the package and for online help.
-
class
src.mdtf_info.PodDataTuple(sorted_pods, sorted_realms, pod_data, realm_data)¶ Bases:
tuplecollections.namedtuple()class used to organize the data returned byload_pod_settings().pod_data: Dict mapping each POD short name to a nested dict containing the parsed contents of that POD’s settings.json file.realm_data: Dict mapping each modeling realm name to a list of short names of PODs using variables from that realm.sorted_pods: List of short names of PODs in alphabetical order.sorted_realms: List of names of modeling realms in alphabetical order.
-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
-
property
pod_data¶
-
property
realm_data¶
-
property
sorted_pods¶
-
property
sorted_realms¶
-
src.mdtf_info.load_pod_settings(code_root, pod=None, pod_list=None)[source]¶ Wrapper to load and parse the contents of POD settings files, used by
MDTFFrameworkandInfoCLIHandler.- Parameters
- Raises
PodConfigError – If an error is raised opening or parsing the contents of a settings file. In normal operation, this is treated as a fatal error and will cause package exit.
- Returns
Instance of
PodDataTuple.
-
class
src.mdtf_info.InfoCLIHandler(code_root, arg_list)[source]¶ Bases:
objectClass which implements the
mdtf infoonline help, which displays information about PODs and their data dependencies from the CLI.-
__init__(code_root, arg_list)[source]¶ Initialization. Reads in all POD metadata via
load_pod_settings()and parses it into recognized help topics.
-
info_pod(pod)[source]¶ Handler which prints information about PODs as taken from their settings.json files, at maximum verbosity.
-