diff --git a/docs/user_guide/config.md b/docs/user_guide/config.md index d7adbbb6..27c53d67 100644 --- a/docs/user_guide/config.md +++ b/docs/user_guide/config.md @@ -4,8 +4,8 @@ The config module contains a mechanism to collect configuration parameters from It will load an (optional) provided config file, or alternatively use a passed python dictionary as initial config dictionary, and subsequently look for the following additional config files to load: * ``folder_config``: A config file of name :file:`sed_config.yaml` in the current working directory. This is mostly intended to pass calibration parameters of the workflow between different notebook instances. -* ``user_config``: A config file provided by the user, stored as :file:`.config/sed/config.yaml` in the current user's home directly. This is intended to give a user the option for individual configuration modifications of system settings. -* ``system_config``: A config file provided by the system administrator, stored as :file:`/etc/sed/config.yaml` on Linux-based systems, and :file:`%ALLUSERSPROFILE%/sed/config.yaml` on Windows. This should provide all necessary default parameters for using the sed processor with a given setup. For an example for an mpes setup, see :ref:`example_config` +* ``user_config``: A config file provided by the user, stored as :file:`.config/sed/config_v1.yaml` in the current user's home directly. This is intended to give a user the option for individual configuration modifications of system settings. +* ``system_config``: A config file provided by the system administrator, stored as :file:`/etc/sed/config_v1.yaml` on Linux-based systems, and :file:`%ALLUSERSPROFILE%/sed/config_v1.yaml` on Windows. This should provide all necessary default parameters for using the sed processor with a given setup. For an example for an mpes setup, see :ref:`example_config` * ``default_config``: The default configuration shipped with the package. Typically, all parameters here should be overwritten by any of the other configuration files. The config mechanism returns the combined dictionary, and reports the loaded configuration files. In order to disable or overwrite any of the configuration files, they can be also given as optional parameters (path to a file, or python dictionary). diff --git a/src/sed/core/config.py b/src/sed/core/config.py index 1133236f..42f21153 100644 --- a/src/sed/core/config.py +++ b/src/sed/core/config.py @@ -54,11 +54,11 @@ def parse_config( user_config (dict | str, optional): user-based config dictionary or file path. The loaded dictionary is completed with the user-based values, taking preference over system and default values. - Defaults to the file ".config/sed/config.yaml" in the current user's home directory. + Defaults to the file ".config/sed/config_v1.yaml" in the current user's home directory. system_config (dict | str, optional): system-wide config dictionary or file path. The loaded dictionary is completed with the system-wide values, - taking preference over default values. Defaults to the file "/etc/sed/config.yaml" - on linux, and "%ALLUSERSPROFILE%/sed/config.yaml" on windows. + taking preference over default values. Defaults to the file "/etc/sed/config_v1.yaml" + on linux, and "%ALLUSERSPROFILE%/sed/config_v1.yaml" on windows. default_config (dict | str, optional): default config dictionary or file path. The loaded dictionary is completed with the default values. Defaults to *package_dir*/config/default.yaml". @@ -98,7 +98,7 @@ def parse_config( user_dict = copy.deepcopy(user_config) else: if user_config is None: - user_config = str(USER_CONFIG_PATH.joinpath("config.yaml")) + user_config = str(USER_CONFIG_PATH.joinpath("config_v1.yaml")) if Path(user_config).exists(): user_dict = load_config(user_config) if verbose: @@ -109,7 +109,7 @@ def parse_config( system_dict = copy.deepcopy(system_config) else: if system_config is None: - system_config = str(SYSTEM_CONFIG_PATH.joinpath("config.yaml")) + system_config = str(SYSTEM_CONFIG_PATH.joinpath("config_v1.yaml")) if Path(system_config).exists(): system_dict = load_config(system_config) if verbose: diff --git a/src/sed/loader/mpes/loader.py b/src/sed/loader/mpes/loader.py index 794badc1..9a7cb402 100644 --- a/src/sed/loader/mpes/loader.py +++ b/src/sed/loader/mpes/loader.py @@ -902,10 +902,13 @@ def gather_metadata( metadata=metadata, ) - metadata = metadata_retriever.fetch_elab_metadata( - runs=self.runs, - metadata=metadata, - ) + if self.runs: + metadata = metadata_retriever.fetch_elab_metadata( + runs=self.runs, + metadata=metadata, + ) + else: + logger.warning('Fetching elabFTW metadata only supported for loading from "runs"') return metadata