Skip to content

Test refgenie CI - DO NOT MERGE #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 42 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
185cc42
Merge pull request #52 from nf-core/dev
ggabernet Nov 14, 2022
6f67023
add download ci
mashehu Dec 1, 2022
61fdc2f
always run download CI
mashehu Dec 1, 2022
b1355c4
change pipeline name
mashehu Dec 1, 2022
0f94e8f
add cache_dir
mashehu Dec 1, 2022
49a4e82
change cachedir
mashehu Dec 1, 2022
a338d09
run downloaded pipeline
mashehu Dec 2, 2022
17643bd
fix formatting
mashehu Dec 2, 2022
2ccd646
add singularity
mashehu Dec 2, 2022
b4042d3
Template update for nf-core/tools version 2.7.dev0
mirpedrol Dec 22, 2022
e4d696d
merge TEMPLATE
mirpedrol Dec 22, 2022
3294710
Template update for nf-core/tools version 2.7.2
mirpedrol Dec 22, 2022
f597bd4
Merge branch 'TEMPLATE' into test-refgenie
mirpedrol Dec 22, 2022
e3c51f1
create genomes.config.tpl and populate
mirpedrol Dec 22, 2022
f46ccdf
add refgenie GHA
mirpedrol Dec 22, 2022
041c6c0
install refgenconf from dev
mirpedrol Dec 22, 2022
ae5c895
use python 3.8
mirpedrol Dec 22, 2022
caa8f17
modify genomes.config to make CI fail
mirpedrol Dec 22, 2022
5b06476
modify GHA to check changed file
mirpedrol Dec 22, 2022
78c3822
remove missing if git diff
mirpedrol Dec 22, 2022
6125530
fix some GHA errors
mirpedrol Dec 22, 2022
d63388b
add process id
mirpedrol Dec 22, 2022
a68813e
make GHA fail
mirpedrol Dec 22, 2022
04f2dad
make GHA fail
mirpedrol Dec 22, 2022
674c9d2
fix tabs
mirpedrol Dec 22, 2022
7b23146
GHA should pass
mirpedrol Jan 12, 2023
3ccc820
init refgenie
mirpedrol Jan 12, 2023
c6ac2e8
init refgenie with proper paths
mirpedrol Jan 12, 2023
4ea11f4
use refgenie en vvar
mirpedrol Jan 12, 2023
e624c4f
create refgenie config file
mirpedrol Jan 12, 2023
1cef9dc
don't create file
mirpedrol Jan 12, 2023
fb92989
add nf-core database to refgenie populater
mirpedrol Jan 12, 2023
297e041
specify bwa_index version
mirpedrol Jan 12, 2023
2707979
go back
mirpedrol Jan 12, 2023
4ce299b
remove file to write to debug the error
mirpedrol Jan 12, 2023
eb730ca
print debug log when running refgenie populater
mirpedrol Jan 12, 2023
3fb7325
modify genomes config file to use always igenomes server
mirpedrol Jan 12, 2023
6983f5f
add file to modify
mirpedrol Jan 12, 2023
6018ecb
remove debugging from refgenie
mirpedrol Jan 12, 2023
d333637
manualyl modify genomes.config to make tests pass
mirpedrol Jan 12, 2023
9045e86
add output file with test passing
mirpedrol Jan 12, 2023
1a9d9b5
make test fail
mirpedrol Jan 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "nfcore",
"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"]
}
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.config linguist-language=nextflow
*.nf.test linguist-language=nextflow
modules/nf-core/** linguist-generated
subworkflows/nf-core/** linguist-generated
16 changes: 16 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,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/nf-core/testpipeline/codespaces)
- Tools installed
- nf-core
- Nextflow

Devcontainer specs:

- [DevContainer config](.devcontainer/devcontainer.json)
- [Dockerfile](.devcontainer/Dockerfile)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ body:
attributes:
label: System information
description: |
* Nextflow version _(eg. 21.10.3)_
* Nextflow version _(eg. 22.10.1)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/testpipeline/results-${{ github.sha }}"
}
profiles: test_full,aws_tower
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: tower_action_*.log
4 changes: 4 additions & 0 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/testpipeline/results-test-${{ github.sha }}"
}
profiles: test,aws_tower
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: tower_action_*.log
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
env:
NXF_ANSI_LOG: false

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Run pipeline with test data
Expand All @@ -20,11 +24,11 @@ jobs:
strategy:
matrix:
NXF_VER:
- "21.10.3"
- "22.10.1"
- "latest-everything"
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: nf-core download
on:
push:
pull_request:
release:
types: [published]

env:
NXF_ANSI_LOG: false

jobs:
download:
runs-on: ubuntu-latest
steps:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@v3
with:
python-version: "3.7"
architecture: "x64"
- uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nf-core

- name: Download the pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
run: nf-core download sarek -r dev -c singularity --singularity-cache-copy -x none --force -o test

- name: Run the downloaded pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
run: nextflow run test/workflow -profile test,singularity --outdir ./results

6 changes: 3 additions & 3 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
Expand All @@ -34,9 +34,9 @@ jobs:
id: prettier_status
run: |
if prettier --check ${GITHUB_WORKSPACE}; then
echo "::set-output name=result::pass"
echo "result=pass" >> $GITHUB_OUTPUT
else
echo "::set-output name=result::fail"
echo "result=fail" >> $GITHUB_OUTPUT
fi

- name: Run 'prettier --write'
Expand Down
80 changes: 72 additions & 8 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: nf-core linting
# that the code meets the nf-core guidelines.
on:
push:
branches:
- dev
pull_request:
release:
types: [published]
Expand All @@ -12,9 +14,9 @@ jobs:
EditorConfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -25,9 +27,9 @@ jobs:
Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand All @@ -38,7 +40,7 @@ jobs:
PythonBlack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check code lints with Black
uses: psf/black@stable
Expand Down Expand Up @@ -69,12 +71,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
architecture: "x64"
Expand All @@ -97,10 +99,72 @@ jobs:

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: linting-logs
path: |
lint_log.txt
lint_results.md
PR_number.txt

refgenie:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.8"
architecture: "x64"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install refgenie
python -m pip install --upgrade --force-reinstall git+https://github.com/refgenie/refgenconf.git@dev

- name: Init refgenie
run: |
refgenie init -c ${GITHUB_WORKSPACE}/../../genome_config.yaml
sed -i s/refgenomes.databio.org/igenomes.databio.org/ ${GITHUB_WORKSPACE}/../../genome_config.yaml

- name: Populate genomes.config file
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
REFGENIE: /home/runner/work/genome_config.yaml
run: refgenie populater --file ${GITHUB_WORKSPACE}/conf/genomes.config.tpl > ${GITHUB_WORKSPACE}/conf/genomes.config

- name: Verify genomes.config file not changed
uses: tj-actions/verify-changed-files@v13
id: verify-file-not-changed
with:
files: ${GITHUB_WORKSPACE}/conf/genomes.config

- name: Post PR comment if genomes.config changed
if: steps.verify-file-not-changed.outputs.files_changed == 'true'
uses: mshick/add-pr-comment@v1
with:
message: |
## genomes.conf file was manually modified

The file containing URLs to reference genomes must be managed by Refgenie
To fix this CI test, please run:

* Install [`refgenie`](https://refgenie.databio.org/en/latest/): `pip install refgenie`
* Populate genome URLs: `refgenie populater --file <PIPELINE_DIR>/conf/genomes.config.tpl > <PIPELINE_DIR>/conf/genomes.config`

Once you push these changes the test should pass, and you can hide this comment :+1:

Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false

- name: Fail if genomes.config changed
if: steps.verify-file-not-changed.outputs.files_changed == 'true'
uses: actions/github-script@v3
with:
script: |
core.setFailed('File genomes.config changed manually')
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Get PR number
id: pr_number
run: echo "::set-output name=pr_number::$(cat linting-logs/PR_number.txt)"
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
email_template.html
adaptivecard.json
slackreport.json
.nextflow*
work/
data/
Expand All @@ -7,3 +9,4 @@ results/
testing/
testing*
*.pyc
bin/
56 changes: 0 additions & 56 deletions CITATION.cff

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/testpipeline/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)

[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A521.10.3-23aa62.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A522.10.1-23aa62.svg)](https://www.nextflow.io/)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
Expand Down Expand Up @@ -31,7 +31,7 @@ On release, automated continuous integration tests run the pipeline on a full-si

## Quick Start

1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=21.10.3`)
1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=22.10.1`)

2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) (you can follow [this tutorial](https://singularity-tutorial.github.io/01-installation/)), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(you can use [`Conda`](https://conda.io/miniconda.html) both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_.

Expand Down
Loading