Skip to content

Commit 1379edf

Browse files
authored
Merge pull request #2 from nf-core/dev
Get latest dev version
2 parents 5201205 + 0d5a5e6 commit 1379edf

26 files changed

+875
-246
lines changed

.github/RELEASE_CHECKLIST.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Before release
2+
3+
1. Check issue milestones to see outstanding issues to resolve if possible or transfer to the milestones for the next release e.g. [`v1.9`](https://github.com/nf-core/tools/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.9)
4+
2. Create a PR to `dev` to bump the version in `CHANGELOG.md` and `setup.py`.
5+
3. Make sure all CI tests are passing!
6+
4. Create a PR from `dev` to `master`
7+
5. Make sure all CI tests are passing again (additional tests are run on PRs to `master`)
8+
6. Request review (2 approvals required)
9+
7. Most importantly, pick an undeniably outstanding [name](http://www.codenamegenerator.com/) for the release where *Prefix* = *Metal* and *Dictionary* = *Animal*.
10+
8. Merge the PR into `master`
11+
9. Once CI tests on commit have passed, create a new release copying the `CHANGELOG` for that release into the description section.
12+
13+
## After release
14+
15+
1. Check the automated template synchronisation has been triggered properly. This should automatically open PRs directly to individual pipeline repos with the appropriate changes to update the pipeline template.
16+
2. Check that the automatic `PyPi` deployment has worked: [pypi.org/project/nf-core](https://pypi.org/project/nf-core/)
17+
3. Check `BioConda` has an automated PR to bump the version, and merge. eg. [bioconda/bioconda-recipes #20065](https://github.com/bioconda/bioconda-recipes/pull/20065)
18+
4. Create a tools PR to `dev` to bump back to the next development version in `CHANGELOG.md` and `setup.py`

.github/workflows/branch.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: nf-core branch protection
2+
# This workflow is triggered on PRs to master branch on the repository
3+
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
4+
on:
5+
pull_request:
6+
branches: [master]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
14+
- name: Check PRs
15+
if: github.repository == 'nf-core/tools'
16+
run: |
17+
{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/tools ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
18+
19+
# If the above check failed, post a comment on the PR explaining the failure
20+
- name: Post PR comment
21+
if: failure()
22+
uses: mshick/add-pr-comment@v1
23+
with:
24+
message: |
25+
Hi @${{ github.event.pull_request.user.login }},
26+
27+
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
28+
The `master` branch on nf-core repositories should always contain code from the latest release.
29+
Beacuse of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
30+
31+
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
32+
33+
Thanks again for your contribution!
34+
repo-token: ${{ secrets.GITHUB_TOKEN }}
35+
allow-repeats: false

.github/workflows/code-tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Python tests
22
# This workflow is triggered on pushes and PRs to the repository.
33
on: [push, pull_request]
44

5-
65
jobs:
76
PythonLint:
87

@@ -14,29 +13,35 @@ jobs:
1413
steps:
1514
- uses: actions/checkout@v2
1615
name: Check out source-code repository
16+
1717
- name: Set up Python ${{ matrix.python-version }}
1818
uses: actions/setup-python@v1
1919
with:
2020
python-version: ${{ matrix.python-version }}
21+
2122
- name: Install python dependencies
2223
run: |
2324
python -m pip install --upgrade pip pytest pytest-datafiles pytest-cov mock jsonschema
2425
pip install .
26+
2527
- name: Install Nextflow
2628
run: |
2729
mkdir /tmp/nextflow
2830
cd /tmp/nextflow
2931
wget -qO- get.nextflow.io | bash
3032
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
33+
3134
- name: Lint with flake8
3235
run: |
3336
pip install flake8
3437
# stop the build if there are Python syntax errors or undefined names
3538
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3639
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3740
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+
3842
- name: Test with pytest
3943
run: python3 -m pytest --color=yes --cov-report=xml --cov-config=.github/.coveragerc --cov=nf_core
44+
4045
- uses: codecov/codecov-action@v1
4146
name: Upload code coverage report
4247
with:

.github/workflows/create-lint-wf.yml

+5
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9+
name: Check out source-code repository
10+
911
- name: Set up Python 3.7
1012
uses: actions/setup-python@v1
1113
with:
1214
python-version: 3.7
15+
1316
- name: Install python dependencies
1417
run: |
1518
python -m pip install --upgrade pip
1619
pip install .
20+
1721
- name: Install Nextflow
1822
run: |
1923
mkdir /tmp/nextflow
2024
cd /tmp/nextflow
2125
wget -qO- get.nextflow.io | bash
2226
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
27+
2328
- name: Run nf-core tools
2429
run: |
2530
nf-core create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"

.github/workflows/deploy-pypi.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Publish nf-core to PyPI
2-
on: push
2+
on:
3+
release:
4+
types: [published]
35

46
jobs:
57
build-n-publish:
6-
name: Build and publish nf-core to PyPI
7-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
89

910
steps:
1011
- uses: actions/checkout@v2
@@ -24,7 +25,7 @@ jobs:
2425
run: python setup.py sdist bdist_wheel
2526

2627
- name: Publish dist to PyPI
27-
if: github.repository == 'nf-core/tools' && startsWith(github.event.ref, 'refs/tags')
28+
if: github.repository == 'nf-core/tools'
2829
uses: pypa/gh-action-pypi-publish@master
2930
with:
3031
password: ${{ secrets.pypi_password }}

.github/workflows/markdown-lint.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9+
910
- uses: actions/setup-node@v1
1011
with:
1112
node-version: '10'
13+
1214
- name: Install markdownlint
1315
run: npm install -g markdownlint-cli
16+
1417
- name: Run Markdownlint
1518
run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml

.github/workflows/sync.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Sync template
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
sync-all:
8+
name: Sync all pipelines
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
name: Check out source-code repository
14+
15+
- name: Set up Python 3.7
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.7
19+
20+
- name: Install python dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install .
24+
25+
- name: Install Nextflow
26+
run: |
27+
mkdir /tmp/nextflow
28+
cd /tmp/nextflow
29+
wget -qO- get.nextflow.io | bash
30+
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
31+
32+
- name: Configure git
33+
run: |
34+
git config user.email "[email protected]"
35+
git config user.name "nf-core-bot"
36+
37+
- name: Run synchronisation
38+
if: github.repository == 'nf-core/tools'
39+
env:
40+
AUTH_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
41+
run: nf-core sync --all --username nf-core-bot --auth-token $AUTH_TOKEN

.github/workflows/tools-api-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
3838
$GITHUB_REF - $GITHUB_SHA
3939
"
40-
git remote add nf-core "https://${NF_CORE_BOT}@github.com/nf-core/tools.git" > /dev/null 2>&1
41-
git push --force --quiet --set-upstream nf-core api-doc
40+
git remote add nf-core https://github.com/nf-core/tools.git
41+
git push --force --set-upstream nf-core api-doc

.travis.yml

-59
This file was deleted.

CHANGELOG.md

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
# nf-core/tools: Changelog
22

3-
## v1.9dev
3+
## v1.10dev
4+
5+
### Linting
6+
7+
* Refactored PR branch tests to be a little clearer.
8+
* Linting error docs explain how to add an additional branch protecton rule to the `branch.yml` GitHub Actions workflow.
9+
* Adapted linting docs to the new PR branch tests.
10+
* Added test for template `{{ cookiecutter.var }}` placeholders
11+
12+
### Other
13+
14+
* Added CI test to check for PRs against `master` in tools repo
15+
* CI PR branch tests fixed & now automatically add a comment on the PR if failing, explaining what is wrong
16+
17+
## v1.9
418

519
### Continuous integration
620

7-
* Travis CI tests are now deprecated within the pipeline template. Please switch to GitHub Actions.
21+
* Travis CI tests are now deprecated in favor of GitHub Actions within the pipeline template.
822
* `nf-core bump-version` support has been removed for `.travis.yml`
923
* `nf-core lint` now fails if a `.travis.yml` file is found
10-
* Ported nf-core/tools Travis CI automation to GitHub Actions
24+
* Ported nf-core/tools Travis CI automation to GitHub Actions.
1125
* Fixed the build for the nf-core/tools API documentation on the website
1226

1327
### Template
@@ -16,28 +30,31 @@
1630
* Removed the requirement for R in the conda environment
1731
* Make `params.multiqc_config` give an _additional_ MultiQC config file instead of replacing the one that ships with the pipeline
1832
* Ignore only `tests/` and `testing/` directories in `.gitignore` to avoid ignoring `test.config` configuration file
33+
* Rephrase docs to promote usage of containers over Conda to ensure reproducibility
34+
* Stage the workflow summary YAML file within MultiQC work directory
1935

2036
### Linting
2137

2238
* Removed linting for CircleCI
39+
* Allow any one of `params.reads` or `params.input` or `params.design` before warning
2340
* Added whitespace padding to lint error URLs
2441
* Improved documentation for lint errors
2542
* Allow either `>=` or `!>=` in nextflow version checks (the latter exits with an error instead of just warning) [#506](https://github.com/nf-core/tools/issues/506)
2643
* Check that `manifest.version` ends in `dev` and throw a warning if not
2744
* If running with `--release` check the opposite and fail if not
2845
* Tidied up error messages and syntax for linting GitHub actions branch tests
2946
* Add YAML validator
47+
* Don't print test results if we have a critical error
3048

3149
### Other
3250

51+
* Fix automatic synchronisation of the template after releases of nf-core/tools
3352
* Improve documentation for installing `nf-core/tools`
34-
* Use `stderr` instead of `stdout` for header artwork
3553
* Replace preprint by the new nf-core publication in Nature Biotechnology :champagne:
54+
* Use `stderr` instead of `stdout` for header artwork
3655
* Tolerate unexpected output from `nextflow config` command
37-
38-
### Template pipeline
39-
40-
* Stage the workflow summary YAML file within MultiQC work directory
56+
* Add social preview image
57+
* Added a [release checklist](.github/RELEASE_CHECKLIST.md) for the tools repo
4158

4259
## v1.8
4360

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# ![nf-core/tools](docs/images/nfcore-tools_logo.png) <!-- omit in toc -->
22

3-
[![GitHub Actions CI Status](https://github.com/nf-core/tools/workflows/CI%20tests/badge.svg)](https://github.com/nf-core/tools/actions)
3+
[![Python tests](https://github.com/nf-core/tools/workflows/Python%20tests/badge.svg?branch=master&event=push)](https://github.com/nf-core/tools/actions?query=workflow%3A%22Python+tests%22+branch%3Amaster)
44
[![codecov](https://codecov.io/gh/nf-core/tools/branch/master/graph/badge.svg)](https://codecov.io/gh/nf-core/tools)
5-
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/nf-core/README.html)
5+
[![install with Bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](http://bioconda.github.io/recipes/nf-core/README.html)
6+
[![install with PyPI](https://img.shields.io/badge/install%20with-PyPI-blue.svg)](https://pypi.org/project/nf-core/)
67

78
A python package with helper tools for the nf-core community.
89

10+
> **Read this documentation on the nf-core website: [https://nf-co.re/tools](https://nf-co.re/tools)**
11+
912
## Table of contents <!-- omit in toc -->
1013

1114
* [`nf-core` tools installation](#installation)
@@ -243,7 +246,7 @@ INFO: Downloading centralised configs from GitHub
243246

244247
INFO: Downloading 1 singularity container
245248

246-
INFO: Building singularity image from dockerhub: docker://nfcore/methylseq:1.4
249+
INFO: Building singularity image from Docker Hub: docker://nfcore/methylseq:1.4
247250
INFO: Converting OCI blobs to SIF format
248251
INFO: Starting build...
249252
Getting image source signatures
@@ -534,8 +537,7 @@ with `--username` and `--repository`.
534537

535538
To create the pull request, a personal access token is required for API authentication.
536539
These can be created at [https://github.com/settings/tokens](https://github.com/settings/tokens).
537-
Supply this using the `--auth-token` flag, or setting it as the environment variable `NF_CORE_BOT`:
538-
`export NF_CORE_BOT=my_auth_token`.
540+
Supply this using the `--auth-token` flag.
539541

540542
Finally, if `--all` is supplied, then the command attempts to pull and synchronise all nf-core workflows.
541543
This is used by the nf-core/tools release automation to synchronise all nf-core pipelines
@@ -567,5 +569,5 @@ If you use `nf-core tools` in your work, please cite the `nf-core` publication a
567569
>
568570
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
569571
>
570-
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
572+
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
571573
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)
45.2 KB
Loading

0 commit comments

Comments
 (0)