config#

Methods for reading in configuration files and for getting paths to the directories that contain the data and the experiments.

hsr4hci.config.get_datasets_dir()[source]#

Get the path of the datasets directory (i.e., the directory where the methods from hsr4hci.data will look for data sets by default).

Note

This path needs to be defined in an environmental variable called HSR4HCI_DATASETS_DIR, which can be set as follows:

export HSR4HCI_DATASETS_DIR="/path/to/datasets/directory"

Include this line in your .bashrc (or similar) to set it automatically.

Returns:

Path to the datasets directory.

Return type:

Path

hsr4hci.config.get_experiments_dir()[source]#

Get the path of the experiments directory.

Note

This path needs to be defined in an environmental variable called HSR4HCI_EXPERIMENTS_DIR, which can be set as follows:

export HSR4HCI_EXPERIMENTS_DIR="/path/to/experiments/directory"

Include this line in your .bashrc (or similar) to set it automatically.

Returns:

Path to the experiments directory.

Return type:

Path

hsr4hci.config.get_hsr4hci_dir()[source]#

Get path to directory of the hsr4hci package directory.

Returns:

Path to the hsr4hci package directory.

Return type:

Path

hsr4hci.config.load_config(file_path)[source]#

Load a (JSON) configuration file.

Parameters:

file_path (Union[str, Path]) โ€“ Path to the JSON file containing the configuration to be loaded.

Returns:

A dictionary containing configuration.

Return type:

Dict[str, Any]