From 7261ebd00060ab37f277f2b1d47f4be741bff163 Mon Sep 17 00:00:00 2001 From: phue Date: Fri, 5 Mar 2021 15:00:40 +0100 Subject: [PATCH 1/3] simplify charliecloud config with charliecloud 0.22, docker ENV layers are supported. Nextflow supports this feature since v21.03.0-edge. This means we don't have to explicitly pass set the PATH variable within the container, greatly simplifying the config --- .../conf/charliecloud.config | 22 ------------------- .../nextflow.config | 5 ++++- 2 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 nf_core/pipeline-template/{{cookiecutter.name_noslash}}/conf/charliecloud.config diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/conf/charliecloud.config b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/conf/charliecloud.config deleted file mode 100644 index c32bc39854..0000000000 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/conf/charliecloud.config +++ /dev/null @@ -1,22 +0,0 @@ -/* - * ------------------------------------------------- - * Nextflow config file for Charliecloud - * ------------------------------------------------- - * Assumes that pipeline dependencies are all available in - * /opt/conda/envs/{{ cookiecutter.name_noslash }}-{{ cookiecutter.version }}/bin - * If multiple containers are used, it may be necessary to include their environment - * paths in the `env` scope below - */ - -charliecloud { - enabled = true -} - -manifest { - nextflowVersion = '>=20.12.0-edge' -} - -env { - PATH = "/opt/conda/bin:/opt/conda/envs/{{ cookiecutter.name_noslash }}-{{ cookiecutter.version }}/bin:$PATH" - // TODO nf-core: If the pipeline uses additional environments, add them to $PATH as well -} \ No newline at end of file diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config index 5f0f2e7c35..e777421f96 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config @@ -78,7 +78,10 @@ profiles { shifter { shifter.enabled = true } - charliecloud { includeConfig 'conf/charliecloud.config' } + charliecloud { + manifest.nextflowVersion = '>=21.03.0-edge' + charliecloud.enabled = true + } test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } } From e38bac37150f0036c4789925bdc06532ae54d2a9 Mon Sep 17 00:00:00 2001 From: phue Date: Fri, 5 Mar 2021 15:03:18 +0100 Subject: [PATCH 2/3] Revert "nf-core bump-version: add charliecloud.config" This reverts commit 995b8eda6268f7213cc313661be9d9c2b6f4e7b2. We don't need this anymore --- nf_core/bump_version.py | 12 ------------ tests/test_bump_version.py | 5 ----- 2 files changed, 17 deletions(-) diff --git a/nf_core/bump_version.py b/nf_core/bump_version.py index 0555fb5805..28e3f9eeaa 100644 --- a/nf_core/bump_version.py +++ b/nf_core/bump_version.py @@ -108,18 +108,6 @@ def bump_pipeline_version(pipeline_obj, new_version): ], ) - # conf/charliecloud.config - environment path - update_file_version( - "conf/charliecloud.config", - pipeline_obj, - [ - ( - r"nf-core-{}-{}".format(pipeline_obj.pipeline_name.lower(), current_version.replace(".", r"\.")), - "nf-core-{}-{}".format(pipeline_obj.pipeline_name.lower(), new_version), - ) - ], - ) - def bump_nextflow_version(pipeline_obj, new_version): """Bumps the required Nextflow version number of a pipeline. diff --git a/tests/test_bump_version.py b/tests/test_bump_version.py index ea4d1c4593..74e9dfddf0 100644 --- a/tests/test_bump_version.py +++ b/tests/test_bump_version.py @@ -47,11 +47,6 @@ def test_bump_pipeline_version(datafiles): assert "ENV PATH /opt/conda/envs/nf-core-testpipeline-1.1/bin:$PATH" in dockerfile assert "RUN conda env export --name nf-core-testpipeline-1.1 > nf-core-testpipeline-1.1.yml" in dockerfile - # Check charliecloud.config - with open(new_pipeline_obj._fp("conf/charliecloud.config")) as fh: - charliecloud_config = fh.read().splitlines() - assert ' PATH = "/opt/conda/bin:/opt/conda/envs/nf-core-testpipeline-1.1/bin:$PATH"' in charliecloud_config - def test_dev_bump_pipeline_version(datafiles): """ Test that making a release works with a dev name and a leading v """ From f1a9600271c0d42ee11a861864868870498f9161 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Wed, 10 Mar 2021 10:21:35 +0100 Subject: [PATCH 3/3] Update nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config --- .../{{cookiecutter.name_noslash}}/nextflow.config | 1 - 1 file changed, 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config index e777421f96..2299ffd5df 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config @@ -79,7 +79,6 @@ profiles { shifter.enabled = true } charliecloud { - manifest.nextflowVersion = '>=21.03.0-edge' charliecloud.enabled = true } test { includeConfig 'conf/test.config' }