From c6deebe44a1b7a913dccda7e3fe3c586b7b1acb5 Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Tue, 9 Apr 2019 13:54:55 +0200 Subject: [PATCH 1/5] Corrects blacklist filtering --- bin/sync | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/sync b/bin/sync index c3b37528f8..97ff6e5b8d 100755 --- a/bin/sync +++ b/bin/sync @@ -55,7 +55,7 @@ def filter_blacklisted_pipelines_from_list(pipelines, blacklisted_pipelines): def fetch_black_listed_pipelines_from_file(file_path): with open(file_path) as fh: blacklist = json.load(fh) - return blacklist + return blacklist.get('pipelines') def fetch_nfcore_workflows_from_website(url): @@ -97,10 +97,12 @@ def main(): assert os.environ['NF_CORE_BOT'] blacklisted_pipeline_names = fetch_black_listed_pipelines_from_file(PATH_PARENT_DIR + "/blacklist.json") + print(blacklisted_pipeline_names) pipelines = fetch_nfcore_workflows_from_website(NF_CORE_PIPELINE_INFO) filtered_pipelines = filter_blacklisted_pipelines_from_list(pipelines, blacklisted_pipeline_names) + print(filtered_pipelines) for pipeline in filtered_pipelines: print("Update template branch for pipeline '{pipeline}'... ".format(pipeline=pipeline['name'])) From b8076378fa3b0513475532973f8ee2443075cced Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Tue, 9 Apr 2019 14:21:57 +0200 Subject: [PATCH 2/5] Uses meta information from dev branch instead of master --- bin/syncutils/template.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/syncutils/template.py b/bin/syncutils/template.py index ddada5cfb0..69fc1bca91 100644 --- a/bin/syncutils/template.py +++ b/bin/syncutils/template.py @@ -42,8 +42,8 @@ def context_from_nextflow(self, nf_project_dir): Returns: A cookiecutter-readable context (Python dictionary) """ # Check if we are on "master" (main pipeline code) - if self.repo.active_branch.name != "master": - self.repo.git.checkout("origin/master", b="master") + if self.repo.active_branch.name != "dev": + self.repo.git.checkout("origin/dev", b="dev") # Fetch the config variables from the Nextflow pipeline config = utils.fetch_wf_config(wf_path=nf_project_dir) @@ -66,8 +66,6 @@ def update_child_template(self, templatedir, target_dir, context=None): shutil.rmtree(os.path.join(target_dir, f)) except: os.remove(os.path.join(target_dir, f)) - print(target_dir) - print(context.get('author')) # Create the new template structure nf_core.create.PipelineCreate( name=context.get('pipeline_name'), From 8e32e69f66ec967bfdf9261bc2e2b02fd918a44b Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Tue, 9 Apr 2019 18:05:16 +0200 Subject: [PATCH 3/5] Enables single pipeline sync via command line --- bin/sync | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/sync b/bin/sync index 97ff6e5b8d..6dda0ed626 100755 --- a/bin/sync +++ b/bin/sync @@ -97,12 +97,14 @@ def main(): assert os.environ['NF_CORE_BOT'] blacklisted_pipeline_names = fetch_black_listed_pipelines_from_file(PATH_PARENT_DIR + "/blacklist.json") - print(blacklisted_pipeline_names) pipelines = fetch_nfcore_workflows_from_website(NF_CORE_PIPELINE_INFO) - filtered_pipelines = filter_blacklisted_pipelines_from_list(pipelines, blacklisted_pipeline_names) - print(filtered_pipelines) + if len(sys.argv) > 1: + pipeline_to_sync = sys.argv[1] + filtered_pipelines = [pipeline for pipeline in pipelines if pipeline_to_sync in pipeline.get('name')] + else: + filtered_pipelines = filter_blacklisted_pipelines_from_list(pipelines, blacklisted_pipeline_names) for pipeline in filtered_pipelines: print("Update template branch for pipeline '{pipeline}'... ".format(pipeline=pipeline['name'])) From ef8d98730cda06eab901223e4b246c0cea66f19b Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Tue, 9 Apr 2019 18:07:57 +0200 Subject: [PATCH 4/5] Updates changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6e3847e01..798d4edf33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # nf-core/tools: Changelog +## v1.7dev + +#### Syncing +* Can now sync a targeted pipeline via command-line + ## v1.6 #### Syncing From adce02e19b21d0f56e5d8bc1c0b4b72881caf5b1 Mon Sep 17 00:00:00 2001 From: Sven Fillinger Date: Wed, 10 Apr 2019 08:48:15 +0200 Subject: [PATCH 5/5] Corrects markdown error --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 798d4edf33..b1628bc5d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## v1.7dev #### Syncing -* Can now sync a targeted pipeline via command-line +* Can now sync a targeted pipeline via command-line ## v1.6