Skip to content

Commit

Permalink
remove modules.json copy step in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 4, 2024
1 parent 46b998b commit fa1a01d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions nf_core/pipelines/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
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 @@ -138,7 +137,6 @@ def sync(self):
self.checkout_template_branch()
self.delete_template_branch_files()
self.make_template_pipeline()
self.copy_components_to_template()
self.commit_template_changes()

if not self.made_changes and self.force_pr:
Expand Down Expand Up @@ -300,22 +298,6 @@ def make_template_pipeline(self):
self.repo.git.reset("--hard")
raise SyncExceptionError(f"Failed to rebuild pipeline from template with error:\n{err}")

def copy_components_to_template(self) -> None:
"""
Copy the modules.json file from the current pipeline to the TEMPLATE branch using git checkout
"""
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):
log.info("No modules.json file found in current pipeline - not copying")
return
else:
raise SyncExceptionError(f"Could not copy modules.json to TEMPLATE branch:\n{e}")

def commit_template_changes(self):
"""If we have any changes with the new template files, make a git commit"""
# Check that we have something to commit
Expand Down

0 comments on commit fa1a01d

Please sign in to comment.