Skip to content

Commit 64f7f63

Browse files
authored
Merge pull request #179 from qbic-pipelines/dev
Release 2.1
2 parents c75cf36 + c5639a6 commit 64f7f63

File tree

79 files changed

+41104
-2355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+41104
-2355
lines changed

.devcontainer/devcontainer.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "nfcore",
3+
"image": "nfcore/gitpod:latest",
4+
"remoteUser": "gitpod",
5+
6+
// Configure tool-specific properties.
7+
"customizations": {
8+
// Configure properties specific to VS Code.
9+
"vscode": {
10+
// Set *default* container specific settings.json values on container create.
11+
"settings": {
12+
"python.defaultInterpreterPath": "/opt/conda/bin/python",
13+
"python.linting.enabled": true,
14+
"python.linting.pylintEnabled": true,
15+
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
16+
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
17+
"python.linting.flake8Path": "/opt/conda/bin/flake8",
18+
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
19+
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
20+
"python.linting.pylintPath": "/opt/conda/bin/pylint"
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
25+
}
26+
}
27+
}

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trim_trailing_whitespace = true
88
indent_size = 4
99
indent_style = space
1010

11-
[*.{md,yml,yaml,html,css,scss,js}]
11+
[*.{md,yml,yaml,html,css,scss,js,cff}]
1212
indent_size = 2
1313

