Skip to content

Commit 9b3eec9

Browse files
authored
Merge pull request #746 from nf-core/dev
Minor release 1.11
2 parents f14c7a5 + a33ba83 commit 9b3eec9

File tree

33 files changed

+237
-146
lines changed

33 files changed

+237
-146
lines changed

.github/workflows/branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
message: |
2525
Hi @${{ github.event.pull_request.user.login }},
2626
27-
It looks like this pull-request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch. The `master` branch on nf-core repositories should always contain code from the latest release. Beacuse of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
27+
It looks like this pull-request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch. The `master` branch on nf-core repositories should always contain code from the latest release. Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
2828
2929
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.
3030

.github/workflows/sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Sync template
22
on:
33
release:
44
types: [published]
5+
workflow_dispatch:
56

67
jobs:
78
get-pipelines:
@@ -21,7 +22,6 @@ jobs:
2122
matrix: ${{fromJson(needs.get-pipelines.outputs.matrix)}}
2223
fail-fast: false
2324
steps:
24-
2525
- uses: actions/checkout@v2
2626
name: Check out nf-core/tools
2727

@@ -32,6 +32,7 @@ jobs:
3232
ref: dev
3333
token: ${{ secrets.nf_core_bot_auth_token }}
3434
path: nf-core/${{ matrix.pipeline }}
35+
fetch-depth: "0"
3536

3637
- name: Set up Python 3.8
3738
uses: actions/setup-python@v1
@@ -63,7 +64,6 @@ jobs:
6364
--username nf-core-bot \
6465
--repository nf-core/${{ matrix.pipeline }}
6566
66-
6767
- name: Upload sync log file artifact
6868
if: ${{ always() }}
6969
uses: actions/upload-artifact@v2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ ENV/
109109
# backup files
110110
*~
111111
*\?
112+
113+
# Jetbrains IDEs
114+
.idea

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# nf-core/tools: Changelog
22

3+
## [v1.11 - Iron Tiger](https://github.com/nf-core/tools/releases/tag/1.11) - [2020-10-27]
4+
5+
### Template
6+
7+
* Fix command error in `awstest.yml` GitHub Action workflow.
8+
* Allow manual triggering of AWS test GitHub Action workflows.
9+
* Remove TODO item, which was proposing the usage of additional files beside `usage.md` and `output.md` for documentation.
10+
* Added a Podman profile, which enables Podman as container.
11+
* Updated linting for GitHub actions AWS tests workflows.
12+
13+
### Linting
14+
15+
* Made a base-level `Dockerfile` a warning instead of failure
16+
* Added a lint failure if the old `bin/markdown_to_html.r` script is found
17+
* Update `rich` package dependency and use new markup escaping to change `[[!]]` back to `[!]` again
18+
19+
### Other
20+
21+
* Pipeline sync - fetch full repo when checking out before sync
22+
* Sync - Add GitHub actions manual trigger option
23+
324
## [v1.10.2 - Copper Camel _(brought back from the dead)_](https://github.com/nf-core/tools/releases/tag/1.10.2) - [2020-07-31]
425

526
Second patch release to address some small errors discovered in the pipeline template.

docs/lint_errors.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The lint test looks for the following required files:
1010

