Skip to content

Commit 397b886

Browse files
authored
Merge pull request #545 from nf-core/dev
Version 1.9 release
2 parents 9e33e7f + c461d55 commit 397b886

Some content is hidden

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

46 files changed

+1250
-657
lines changed

.github/.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = nf_core/pipeline-template/*

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The HTML will then be generated in `docs/api/_build/html`.
3838

3939

4040
## Tests
41-
When you create a pull request with changes, [Travis CI](https://travis-ci.com/) will run automatic tests.
41+
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
4242
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
4343

4444
There are two types of tests that run:
@@ -54,11 +54,11 @@ python -m pytest .
5454
```
5555

5656
### Lint Tests
57-
The nf-core has a [set of guidelines](http://nf-co.re/guidelines) which all pipelines must adhere to.
57+
nf-core has a [set of guidelines](http://nf-co.re/guidelines) which all pipelines must adhere to.
5858
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command.
5959

6060
The nf-core/tools repo itself contains the master template for creating new nf-core pipelines.
61-
Travis is set up to create a new pipeline from this template and then run the lint tests on it.
61+
Once you have created a new pipeline from this template GitHub Actions is automatically set up to run lint tests on it.
6262
This ensures that any changes we make to either the linting or the template stay in sync.
6363
You can replicate this process locally with the following commands:
6464

.github/RELEASE_CHECKLIST.md

Lines changed: 18 additions & 0 deletions
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/coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/code-tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Python tests
2+
# This workflow is triggered on pushes and PRs to the repository.
3+
on: [push, pull_request]
4+
5+
jobs:
6+
PythonLint:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.6, 3.7, 3.8]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
name: Check out source-code repository
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install python dependencies
23+
run: |
24+
python -m pip install --upgrade pip pytest pytest-datafiles pytest-cov mock jsonschema
25+
pip install .
26+
27+
- name: Install Nextflow
28+
run: |
29+
mkdir /tmp/nextflow
30+
cd /tmp/nextflow
31+
wget -qO- get.nextflow.io | bash
32+
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
33+
34+
- name: Lint with flake8
35+
run: |
36+
pip install flake8
37+
# stop the build if there are Python syntax errors or undefined names
38+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+
42+
- name: Test with pytest
43+
run: python3 -m pytest --color=yes --cov-report=xml --cov-config=.github/.coveragerc --cov=nf_core
44+
45+
- uses: codecov/codecov-action@v1
46+
name: Upload code coverage report
47+
with:
48+
if: success()
49+
token: ${{ secrets.CODECOV_TOKEN }}

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Create a pipeline and lint it
2+
on: [push, pull_request]
3+
4+
jobs:
5+
MakeTestWorkflow:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
name: Check out source-code repository
10+
11+
- name: Set up Python 3.7
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.7
15+
16+
- name: Install python dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install .
20+
21+
- name: Install Nextflow
22+
run: |
23+
mkdir /tmp/nextflow
24+
cd /tmp/nextflow
25+
wget -qO- get.nextflow.io | bash
26+
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
27+
28+
- name: Run nf-core tools
29+
run: |
30+
nf-core create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"
31+
nf-core lint nf-core-testpipeline

.github/workflows/deploy-pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish nf-core to PyPI
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build-n-publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
name: Check out source-code repository
13+
14+
- name: Set up Python 3.7
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.7
18+
19+
- name: Install python dependencies
20+
run: |
21+
python -m pip install --upgrade pip setuptools wheel
22+
pip install .
23+
24+
- name: Build the distribution
25+
run: python setup.py sdist bdist_wheel
26+
27+
- name: Publish dist to PyPI
28+
if: github.repository == 'nf-core/tools'
29+
uses: pypa/gh-action-pypi-publish@master
30+
with:
31+
password: ${{ secrets.pypi_password }}

.github/workflows/markdown-lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint Markdown
2+
on: [push, pull_request]
3+
4+
jobs:
5+
Markdown:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '10'
13+
14+
- name: Install markdownlint
15+
run: npm install -g markdownlint-cli
16+
17+
- name: Run Markdownlint
18+
run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml

.github/workflows/sync.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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: Run synchronisation
26+
if: github.repository == 'nf-core/tools'
27+
env:
28+
AUTH_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
29+
run: nf-core sync --all --username nf-core-bot --auth-token $AUTH_TOKEN

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: nf-core/tools API docs
2+
on:
3+
push:
4+
branches: [master, dev]
5+
6+
jobs:
7+
build-n-publish:
8+
name: Build and publish nf-core to PyPI
9+
runs-on: ubuntu-18.04
10+
11+
steps:
12+
- name: Check out source-code repository
13+
uses: actions/checkout@v2
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 Sphinx sphinxcontrib-napoleon
23+
pip install .
24+
25+
- name: Build HTML docs
26+
run: make --directory ./docs/api html
27+
28+
- name: Push docs to api-doc branch
29+
if: github.repository == 'nf-core/tools'
30+
run: |
31+
git checkout --orphan api-doc
32+
git rm -r --cache .
33+
git config user.email "[email protected]"
34+
git config user.name "nf-core-bot"
35+
git add docs
36+
git commit --message "nf-core/tools docs build
37+
38+
$GITHUB_REF - $GITHUB_SHA
39+
"
40+
git remote add nf-core https://github.com/nf-core/tools.git
41+
git push --force --set-upstream nf-core api-doc

0 commit comments

Comments
 (0)