Skip to content

Commit

Permalink
remove modifying sample_modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Jun 25, 2024
1 parent cddb3be commit 34f3db7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
7 changes: 1 addition & 6 deletions looper/cli_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
),
Expand Down
13 changes: 0 additions & 13 deletions looper/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 34f3db7

Please sign in to comment.