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: tuple

collections.namedtuple() class used to organize the data returned by load_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.

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 MDTFFramework and InfoCLIHandler.

  • code_root (str) – Absolute path to t

  • pod (str, optional) –

  • pod_list (list, optional) – List of POD names to load settings files.


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.


Instance of PodDataTuple.

class src.mdtf_info.InfoCLIHandler(code_root, arg_list)[source]

Bases: object

Class which implements the mdtf info online 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.


Handler which prints recognized help topics.


Handler which prints summary information on all installed PODs.


Handler which prints information about PODs as taken from their settings.json files, at maximum verbosity.


Handler which prints installed PODs corresponding to all modeling realms.


Handler which prints installed PODs corresponding to modeling realm realm.