Configuration Module

The configuration module handles loading and validating configuration files.

Configuration management module.

This module handles loading configuration from a JSON file. All default values reside in config.json, which is included in the installed package directory.

If no config_file is provided, this module attempts to load the default config.json from the package installation directory.

variantcentrifuge.config.load_config(config_file=None)[source]

Load configuration from a JSON file.

If no config_file is provided, the function attempts to load the ‘config.json’ from the installed package directory. If it fails to find or parse the file, it raises an error.

Parameters:

config_file (str, optional) – Path to a configuration file in JSON format. If None, defaults to the package-installed ‘config.json’.

Returns:

Configuration dictionary loaded from the JSON file.

Return type:

dict

Raises:
  • FileNotFoundError – If the specified configuration file does not exist.

  • ValueError – If there is an error parsing the JSON configuration file.