From 46b998b50b0b7625cec269bae7d6182e379788ba Mon Sep 17 00:00:00 2001 From: mashehu Date: Fri, 4 Oct 2024 12:19:48 +0200 Subject: [PATCH] install modules in TEMPLATE branch --- nf_core/modules/modules_json.py | 2 +- nf_core/pipelines/sync.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nf_core/modules/modules_json.py b/nf_core/modules/modules_json.py index 536589d81e..05c64b6dee 100644 --- a/nf_core/modules/modules_json.py +++ b/nf_core/modules/modules_json.py @@ -432,7 +432,7 @@ def move_component_to_local(self, component_type: str, component: str, repo_name to_name += f"-{datetime.datetime.now().strftime('%y%m%d%H%M%S')}" shutil.move(str(current_path), local_dir / to_name) - def unsynced_components(self) -> Tuple[List[str], List[str], dict]: + def unsynced_components(self) -> Tuple[List[str], List[str], Dict]: """ Compute the difference between the modules/subworkflows in the directory and the modules/subworkflows in the 'modules.json' file. This is done by looking at all diff --git a/nf_core/pipelines/sync.py b/nf_core/pipelines/sync.py index c6d0218cce..d573f88668 100644 --- a/nf_core/pipelines/sync.py +++ b/nf_core/pipelines/sync.py @@ -18,6 +18,7 @@ from git import GitCommandError, InvalidGitRepositoryError import nf_core +import nf_core.modules.modules_json import nf_core.pipelines.create.create import nf_core.pipelines.list import nf_core.utils @@ -306,6 +307,7 @@ def copy_components_to_template(self) -> None: log.info("Copying modules.json to TEMPLATE branch") try: self.repo.git.checkout(self.original_branch, "--", "modules.json") + nf_core.modules.modules_json.ModulesJson(self.pipeline_dir).check_up_to_date() except GitCommandError as e: # don't raise an error if the file doesn't exist if "did not match any file(s) known to git" in str(e):