1111
* `nextflow.config`
1212
* The main nextflow config file
13-
* `Dockerfile`
14-
* A docker build script to generate a docker image with the required software
13+
* `nextflow_schema.json`
14+
* A JSON schema describing pipeline parameters, generated using `nf-core schema build`
1515
* Continuous integration tests with [GitHub Actions](https://github.com/features/actions)
1616
* GitHub Actions workflows for CI of your pipeline (`.github/workflows/ci.yml`), branch protection (`.github/workflows/branch.yml`) and nf-core best practice linting (`.github/workflows/linting.yml`)
1717
* `LICENSE`, `LICENSE.md`, `LICENCE.md` or `LICENCE.md`
@@ -27,8 +27,14 @@ The following files are suggested but not a hard requirement. If they are missin
2727

2828
* `main.nf`
2929
* It's recommended that the main workflow script is called `main.nf`
30+
* `environment.yml`
31+
* A conda environment file describing the required software
32+
* `Dockerfile`
33+
* A docker build script to generate a docker image with the required software
3034
* `conf/base.config`
3135
* A `conf` directory with at least one config called `base.config`
36+
* `.github/workflows/awstest.yml` and `.github/workflows/awsfulltest.yml`
37+
* GitHub workflow scripts used for automated tests on AWS
3238

3339
The following files will cause a failure if the _are_ present (to fix, delete them):
3440

@@ -39,13 +45,18 @@ The following files will cause a failure if the _are_ present (to fix, delete th
3945
* `parameters.settings.json`
4046
* The syntax for pipeline schema has changed - old `parameters.settings.json` should be
4147
deleted and new `nextflow_schema.json` files created instead.
48+
* `bin/markdown_to_html.r`
49+
* The old markdown to HTML conversion script, now replaced by `markdown_to_html.py`
4250

4351
## Error #2 - Docker file check failed ## {#2}
4452

45-
Pipelines should have a files called `Dockerfile` in their root directory.
53+
DSL1 pipelines should have a file called `Dockerfile` in their root directory.
4654
The file is used for automated docker image builds. This test checks that the file
4755
exists and contains at least the string `FROM` (`Dockerfile`).
4856

57+
Some pipelines, especially DSL2, may not have a `Dockerfile`. In this case a warning
58+
will be generated which can be safely ignored.
59+
4960
## Error #3 - Licence check failed ## {#3}
5061

5162
nf-core pipelines must ship with an open source [MIT licence](https://choosealicense.com/licenses/mit/).
@@ -216,22 +227,25 @@ This test will fail if the following requirements are not met in these files:
216227
{ [[ ${{github.event.pull_request.head.repo.full_name}} == <repo_name>/<pipeline_name> ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
217228
```
218229
219-
4. `awstest.yml`: Triggers tests on AWS batch. As running tests on AWS incurs costs, they should be only triggered on `push` to `master` and `release`.
220-
* Must be turned on for `push` to `master` and `release`.
221-
* Must not be turned on for `pull_request` or other events.
230+
4. `awstest.yml`: Triggers tests on AWS batch. As running tests on AWS incurs costs, they should be only triggered on `workflow_dispatch`.
231+
This allows for manual triggering of the workflow when testing on AWS is desired.
232+
You can trigger the tests by going to the `Actions` tab on the pipeline GitHub repository and selecting the `nf-core AWS test` workflow on the left.
233+
* Must not be turned on for `push` or `pull_request`.
234+
* Must be turned on for `workflow_dispatch`.
222235

223236
### GitHub Actions AWS full tests
224237

225238
Additionally, we provide the possibility of testing the pipeline on full size datasets on AWS.
226239
This should ensure that the pipeline runs as expected on AWS and provide a resource estimation.
227-
The GitHub Actions workflow is: `awsfulltest.yml`, and it can be found in the `.github/workflows/` directory.
228-
This workflow incurrs higher AWS costs, therefore it should only be triggered on `release`.
229-
For tests on full data prior to release, [https://tower.nf](Nextflow Tower's launch feature) can be employed.
240+
The GitHub Actions workflow is `awsfulltest.yml`, and it can be found in the `.github/workflows/` directory.
241+
This workflow incurrs higher AWS costs, therefore it should only be triggered on `release` and `workflow_dispatch`.
242+
You can trigger the tests by going to the `Actions` tab on the pipeline GitHub repository and selecting the `nf-core AWS full size tests` workflow on the left.
243+
For tests on full data prior to release, [Nextflow Tower](https://tower.nf) launch feature can be employed.
230244

231245
`awsfulltest.yml`: Triggers full sized tests run on AWS batch after releasing.
232246

233-
* Must be only turned on for `release`.
234-
* Should run the profile `test_full`. If it runs the profile `test` a warning is given.
247+
* Must be only turned on for `release` and `workflow_dispatch`.
248+
* Should run the profile `test_full` that should be edited to provide the links to full-size datasets. If it runs the profile `test` a warning is given.
235249

236250
## Error #6 - Repository `README.md` tests ## {#6}
237251

@@ -298,7 +312,7 @@ If a workflow has a conda `environment.yml` file (see above), the `Dockerfile` s
298312
to create the container. Such `Dockerfile`s can usually be very short, eg:
299313

300314
```Dockerfile
301-
FROM nfcore/base:1.7
315+
FROM nfcore/base:1.11
302316
MAINTAINER Rocky Balboa <[email protected]>
303317
LABEL authors="[email protected]" \
304318
description="Docker image containing all requirements for the nf-core mypipeline pipeline"

nf_core/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def run_nf_core():
3535

3636
# Print nf-core header to STDERR
3737
stderr = rich.console.Console(file=sys.stderr)
38-
stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42))
39-
stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\")
40-
stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {")
41-
stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,")
42-
stderr.print("[green] `._,._,'\n")
38+
stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False)
39+
stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False)
40+
stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False)
41+
stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False)
42+
stderr.print("[green] `._,._,'\n", highlight=False)
4343
stderr.print("[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False)
4444
try:
4545
is_outdated, current_vers, remote_vers = nf_core.utils.check_if_outdated()
@@ -503,7 +503,7 @@ def lint(schema_path):
503503
try:
504504
schema_obj.validate_schema_title_description()
505505
except AssertionError as e:
506-
log.warn(e)
506+
log.warning(e)
507507
except AssertionError as e:
508508
sys.exit(1)
509509

nf_core/create.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ def init_pipeline(self):
6767
)
6868

6969
def run_cookiecutter(self):
70-
"""Runs cookiecutter to create a new nf-core pipeline.
71-
"""
70+
"""Runs cookiecutter to create a new nf-core pipeline."""
7271
log.info("Creating new nf-core pipeline: {}".format(self.name))
7372

7473
# Check if the output directory exists
@@ -113,8 +112,7 @@ def run_cookiecutter(self):
113112
shutil.rmtree(self.tmpdir)
114113

115114
def make_pipeline_logo(self):
116-
"""Fetch a logo for the new pipeline from the nf-core website
117-
"""
115+
"""Fetch a logo for the new pipeline from the nf-core website"""
118116

119117
logo_url = "https://nf-co.re/logo/{}".format(self.short_name)
120118
log.debug("Fetching logo from {}".format(logo_url))
@@ -135,8 +133,7 @@ def make_pipeline_logo(self):
135133
fh.write(r.content)
136134

137135
def git_init_pipeline(self):
138-
"""Initialises the new pipeline as a Git repository and submits first commit.
139-
"""
136+
"""Initialises the new pipeline as a Git repository and submits first commit."""
140137
log.info("Initialising pipeline git repository")
141138
repo = git.Repo.init(self.outdir)
142139
repo.git.add(A=True)

nf_core/download.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ def fetch_workflow_details(self, wfs):
197197
raise LookupError("Not able to find pipeline '{}'".format(self.pipeline))
198198

199199
def download_wf_files(self):
200-
"""Downloads workflow files from GitHub to the :attr:`self.outdir`.
201-
"""
200+
"""Downloads workflow files from GitHub to the :attr:`self.outdir`."""
202201
log.debug("Downloading {}".format(self.wf_download_url))
203202

204203
# Download GitHub zip file into memory and extract
@@ -216,8 +215,7 @@ def download_wf_files(self):
216215
os.chmod(os.path.join(dirpath, fname), 0o775)
217216

218217
def download_configs(self):
219-
"""Downloads the centralised config profiles from nf-core/configs to :attr:`self.outdir`.
220-
"""
218+
"""Downloads the centralised config profiles from nf-core/configs to :attr:`self.outdir`."""
221219
configs_zip_url = "https://github.com/nf-core/configs/archive/master.zip"
222220
configs_local_dir = "configs-master"
223221
log.debug("Downloading {}".format(configs_zip_url))
@@ -236,8 +234,7 @@ def download_configs(self):
236234
os.chmod(os.path.join(dirpath, fname), 0o775)
237235

238236
def wf_use_local_configs(self):
239-
"""Edit the downloaded nextflow.config file to use the local config files
240-
"""
237+
"""Edit the downloaded nextflow.config file to use the local config files"""
241238
nfconfig_fn = os.path.join(self.outdir, "workflow", "nextflow.config")
242239
find_str = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
243240
repl_str = "../configs/"
@@ -294,8 +291,7 @@ def pull_singularity_image(self, container):
294291
raise e
295292

296293
def compress_download(self):
297-
"""Take the downloaded files and make a compressed .tar.gz archive.
298-
"""
294+
"""Take the downloaded files and make a compressed .tar.gz archive."""
299295
log.debug("Creating archive: {}".format(self.output_filename))
300296

301297
# .tar.gz and .tar.bz2 files

nf_core/licences.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def run_licences(self):
5050
return self.print_licences()
5151

5252
def get_environment_file(self):
53-
"""Get the conda environment file for the pipeline
54-
"""
53+
"""Get the conda environment file for the pipeline"""
5554
if os.path.exists(self.pipeline):
5655
env_filename = os.path.join(self.pipeline, "environment.yml")
5756
if not os.path.exists(self.pipeline):
@@ -68,8 +67,7 @@ def get_environment_file(self):
6867
self.conda_config = yaml.safe_load(response.text)
6968

7069
def fetch_conda_licences(self):
71-
"""Fetch package licences from Anaconda and PyPi.
72-
"""
70+
"""Fetch package licences from Anaconda and PyPi."""
7371

7472
lint_obj = nf_core.lint.PipelineLint(self.pipeline)
7573
lint_obj.conda_config = self.conda_config

0 commit comments

Comments
 (0)