Skip to content

Commit

Permalink
use deep_update for sample modifiers, bump ubiquerg version req
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Jun 19, 2024
1 parent 99961eb commit 93e8d31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions looper/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 93e8d31

Please sign in to comment.