1414
# These files are edited and tested upstream in nf-core/modules

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.config linguist-language=nextflow
2+
*.nf.test linguist-language=nextflow
23
modules/nf-core/** linguist-generated
34
subworkflows/nf-core/** linguist-generated

.github/CONTRIBUTING.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ These tests are run both with the latest available version of `Nextflow` and als
5252

5353
## Getting help
5454

55-
//TODO: Delete this completely? There is no slack to join!
56-
57-
For further information/help, please consult the [nf-core/rnadeseq documentation](https://nf-co.re/rnadeseq/usage) and don't hesitate to get in touch on the nf-core Slack [#rnadeseq](https://nfcore.slack.com/channels/rnadeseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
55+
For further information/help, please consult the [qbic-pipelines/rnadeseq documentation](https://github.com/qbic-pipelines/rnadeseq/blob/master/docs/usage.md).
5856

5957
## Pipeline contribution conventions
6058

.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body:
4040
attributes:
4141
label: System information
4242
description: |
43-
* Nextflow version _(eg. 21.10.3)_
43+
* Nextflow version _(eg. 22.10.1)_
4444
* Hardware _(eg. HPC, Desktop, Cloud)_
4545
* Executor _(eg. slurm, local, awsbatch)_
4646
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_

.github/ISSUE_TEMPLATE/config.yml

-9
This file was deleted.

.github/workflows/ci.yml

+52-30
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ jobs:
2121
strategy:
2222
matrix:
2323
# Nextflow versions
24-
include:
25-
# Test pipeline minimum Nextflow version
26-
- NXF_VER: "21.10.3"
27-
NXF_EDGE: ""
28-
# Test latest edge release of Nextflow
29-
- NXF_VER: ""
30-
NXF_EDGE: "1"
24+
NXF_VER:
25+
- "22.10.1"
26+
- "latest-everything"
3127
steps:
3228
- name: Check out pipeline code
3329
uses: actions/checkout@v2
@@ -40,23 +36,18 @@ jobs:
4036
environment.yml
4137
- name: Build new docker image
4238
if: env.MATCHED_FILES
43-
run: docker build --no-cache . -t qbicpipelines/rnadeseq:2.0.1
39+
run: docker build --no-cache . -t qbicpipelines/rnadeseq:2.1
4440

4541
- name: Pull docker image
4642
if: ${{ !env.MATCHED_FILES }}
4743
run: |
4844
docker pull qbicpipelines/rnadeseq:dev
49-
docker tag qbicpipelines/rnadeseq:dev qbicpipelines/rnadeseq:2.0.1
45+
docker tag qbicpipelines/rnadeseq:dev qbicpipelines/rnadeseq:2.1
5046
5147
- name: Install Nextflow
52-
env:
53-
NXF_VER: ${{ matrix.NXF_VER }}
54-
# Uncomment only if the edge release is more recent than the latest stable release
55-
# See https://github.com/nextflow-io/nextflow/issues/2467
56-
# NXF_EDGE: ${{ matrix.NXF_EDGE }}
57-
run: |
58-
wget -qO- get.nextflow.io | bash
59-
sudo mv nextflow /usr/local/bin/
48+
uses: nf-core/setup-nextflow@v1
49+
with:
50+
version: "${{ matrix.NXF_VER }}"
6051

6152
- name: Run pipeline with test data
6253
run: nextflow run ${GITHUB_WORKSPACE} -profile test,docker
@@ -65,20 +56,25 @@ jobs:
6556
name: Test workflow parameters
6657
runs-on: ubuntu-latest
6758
env:
68-
NXF_VER: "21.10.3"
59+
NXF_VER: "22.10.1"
6960
NXF_ANSI_LOG: false
7061
strategy:
62+
# This tells github to continue running other profile tests if some tests fail (default cancels all tests upon failure)
63+
fail-fast: false
7164
matrix:
7265
config:
7366
[
67+
"test",
68+
"test_full",
7469
"test_contrast_matrix",
7570
"test_contrast_list",
71+
"test_no_multiqc",
7672
"test_relevel",
77-
"test_skip_pathway_analysis",
7873
"test_star_rsem",
7974
"test_star_salmon",
8075
"test_use_vst",
8176
"test_batcheffect",
77+
"test_custom_gmt",
8278
]
8379
steps:
8480
- name: Check out pipeline code
@@ -92,23 +88,49 @@ jobs:
9288
environment.yml
9389
- name: Build new docker image
9490
if: env.MATCHED_FILES
95-
run: docker build --no-cache . -t qbicpipelines/rnadeseq:2.0.1
91+
run: docker build --no-cache . -t qbicpipelines/rnadeseq:2.1
9692

9793
- name: Pull docker image
9894
if: ${{ !env.MATCHED_FILES }}
9995
run: |
10096
docker pull qbicpipelines/rnadeseq:dev
101-
docker tag qbicpipelines/rnadeseq:dev qbicpipelines/rnadeseq:2.0.1
97+
docker tag qbicpipelines/rnadeseq:dev qbicpipelines/rnadeseq:2.1
10298
10399
- name: Install Nextflow
104-
env:
105-
NXF_VER: ${{ matrix.NXF_VER }}
106-
# Uncomment only if the edge release is more recent than the latest stable release
107-
# See https://github.com/nextflow-io/nextflow/issues/2467
108-
# NXF_EDGE: ${{ matrix.NXF_EDGE }}
100+
uses: nf-core/setup-nextflow@v1
101+
with:
102+
version: "${{ matrix.NXF_VER }}"
103+
104+
- name: Set up Python
105+
uses: actions/setup-python@v2
106+
with:
107+
python-version: "3.x"
108+
109+
- name: Install dependencies
110+
run: python -m pip install --upgrade pip pytest-workflow
111+
112+
- name: Run pipeline with tests settings
113+
uses: Wandalen/[email protected]
114+
with:
115+
command: pytest --tag ${{ matrix.config }} --kwdof --git-aware --color=yes
116+
attempt_limit: 3
117+
118+
- name: Output log on failure
119+
if: failure()
109120
run: |
110-
wget -qO- get.nextflow.io | bash
111-
sudo mv nextflow /usr/local/bin/
121+
sudo apt install bat > /dev/null
122+
batcat --decorations=always --color=always /tmp/pytest_workflow_*/*/log.{out,err}
112123
113-
- name: Run pipeline with test data
114-
run: nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.config }},docker
124+
- name: Upload logs on failure
125+
if: failure()
126+
uses: actions/upload-artifact@v2
127+
with:
128+
name: logs-${{ matrix.profile }}
129+
path: |
130+
/tmp/pytest_workflow_*/*/.nextflow.log
131+
/tmp/pytest_workflow_*/*/log.out
132+
/tmp/pytest_workflow_*/*/log.err
133+
/tmp/pytest_workflow_*/*/work
134+
!/tmp/pytest_workflow_*/*/work/conda
135+
!/tmp/pytest_workflow_*/*/work/singularity
136+
/tmp/pytest_workflow_*/**/.command.log

