From 93e8d31848658cc45b8c76199bc63ea4c78d4465 Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:34:47 -0400 Subject: [PATCH] use deep_update for sample modifiers, bump ubiquerg version req --- looper/project.py | 10 ++++++---- requirements/requirements-all.txt | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/looper/project.py b/looper/project.py index e070233e..f8a4c7d6 100644 --- a/looper/project.py +++ b/looper/project.py @@ -20,7 +20,7 @@ from peppy import Project as peppyProject from peppy.utils import make_abs_via_cfg from pipestat import PipestatError, PipestatManager -from ubiquerg import expandpath, is_command_callable +from ubiquerg import expandpath, is_command_callable, deep_update from yacman import YAMLConfigManager from .conductor import write_pipestat_config @@ -138,10 +138,12 @@ def __init__(self, cfg=None, amendments=None, divcfg_path=None, **kwargs): # add sample pipeline interface to the project if kwargs.get(SAMPLE_MODS_KEY) and self._modifier_exists(): _LOGGER.warning( - "Sample modifiers were provided in Looper config. Overwriting those in PEP." + "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']}" ) - self.config.setdefault("sample_modifiers", {}) - self.config["sample_modifiers"] = kwargs.get(SAMPLE_MODS_KEY) elif kwargs.get(SAMPLE_MODS_KEY): self.config.setdefault("sample_modifiers", {}) self.config["sample_modifiers"] = kwargs.get(SAMPLE_MODS_KEY) diff --git a/requirements/requirements-all.txt b/requirements/requirements-all.txt index bd28baa8..b7fd60ad 100644 --- a/requirements/requirements-all.txt +++ b/requirements/requirements-all.txt @@ -9,7 +9,7 @@ pipestat>=0.9.2 peppy>=0.40.2 pyyaml>=3.12 rich>=9.10.0 -ubiquerg>=0.5.2 +ubiquerg>=0.8.1 yacman==0.9.3 pydantic2-argparse>=0.9.2 psutil \ No newline at end of file