Skip to content

Commit

Permalink
install modules in TEMPLATE branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 4, 2024
1 parent 4ea3650 commit 46b998b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nf_core/modules/modules_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions nf_core/pipelines/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 46b998b

Please sign in to comment.