From 765ed752177219afb4dd69525b3dc12fbc33a617 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Tue, 18 Oct 2022 21:08:37 +0000 Subject: [PATCH 01/21] Add codespaces template for creating new repo's. --- .../.devcontainer/Dockerfile | 21 +++++++ .../.devcontainer/add-notice.sh | 20 +++++++ .../.devcontainer/devcontainer.json | 55 +++++++++++++++++++ .../pipeline-template/.devcontainer/noop.txt | 3 + 4 files changed, 99 insertions(+) create mode 100644 nf_core/pipeline-template/.devcontainer/Dockerfile create mode 100644 nf_core/pipeline-template/.devcontainer/add-notice.sh create mode 100644 nf_core/pipeline-template/.devcontainer/devcontainer.json create mode 100644 nf_core/pipeline-template/.devcontainer/noop.txt diff --git a/nf_core/pipeline-template/.devcontainer/Dockerfile b/nf_core/pipeline-template/.devcontainer/Dockerfile new file mode 100644 index 0000000000..85ad388646 --- /dev/null +++ b/nf_core/pipeline-template/.devcontainer/Dockerfile @@ -0,0 +1,21 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda/.devcontainer/base.Dockerfile + +FROM mcr.microsoft.com/vscode/devcontainers/anaconda:0-3 + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# Copy environment.yml (if found) to a temp location so we update the environment. Also +# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. +COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ +RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ + && rm -rf /tmp/conda-tmp + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +RUN conda install -c bioconda nextflow +RUN pip install nf-core + diff --git a/nf_core/pipeline-template/.devcontainer/add-notice.sh b/nf_core/pipeline-template/.devcontainer/add-notice.sh new file mode 100644 index 0000000000..0417abb6cd --- /dev/null +++ b/nf_core/pipeline-template/.devcontainer/add-notice.sh @@ -0,0 +1,20 @@ +# Display a notice when not running in GitHub Codespaces + +cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt +When using "conda" from outside of GitHub Codespaces, note the Anaconda repository +contains restrictions on commercial use that may impact certain organizations. See +https://aka.ms/vscode-remote/conda/anaconda + +EOF + +notice_script="$(cat << 'EOF' +if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then + cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt" + mkdir -p "$HOME/.config/vscode-dev-containers" + ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &) +fi +EOF +)" + +echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc + diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..c82f6703a5 --- /dev/null +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -0,0 +1,55 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda +{ + "name": "Anaconda (Python 3)", + "build": { + "context": "..", + "dockerfile": "Dockerfile", + "args": { + "NODE_VERSION": "lts/*" + } + }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/opt/conda/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", + "python.formatting.yapfPath": "/opt/conda/bin/yapf", + "python.linting.flake8Path": "/opt/conda/bin/flake8", + "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", + "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", + "python.linting.pylintPath": "/opt/conda/bin/pylint" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "python --version", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + "features": { + "docker-in-docker": "20.10", + "git": "os-provided", + "ghcr.io/devcontainers/features/conda:1": {}, + "ghcr.io/devcontainers/features/docker-from-docker:1": {}, + "ghcr.io/devcontainers/features/git:1": {} + } +} + + diff --git a/nf_core/pipeline-template/.devcontainer/noop.txt b/nf_core/pipeline-template/.devcontainer/noop.txt new file mode 100644 index 0000000000..09c5ae9b86 --- /dev/null +++ b/nf_core/pipeline-template/.devcontainer/noop.txt @@ -0,0 +1,3 @@ +This file copied into the container along with environment.yml* from the parent +folder. This file is included to prevents the Dockerfile COPY instruction from +failing if no environment.yml is found. From c2a2e913362368fce7ce337b3fa179b411dbad5b Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Tue, 18 Oct 2022 21:13:45 +0000 Subject: [PATCH 02/21] Update change log. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b67ffeaff2..12c6888ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Template - Fix lint warnings for `samplesheet_check.nf` module +- Add codespaces template ([#1957](https://github.com/nf-core/tools/pull/1957)) ### Linting From f9722a6d2b3a32a4d8a9606ef43f5d8efe345b40 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Tue, 18 Oct 2022 21:17:12 +0000 Subject: [PATCH 03/21] Update readme with codepsaces. --- nf_core/pipeline-template/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index 02a32f1f6e..590d27b7db 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -73,6 +73,17 @@ The results obtained from the full-sized test can be viewed on the [nf-core webs {% if branded -%} +## Codespaces +This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! + +Devcontainer specs: +- [DevContainer config](.devcontainer/devcontainer.json) +- [Dockerfile](.devcontainer/Dockerfile) + +# Getting started +- Create a new repo in GitHub using this [template](https://github.com/openwdl workflow-template-wdl/generate). +- Open the repo in [Codespaces](../../codespaces) + ## Documentation The {{ name }} pipeline comes with documentation about the pipeline [usage](https://nf-co.re/{{ short_name }}/usage), [parameters](https://nf-co.re/{{ short_name }}/parameters) and [output](https://nf-co.re/{{ short_name }}/output). From 20ca392c6b3c7876686d871c0d2028aa41bcd758 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Tue, 18 Oct 2022 16:26:44 -0500 Subject: [PATCH 04/21] Update README.md --- nf_core/pipeline-template/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index 590d27b7db..fa45b56229 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -81,8 +81,10 @@ Devcontainer specs: - [Dockerfile](.devcontainer/Dockerfile) # Getting started -- Create a new repo in GitHub using this [template](https://github.com/openwdl workflow-template-wdl/generate). - Open the repo in [Codespaces](../../codespaces) +- Tools installed + - nf-core + - nextflow ## Documentation From 492d6f506850f5cb91cf0ef93a7c15119f1691ef Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Wed, 19 Oct 2022 11:02:08 -0500 Subject: [PATCH 05/21] Change to absolute url --- nf_core/pipeline-template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index fa45b56229..8eceb4816f 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -81,7 +81,7 @@ Devcontainer specs: - [Dockerfile](.devcontainer/Dockerfile) # Getting started -- Open the repo in [Codespaces](../../codespaces) +- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) - Tools installed - nf-core - nextflow From dc4e4d6634f456d612ca059ae7076ac1dd6ee6e1 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:29:53 -0500 Subject: [PATCH 06/21] Add nextflow extension pack. --- nf_core/pipeline-template/.devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index c82f6703a5..f8df1d2be2 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -30,7 +30,8 @@ // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-python.python", - "ms-python.vscode-pylance" + "ms-python.vscode-pylance", + "nf-core.nf-core-extensionpack" ] } }, From e8f0502ea100ae4a16eb5a6b04476da830fea401 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:35:38 -0500 Subject: [PATCH 07/21] Update syntax. --- nf_core/pipeline-template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index 8eceb4816f..364fde0852 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -80,7 +80,7 @@ Devcontainer specs: - [DevContainer config](.devcontainer/devcontainer.json) - [Dockerfile](.devcontainer/Dockerfile) -# Getting started +# To get started: - Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) - Tools installed - nf-core From d8bd51742fcf05f135a60b285b2b0af2e280172d Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:40:27 -0500 Subject: [PATCH 08/21] Moved section to root Contributing directory. --- .github/CONTRIBUTING.md | 13 +++++++++++++ nf_core/pipeline-template/README.md | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 800ba7ab10..851d88cbcc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -127,3 +127,16 @@ You can replicate this process locally with the following commands: nf-core create -n testpipeline -d "This pipeline is for testing" nf-core lint nf-core-testpipeline ``` + +## Codespaces +This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! + +Devcontainer specs: +- [DevContainer config](.devcontainer/devcontainer.json) +- [Dockerfile](.devcontainer/Dockerfile) + +# To get started: +- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) +- Tools installed + - nf-core + - nextflow diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index 364fde0852..02a32f1f6e 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -73,19 +73,6 @@ The results obtained from the full-sized test can be viewed on the [nf-core webs {% if branded -%} -## Codespaces -This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! - -Devcontainer specs: -- [DevContainer config](.devcontainer/devcontainer.json) -- [Dockerfile](.devcontainer/Dockerfile) - -# To get started: -- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) -- Tools installed - - nf-core - - nextflow - ## Documentation The {{ name }} pipeline comes with documentation about the pipeline [usage](https://nf-co.re/{{ short_name }}/usage), [parameters](https://nf-co.re/{{ short_name }}/parameters) and [output](https://nf-co.re/{{ short_name }}/output). From 3817949d26fe00764d7d559fe6a1b097f0e02404 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:44:17 -0500 Subject: [PATCH 09/21] Make more parity with Gitpod. --- nf_core/pipeline-template/.devcontainer/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nf_core/pipeline-template/.devcontainer/Dockerfile b/nf_core/pipeline-template/.devcontainer/Dockerfile index 85ad388646..8e4c9e259f 100644 --- a/nf_core/pipeline-template/.devcontainer/Dockerfile +++ b/nf_core/pipeline-template/.devcontainer/Dockerfile @@ -18,4 +18,16 @@ RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bi RUN conda install -c bioconda nextflow RUN pip install nf-core +RUN conda update -n base -c defaults conda && \ + conda config --add channels defaults && \ + conda config --add channels bioconda && \ + conda config --add channels conda-forge && \ + conda install \ + pytest-workflow=1.6.0 \ + mamba=0.24.0 \ + pip=22.1.2 \ + black=22.6.0 \ + prettier=2.7.1 \ + -n base && \ + conda clean --all -f -y From 862fa6b555afdabc955b8fcba74811c970fa2739 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:45:10 -0500 Subject: [PATCH 10/21] Make more parity with Gitpod. --- nf_core/pipeline-template/.devcontainer/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.devcontainer/Dockerfile b/nf_core/pipeline-template/.devcontainer/Dockerfile index 8e4c9e259f..c866df8c51 100644 --- a/nf_core/pipeline-template/.devcontainer/Dockerfile +++ b/nf_core/pipeline-template/.devcontainer/Dockerfile @@ -16,13 +16,14 @@ RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bi # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends -RUN conda install -c bioconda nextflow RUN pip install nf-core RUN conda update -n base -c defaults conda && \ conda config --add channels defaults && \ conda config --add channels bioconda && \ conda config --add channels conda-forge && \ conda install \ + openjdk=11.0.15 \ + nextflow=22.04.0 \ pytest-workflow=1.6.0 \ mamba=0.24.0 \ pip=22.1.2 \ From cc144b3869aae306a29c8bd674fa65d6bdcd1689 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Thu, 27 Oct 2022 16:45:30 -0500 Subject: [PATCH 11/21] Add a codspaces for the tools repo. --- .devcontainer/Dockerfile | 34 ++++++++++++++++++++ .devcontainer/add-notice.sh | 20 ++++++++++++ .devcontainer/devcontainer.json | 56 +++++++++++++++++++++++++++++++++ .devcontainer/noop.txt | 3 ++ 4 files changed, 113 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/add-notice.sh create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/noop.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..c866df8c51 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,34 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda/.devcontainer/base.Dockerfile + +FROM mcr.microsoft.com/vscode/devcontainers/anaconda:0-3 + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# Copy environment.yml (if found) to a temp location so we update the environment. Also +# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. +COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ +RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ + && rm -rf /tmp/conda-tmp + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +RUN pip install nf-core +RUN conda update -n base -c defaults conda && \ + conda config --add channels defaults && \ + conda config --add channels bioconda && \ + conda config --add channels conda-forge && \ + conda install \ + openjdk=11.0.15 \ + nextflow=22.04.0 \ + pytest-workflow=1.6.0 \ + mamba=0.24.0 \ + pip=22.1.2 \ + black=22.6.0 \ + prettier=2.7.1 \ + -n base && \ + conda clean --all -f -y + diff --git a/.devcontainer/add-notice.sh b/.devcontainer/add-notice.sh new file mode 100644 index 0000000000..0417abb6cd --- /dev/null +++ b/.devcontainer/add-notice.sh @@ -0,0 +1,20 @@ +# Display a notice when not running in GitHub Codespaces + +cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt +When using "conda" from outside of GitHub Codespaces, note the Anaconda repository +contains restrictions on commercial use that may impact certain organizations. See +https://aka.ms/vscode-remote/conda/anaconda + +EOF + +notice_script="$(cat << 'EOF' +if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then + cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt" + mkdir -p "$HOME/.config/vscode-dev-containers" + ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &) +fi +EOF +)" + +echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..f8df1d2be2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,56 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda +{ + "name": "Anaconda (Python 3)", + "build": { + "context": "..", + "dockerfile": "Dockerfile", + "args": { + "NODE_VERSION": "lts/*" + } + }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/opt/conda/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", + "python.formatting.yapfPath": "/opt/conda/bin/yapf", + "python.linting.flake8Path": "/opt/conda/bin/flake8", + "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", + "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", + "python.linting.pylintPath": "/opt/conda/bin/pylint" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "nf-core.nf-core-extensionpack" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "python --version", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + "features": { + "docker-in-docker": "20.10", + "git": "os-provided", + "ghcr.io/devcontainers/features/conda:1": {}, + "ghcr.io/devcontainers/features/docker-from-docker:1": {}, + "ghcr.io/devcontainers/features/git:1": {} + } +} + + diff --git a/.devcontainer/noop.txt b/.devcontainer/noop.txt new file mode 100644 index 0000000000..09c5ae9b86 --- /dev/null +++ b/.devcontainer/noop.txt @@ -0,0 +1,3 @@ +This file copied into the container along with environment.yml* from the parent +folder. This file is included to prevents the Dockerfile COPY instruction from +failing if no environment.yml is found. From efee0354de2a644f4d798e58b280b27e41b209cd Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Fri, 28 Oct 2022 10:56:20 -0500 Subject: [PATCH 12/21] Sync gitpod and codespaces. --- .devcontainer/Dockerfile | 34 -------------------------- .devcontainer/add-notice.sh | 20 --------------- .devcontainer/devcontainer.json | 43 ++++++++++----------------------- .devcontainer/noop.txt | 3 --- 4 files changed, 13 insertions(+), 87 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/add-notice.sh delete mode 100644 .devcontainer/noop.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index c866df8c51..0000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda/.devcontainer/base.Dockerfile - -FROM mcr.microsoft.com/vscode/devcontainers/anaconda:0-3 - -# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 -ARG NODE_VERSION="none" -RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi - -# Copy environment.yml (if found) to a temp location so we update the environment. Also -# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. -COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ -RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ - && rm -rf /tmp/conda-tmp - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -RUN pip install nf-core -RUN conda update -n base -c defaults conda && \ - conda config --add channels defaults && \ - conda config --add channels bioconda && \ - conda config --add channels conda-forge && \ - conda install \ - openjdk=11.0.15 \ - nextflow=22.04.0 \ - pytest-workflow=1.6.0 \ - mamba=0.24.0 \ - pip=22.1.2 \ - black=22.6.0 \ - prettier=2.7.1 \ - -n base && \ - conda clean --all -f -y - diff --git a/.devcontainer/add-notice.sh b/.devcontainer/add-notice.sh deleted file mode 100644 index 0417abb6cd..0000000000 --- a/.devcontainer/add-notice.sh +++ /dev/null @@ -1,20 +0,0 @@ -# Display a notice when not running in GitHub Codespaces - -cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt -When using "conda" from outside of GitHub Codespaces, note the Anaconda repository -contains restrictions on commercial use that may impact certain organizations. See -https://aka.ms/vscode-remote/conda/anaconda - -EOF - -notice_script="$(cat << 'EOF' -if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then - cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt" - mkdir -p "$HOME/.config/vscode-dev-containers" - ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &) -fi -EOF -)" - -echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f8df1d2be2..dfc011a4cd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,8 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda { - "name": "Anaconda (Python 3)", - "build": { - "context": "..", - "dockerfile": "Dockerfile", - "args": { - "NODE_VERSION": "lts/*" - } - }, + "name": "nfcore", + "image": "nfcore/gitpod:latest", + "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e .", + "remoteUser": "gitpod", // Configure tool-specific properties. "customizations": { @@ -31,26 +25,15 @@ "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack" + "nf-core.nf-core-extensionpack", + "codezombiech.gitignore", + "esbenp.prettier-vscode", + "EditorConfig.EditorConfig", + "Gruntfuggly.todo-tree", + "mechatroner.rainbow-csv", + "derwat.indent-rainbow", + "streetsidesoftware.code-spell-checker" ] } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "python --version", - - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode", - "features": { - "docker-in-docker": "20.10", - "git": "os-provided", - "ghcr.io/devcontainers/features/conda:1": {}, - "ghcr.io/devcontainers/features/docker-from-docker:1": {}, - "ghcr.io/devcontainers/features/git:1": {} } -} - - +} \ No newline at end of file diff --git a/.devcontainer/noop.txt b/.devcontainer/noop.txt deleted file mode 100644 index 09c5ae9b86..0000000000 --- a/.devcontainer/noop.txt +++ /dev/null @@ -1,3 +0,0 @@ -This file copied into the container along with environment.yml* from the parent -folder. This file is included to prevents the Dockerfile COPY instruction from -failing if no environment.yml is found. From 3274319574c117004256891866c6b43add22892a Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Fri, 28 Oct 2022 11:29:10 -0500 Subject: [PATCH 13/21] Fix build of nfcore tools. --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dfc011a4cd..678eea8d20 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { "name": "nfcore", "image": "nfcore/gitpod:latest", - "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e .", + "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e ../", "remoteUser": "gitpod", // Configure tool-specific properties. From 1f6a256ad934cac6612f88379cac7ea136ecd5ae Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Fri, 28 Oct 2022 11:32:26 -0500 Subject: [PATCH 14/21] Sync gitpod and codespaces. --- .../.devcontainer/Dockerfile | 34 --------------- .../.devcontainer/add-notice.sh | 20 --------- .../.devcontainer/devcontainer.json | 42 ++++++------------- .../pipeline-template/.devcontainer/noop.txt | 3 -- 4 files changed, 12 insertions(+), 87 deletions(-) delete mode 100644 nf_core/pipeline-template/.devcontainer/Dockerfile delete mode 100644 nf_core/pipeline-template/.devcontainer/add-notice.sh delete mode 100644 nf_core/pipeline-template/.devcontainer/noop.txt diff --git a/nf_core/pipeline-template/.devcontainer/Dockerfile b/nf_core/pipeline-template/.devcontainer/Dockerfile deleted file mode 100644 index c866df8c51..0000000000 --- a/nf_core/pipeline-template/.devcontainer/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda/.devcontainer/base.Dockerfile - -FROM mcr.microsoft.com/vscode/devcontainers/anaconda:0-3 - -# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 -ARG NODE_VERSION="none" -RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi - -# Copy environment.yml (if found) to a temp location so we update the environment. Also -# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists. -COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/ -RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \ - && rm -rf /tmp/conda-tmp - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -RUN pip install nf-core -RUN conda update -n base -c defaults conda && \ - conda config --add channels defaults && \ - conda config --add channels bioconda && \ - conda config --add channels conda-forge && \ - conda install \ - openjdk=11.0.15 \ - nextflow=22.04.0 \ - pytest-workflow=1.6.0 \ - mamba=0.24.0 \ - pip=22.1.2 \ - black=22.6.0 \ - prettier=2.7.1 \ - -n base && \ - conda clean --all -f -y - diff --git a/nf_core/pipeline-template/.devcontainer/add-notice.sh b/nf_core/pipeline-template/.devcontainer/add-notice.sh deleted file mode 100644 index 0417abb6cd..0000000000 --- a/nf_core/pipeline-template/.devcontainer/add-notice.sh +++ /dev/null @@ -1,20 +0,0 @@ -# Display a notice when not running in GitHub Codespaces - -cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt -When using "conda" from outside of GitHub Codespaces, note the Anaconda repository -contains restrictions on commercial use that may impact certain organizations. See -https://aka.ms/vscode-remote/conda/anaconda - -EOF - -notice_script="$(cat << 'EOF' -if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then - cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt" - mkdir -p "$HOME/.config/vscode-dev-containers" - ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &) -fi -EOF -)" - -echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc - diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index f8df1d2be2..0673bad888 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -1,14 +1,7 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3-anaconda { - "name": "Anaconda (Python 3)", - "build": { - "context": "..", - "dockerfile": "Dockerfile", - "args": { - "NODE_VERSION": "lts/*" - } - }, + "name": "nfcore", + "image": "nfcore/gitpod:latest", + "remoteUser": "gitpod", // Configure tool-specific properties. "customizations": { @@ -31,26 +24,15 @@ "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack" + "nf-core.nf-core-extensionpack", + "codezombiech.gitignore", + "esbenp.prettier-vscode", + "EditorConfig.EditorConfig", + "Gruntfuggly.todo-tree", + "mechatroner.rainbow-csv", + "derwat.indent-rainbow", + "streetsidesoftware.code-spell-checker" ] } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "python --version", - - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode", - "features": { - "docker-in-docker": "20.10", - "git": "os-provided", - "ghcr.io/devcontainers/features/conda:1": {}, - "ghcr.io/devcontainers/features/docker-from-docker:1": {}, - "ghcr.io/devcontainers/features/git:1": {} } -} - - +} \ No newline at end of file diff --git a/nf_core/pipeline-template/.devcontainer/noop.txt b/nf_core/pipeline-template/.devcontainer/noop.txt deleted file mode 100644 index 09c5ae9b86..0000000000 --- a/nf_core/pipeline-template/.devcontainer/noop.txt +++ /dev/null @@ -1,3 +0,0 @@ -This file copied into the container along with environment.yml* from the parent -folder. This file is included to prevents the Dockerfile COPY instruction from -failing if no environment.yml is found. From a51bfec5943016ab5037e77b3c2f69e594e59732 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 28 Oct 2022 17:39:34 +0000 Subject: [PATCH 15/21] [automated] Fix code linting --- .devcontainer/devcontainer.json | 68 +++++++++---------- .github/CONTRIBUTING.md | 7 +- .../.devcontainer/devcontainer.json | 66 +++++++++--------- 3 files changed, 72 insertions(+), 69 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 678eea8d20..31f3628849 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,39 +1,39 @@ { "name": "nfcore", "image": "nfcore/gitpod:latest", - "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e ../", + "postCreateCommand": "python -m pip install --upgrade -r ../requirements-dev.txt -e ../", "remoteUser": "gitpod", - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "python.defaultInterpreterPath": "/opt/conda/bin/python", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", - "python.formatting.yapfPath": "/opt/conda/bin/yapf", - "python.linting.flake8Path": "/opt/conda/bin/flake8", - "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", - "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-python.python", - "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack", - "codezombiech.gitignore", - "esbenp.prettier-vscode", - "EditorConfig.EditorConfig", - "Gruntfuggly.todo-tree", - "mechatroner.rainbow-csv", - "derwat.indent-rainbow", - "streetsidesoftware.code-spell-checker" - ] - } - } -} \ No newline at end of file + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/opt/conda/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", + "python.formatting.yapfPath": "/opt/conda/bin/yapf", + "python.linting.flake8Path": "/opt/conda/bin/flake8", + "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", + "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", + "python.linting.pylintPath": "/opt/conda/bin/pylint" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "nf-core.nf-core-extensionpack", + "codezombiech.gitignore", + "esbenp.prettier-vscode", + "EditorConfig.EditorConfig", + "Gruntfuggly.todo-tree", + "mechatroner.rainbow-csv", + "derwat.indent-rainbow", + "streetsidesoftware.code-spell-checker" + ] + } + } +} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 851d88cbcc..b3c22ef484 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -129,14 +129,17 @@ nf-core lint nf-core-testpipeline ``` ## Codespaces + This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! Devcontainer specs: + - [DevContainer config](.devcontainer/devcontainer.json) - [Dockerfile](.devcontainer/Dockerfile) # To get started: + - Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) - Tools installed - - nf-core - - nextflow + - nf-core + - nextflow diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index 0673bad888..d4c8fa8fa5 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -3,36 +3,36 @@ "image": "nfcore/gitpod:latest", "remoteUser": "gitpod", - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "python.defaultInterpreterPath": "/opt/conda/bin/python", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", - "python.formatting.yapfPath": "/opt/conda/bin/yapf", - "python.linting.flake8Path": "/opt/conda/bin/flake8", - "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", - "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-python.python", - "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack", - "codezombiech.gitignore", - "esbenp.prettier-vscode", - "EditorConfig.EditorConfig", - "Gruntfuggly.todo-tree", - "mechatroner.rainbow-csv", - "derwat.indent-rainbow", - "streetsidesoftware.code-spell-checker" - ] - } - } -} \ No newline at end of file + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/opt/conda/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/opt/conda/bin/autopep8", + "python.formatting.yapfPath": "/opt/conda/bin/yapf", + "python.linting.flake8Path": "/opt/conda/bin/flake8", + "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", + "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", + "python.linting.pylintPath": "/opt/conda/bin/pylint" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "nf-core.nf-core-extensionpack", + "codezombiech.gitignore", + "esbenp.prettier-vscode", + "EditorConfig.EditorConfig", + "Gruntfuggly.todo-tree", + "mechatroner.rainbow-csv", + "derwat.indent-rainbow", + "streetsidesoftware.code-spell-checker" + ] + } + } +} From ae7fae13133af8153be545d2b10f872600b00fce Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Wed, 2 Nov 2022 09:49:57 -0500 Subject: [PATCH 16/21] Remove redundant extensions --- .devcontainer/devcontainer.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 31f3628849..0e022e3578 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -25,14 +25,7 @@ "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack", - "codezombiech.gitignore", - "esbenp.prettier-vscode", - "EditorConfig.EditorConfig", - "Gruntfuggly.todo-tree", - "mechatroner.rainbow-csv", - "derwat.indent-rainbow", - "streetsidesoftware.code-spell-checker" + "nf-core.nf-core-extensionpack" ] } } From c6fb54975e7401caffc1f258d0516a3cc16706c2 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Wed, 2 Nov 2022 09:50:32 -0500 Subject: [PATCH 17/21] Remove redundant extensions --- .../pipeline-template/.devcontainer/devcontainer.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index d4c8fa8fa5..43e2a18991 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -24,14 +24,7 @@ "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack", - "codezombiech.gitignore", - "esbenp.prettier-vscode", - "EditorConfig.EditorConfig", - "Gruntfuggly.todo-tree", - "mechatroner.rainbow-csv", - "derwat.indent-rainbow", - "streetsidesoftware.code-spell-checker" + "nf-core.nf-core-extensionpack" ] } } From e604cb7afe9727a1331a2adc9143ecd22fe4e335 Mon Sep 17 00:00:00 2001 From: Venkat Malladi Date: Wed, 2 Nov 2022 09:53:03 -0500 Subject: [PATCH 18/21] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b3c22ef484..27689bf22a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -128,6 +128,15 @@ nf-core create -n testpipeline -d "This pipeline is for testing" nf-core lint nf-core-testpipeline ``` +# To get started: + +- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) +- Tools installed + - nf-core + - nextflow + + +**Note:** ## Codespaces This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! @@ -136,10 +145,3 @@ Devcontainer specs: - [DevContainer config](.devcontainer/devcontainer.json) - [Dockerfile](.devcontainer/Dockerfile) - -# To get started: - -- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) -- Tools installed - - nf-core - - nextflow From 15397775f263194d28eae6858ac26c4b58c454db Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 3 Nov 2022 16:35:45 +0000 Subject: [PATCH 19/21] [automated] Fix code linting --- .devcontainer/devcontainer.json | 6 +----- .github/CONTRIBUTING.md | 2 +- nf_core/pipeline-template/.devcontainer/devcontainer.json | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0e022e3578..b5138b1d0d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,11 +22,7 @@ }, // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-python.python", - "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack" - ] + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] } } } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 27689bf22a..19ccba5566 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -135,8 +135,8 @@ nf-core lint nf-core-testpipeline - nf-core - nextflow - **Note:** + ## Codespaces This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! diff --git a/nf_core/pipeline-template/.devcontainer/devcontainer.json b/nf_core/pipeline-template/.devcontainer/devcontainer.json index 43e2a18991..ea27a5843a 100644 --- a/nf_core/pipeline-template/.devcontainer/devcontainer.json +++ b/nf_core/pipeline-template/.devcontainer/devcontainer.json @@ -21,11 +21,7 @@ }, // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-python.python", - "ms-python.vscode-pylance", - "nf-core.nf-core-extensionpack" - ] + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] } } } From 665402779a432d9c1fce2580f0826578a5079cbd Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 3 Nov 2022 19:08:24 +0100 Subject: [PATCH 20/21] Apply suggestions from code review --- .github/CONTRIBUTING.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 19ccba5566..0b1d45f874 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -128,18 +128,17 @@ nf-core create -n testpipeline -d "This pipeline is for testing" nf-core lint nf-core-testpipeline ``` -# To get started: -- Open the repo in [Codespaces](https://github.com/{{ name }})/codespaces) -- Tools installed - - nf-core - - nextflow +## GitHub Codespaces -**Note:** +This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. -## Codespaces +To get started: -This repo includes a devcontainer configuration which will create a GitHub Codespace for Nextflow development! +- Open the repo in [Codespaces](https://github.com/nf-core/tools/codespaces) +- Tools installed + - nf-core + - nextflow Devcontainer specs: From 0146a89772aed6aaf64f093ba6e207aa4eb5d909 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 3 Nov 2022 19:10:14 +0100 Subject: [PATCH 21/21] Add Codespaces instructions to pipeline template CONTRIBUTING too --- .github/CONTRIBUTING.md | 3 +-- .../pipeline-template/.github/CONTRIBUTING.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0b1d45f874..fc73294b5a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -128,7 +128,6 @@ nf-core create -n testpipeline -d "This pipeline is for testing" nf-core lint nf-core-testpipeline ``` - ## GitHub Codespaces This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. @@ -138,7 +137,7 @@ To get started: - Open the repo in [Codespaces](https://github.com/nf-core/tools/codespaces) - Tools installed - nf-core - - nextflow + - Nextflow Devcontainer specs: diff --git a/nf_core/pipeline-template/.github/CONTRIBUTING.md b/nf_core/pipeline-template/.github/CONTRIBUTING.md index b9720ac70b..9afdd2987b 100644 --- a/nf_core/pipeline-template/.github/CONTRIBUTING.md +++ b/nf_core/pipeline-template/.github/CONTRIBUTING.md @@ -109,3 +109,19 @@ If you are using a new feature from core Nextflow, you may bump the minimum requ ### Images and figures For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). + +## GitHub Codespaces + +This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. + +To get started: + +- Open the repo in [Codespaces](https://github.com/{{ name }}/codespaces) +- Tools installed + - nf-core + - Nextflow + +Devcontainer specs: + +- [DevContainer config](.devcontainer/devcontainer.json) +- [Dockerfile](.devcontainer/Dockerfile)