From 34f3db7c918d7aa9af2f036dcfe813c064731561 Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:54:11 -0400 Subject: [PATCH] remove modifying sample_modifiers --- looper/cli_pydantic.py | 7 +------ looper/project.py | 13 ------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/looper/cli_pydantic.py b/looper/cli_pydantic.py index 1da526e5..16bb6206 100644 --- a/looper/cli_pydantic.py +++ b/looper/cli_pydantic.py @@ -149,12 +149,9 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None): looper_config_dict = read_looper_dotfile() _LOGGER.info(f"Using looper config ({looper_cfg_path}).") - sample_modifiers_dict = None cli_modifiers_dict = None for looper_config_key, looper_config_item in looper_config_dict.items(): - if looper_config_key == SAMPLE_MODS_KEY: - sample_modifiers_dict = looper_config_item - elif looper_config_key == CLI_KEY: + if looper_config_key == CLI_KEY: cli_modifiers_dict = looper_config_item else: setattr(subcommand_args, looper_config_key, looper_config_item) @@ -203,7 +200,6 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None): amendments=subcommand_args.amend, divcfg_path=divcfg, runp=subcommand_name == "runp", - sample_modifiers=sample_modifiers_dict, **{ attr: getattr(subcommand_args, attr) for attr in CLI_PROJ_ATTRS @@ -219,7 +215,6 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None): amendments=subcommand_args.amend, divcfg_path=divcfg, runp=subcommand_name == "runp", - sample_modifiers=sample_modifiers_dict, project_dict=PEPHubClient()._load_raw_pep( registry_path=subcommand_args.config_file ), diff --git a/looper/project.py b/looper/project.py index 6daecac1..7a652db7 100644 --- a/looper/project.py +++ b/looper/project.py @@ -131,19 +131,6 @@ def __init__(self, cfg=None, amendments=None, divcfg_path=None, **kwargs): except NotImplementedError: self.name = None - # consolidate sample modifiers - if kwargs.get(SAMPLE_MODS_KEY) and self._modifier_exists(): - _LOGGER.warning( - "Sample modifiers were provided in Looper Config and in PEP Project Config. Merging..." - ) - deep_update(self.config["sample_modifiers"], kwargs.get(SAMPLE_MODS_KEY)) - _LOGGER.debug( - msg=f"Merged sample modifiers: {self.config['sample_modifiers']}" - ) - elif kwargs.get(SAMPLE_MODS_KEY): - self.config.setdefault("sample_modifiers", {}) - self.config["sample_modifiers"] = kwargs.get(SAMPLE_MODS_KEY) - # add sample pipeline interface to the project if kwargs.get(SAMPLE_PL_ARG): self.set_sample_piface(kwargs.get(SAMPLE_PL_ARG))