odatse._info module#
- class odatse._info.Info(d: MutableMapping | None = None)[source]#
Bases:
objectA class to represent the information structure for the data-analysis software.
Initialize the Info object.
- Parameters:
d (MutableMapping (optional)) – A dictionary to initialize the Info object.
- __init__(d: MutableMapping | None = None)[source]#
Initialize the Info object.
- Parameters:
d (MutableMapping (optional)) – A dictionary to initialize the Info object.
- from_dict(d: MutableMapping) None[source]#
Initialize the Info object from a dictionary.
- Parameters:
d (MutableMapping) – A dictionary containing the information to initialize the Info object.
- Raises:
exception.InputError – If any required section is missing in the input dictionary.
- classmethod from_file(file_name, **kwargs)[source]#
Create an Info object from a file.
- Parameters:
file_name (str) – The name of the file to load the information from.
**kwargs – Additional keyword arguments.
- Returns:
An Info object initialized with the data from the file.
- Return type:
- Raises:
TOMLDecodeError – If the file is an invalid TOML document (raised on rank 0).
exception.InputError – On the other ranks, if the load failed on rank 0.
Notes
Only rank 0 reads the file. The load status is broadcast before the parsed data so that a failure on rank 0 does not leave the other ranks blocked forever on the data broadcast.