.github/workflows/fix-linting.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Fix linting from a comment
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
jobs:
7+
deploy:
8+
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
9+
if: >
10+
contains(github.event.comment.html_url, '/pull/') &&
11+
contains(github.event.comment.body, '@nf-core-bot fix linting') &&
12+
github.repository == 'nf-core/rnadeseq'
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Use the @nf-core-bot token to check out so we can push later
16+
- uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.nf_core_bot_auth_token }}
19+
20+
# Action runs on the issue comment, so we don't get the PR by default
21+
# Use the gh cli to check out the PR
22+
- name: Checkout Pull Request
23+
run: gh pr checkout ${{ github.event.issue.number }}
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
26+
27+
- uses: actions/setup-node@v3
28+
29+
- name: Install Prettier
30+
run: npm install -g prettier @prettier/plugin-php
31+
32+
# Check that we actually need to fix something
33+
- name: Run 'prettier --check'
34+
id: prettier_status
35+
run: |
36+
if prettier --check ${GITHUB_WORKSPACE}; then
37+
echo "name=result::pass" >> $GITHUB_OUTPUT
38+
else
39+
echo "name=result::fail" >> $GITHUB_OUTPUT
40+
fi
41+
42+
- name: Run 'prettier --write'
43+
if: steps.prettier_status.outputs.result == 'fail'
44+
run: prettier --write ${GITHUB_WORKSPACE}
45+
46+
- name: Commit & push changes
47+
if: steps.prettier_status.outputs.result == 'fail'
48+
run: |
49+
git config user.email "[email protected]"
50+
git config user.name "nf-core-bot"
51+
git config push.default upstream
52+
git add .
53+
git status
54+
git commit -m "[automated] Fix linting with Prettier"
55+
git push

.github/workflows/linting.yml

+42-13
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: nf-core linting
44
# that the code meets the nf-core guidelines.
55
on:
66
push:
7+
branches:
8+
- dev
79
pull_request:
810
release:
911
types: [published]
@@ -12,9 +14,9 @@ jobs:
1214
EditorConfig:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1618

17-
- uses: actions/setup-node@v2
19+
- uses: actions/setup-node@v3
1820

1921
- name: Install editorconfig-checker
2022
run: npm install -g editorconfig-checker
@@ -25,33 +27,60 @@ jobs:
2527
Prettier:
2628
runs-on: ubuntu-latest
2729
steps:
28-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
2931

30-
- uses: actions/setup-node@v2
32+
- uses: actions/setup-node@v3
3133

3234
- name: Install Prettier
3335
run: npm install -g prettier
3436

3537
- name: Run Prettier --check
3638
run: prettier --check ${GITHUB_WORKSPACE}
3739

40+
PythonBlack:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v3
44+
45+
- name: Check code lints with Black
46+
uses: psf/black@stable
47+
48+
# If the above check failed, post a comment on the PR explaining the failure
49+
- name: Post PR comment
50+
if: failure()
51+
uses: mshick/add-pr-comment@v1
52+
with:
53+
message: |
54+
## Python linting (`black`) is failing
55+
56+
To keep the code consistent with lots of contributors, we run automated code consistency checks.
57+
To fix this CI test, please run:
58+
59+
* Install [`black`](https://black.readthedocs.io/en/stable/): `pip install black`
60+
* Fix formatting errors in your pipeline: `black .`
61+
62+
Once you push these changes the test should pass, and you can hide this comment :+1:
63+
64+
We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
65+
66+
Thanks again for your contribution!
67+
repo-token: ${{ secrets.GITHUB_TOKEN }}
68+
allow-repeats: false
69+
3870
nf-core:
3971
runs-on: ubuntu-latest
4072
steps:
4173
- name: Check out pipeline code
42-
uses: actions/checkout@v2
74+
uses: actions/checkout@v3
4375

4476
- name: Install Nextflow
45-
env:
46-
CAPSULE_LOG: none
47-
run: |
48-
wget -qO- get.nextflow.io | bash
49-
sudo mv nextflow /usr/local/bin/
77+
uses: nf-core/setup-nextflow@v1
5078

51-
- uses: actions/setup-python@v1
79+
- uses: actions/setup-python@v4
5280
with:
53-
python-version: "3.6"
81+
python-version: "3.7"
5482
architecture: "x64"
83+
5584
- name: Install dependencies
5685
run: |
5786
python -m pip install --upgrade pip
@@ -70,7 +99,7 @@ jobs:
7099

71100
- name: Upload linting log file artifact
72101
if: ${{ always() }}
73-
uses: actions/upload-artifact@v2
102+
uses: actions/upload-artifact@v3
74103
with:
75104
name: linting-logs
76105
path: |

.github/workflows/linting_comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

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

2323
- name: Post PR comment
2424
uses: marocchino/sticky-pull-request-comment@v2

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ work/
33
data/
44
results/
55
.DS_Store
6-
tests/test_data
7-
*.pyc
8-
.Rhistory
9-
.RData
106
testing/
117
testing*
128
*.pyc

0 commit comments

Comments
 (0)