campa.constants.CAMPAConfig

class CAMPAConfig[source]

Configuration for CAMPA.

Defines device-specific EXPERIENT_DIR and BASE_DATA_DIR paths and mapping of data configuration names to configuration files.

The configuration is attempted to be read from a campa.ini configuration file. This file is searched for in the following places:

  • the current directory

  • $HOME/.config/campa/

A default configuration file can be created using campa setup. Configuration values can also directly be set in memory.

Attributes

BASE_DATA_DIR

Root BASE_DATA_DIR.

CO_OCC_CHUNK_SIZE

Chunk size for optimised co-occurrence in FeatureExtractor.extract_co_occurrence().

EXPERIMENT_DIR

Root EXPERIMENT_DIR.

config_fname

Name of config file.

data_configs

Return dictionary mapping from names to data_config files.

Methods

add_data_config(data_config_name, ...)

Add a (name, file) mapping to CAMPAConfig.data_configs.

get_data_config([data_config_name])

Load data_config file.

write([config_fname])

Save current configuration to config_fname.