Skip to content

Commit 54e233a

Browse files
authored
Merge pull request #228 from nf-core/dev
PR for Release 1.4
2 parents aa947db + 06507ce commit 54e233a

File tree

29 files changed

+223
-213
lines changed

29 files changed

+223
-213
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ python:
99
before_install:
1010
# PRs to master are only ok if coming from dev branch
1111
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $TRAVIS_BRANCH != "master" ] || ([ $TRAVIS_PULL_REQUEST_SLUG = $TRAVIS_REPO_SLUG ] && [ $TRAVIS_PULL_REQUEST_BRANCH = "dev" ])'
12+
# Check that the changelog has been updated if this is a PR
13+
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
14+
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $(git diff --name-only HEAD origin/${TRAVIS_BRANCH} | grep CHANGELOG.md | wc -l) -eq 1 ]'
1215
install:
1316
# Install Nextflow
1417
- mkdir /tmp/nextflow
@@ -41,5 +44,5 @@ deploy:
4144
python: '3.6'
4245

4346
# Sync pipelines with possible nf-core template changes
44-
after_deploy:
47+
after_deploy:
4548
- ./bin/sync

CHANGELOG.md

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

3+
## [v1.4](https://github.com/nf-core/tools/releases/tag/1.4) - 2018-12-12 Tantalum Butterfly
4+
5+
#### Template pipeline
6+
* Institutional custom config profiles moved to github `nf-core/configs`
7+
* These will now be maintained centrally as opposed to being shipped with the pipelines in `conf/`
8+
* Load `base.config` by default for all profiles
9+
* Removed profiles named `standard` and `none`
10+
* Added parameter `--igenomesIgnore` so `igenomes.config` is not loaded if parameter clashes are observed
11+
* Added parameter `--custom_config_version` for custom config version control. Can use this parameter to provide commit id for reproducibility. Defaults to `master`
12+
* Deleted custom configs from template in `conf/` directory i.e. `uzh.config`, `binac.config` and `cfc.config`
13+
* `multiqc_config` and `output_md` are now put into channels instead of using the files directly (see issue [#222](https://github.com/nf-core/tools/issues/222))
14+
* Added `local.md` to cookiecutter template in `docs/configuration/`. This was referenced in `README.md` but not present.
15+
* Major overhaul of docs to add/remove parameters, unify linking of files and added description for providing custom configs where necessary
16+
* Travis: Pull the `dev` tagged docker image for testing
17+
* Removed UPPMAX-specific documentation from the template.
18+
19+
#### Tools helper code
20+
* Make Travis CI tests fail on pull requests if the `CHANGELOG.md` file hasn't been updated
21+
* Minor bugfixing in Python code (eg. removing unused import statements)
22+
* Made the web requests caching work on multi-user installations
23+
* Handle exception if nextflow isn't installed
24+
* Linting: Update for Travis: Pull the `dev` tagged docker image for testing
25+
326
## [v1.3](https://github.com/nf-core/tools/releases/tag/1.3) - 2018-11-21
427
* `nf-core create` command line interface updated
528
* Interactive prompts for required arguments if not given

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# [nf-core/tools](https://github.com/nf-core/tools)
44
[![Build Status](https://travis-ci.org/nf-core/tools.svg?branch=master)](https://travis-ci.org/nf-core/tools)
55
[![codecov](https://codecov.io/gh/nf-core/tools/branch/master/graph/badge.svg)](https://codecov.io/gh/nf-core/tools)
6+
[![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)
67

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

@@ -298,8 +299,8 @@ INFO: Updating version in nextflow.config
298299
+ container = 'nfcore/mypipeline:1.0'
299300
300301
INFO: Updating version in .travis.yml
301-
- docker tag nfcore/mypipeline nfcore/mypipeline:latest
302-
+ docker tag nfcore/mypipeline nfcore/mypipeline:1.0
302+
- docker tag nfcore/mypipeline:dev nfcore/mypipeline:latest
303+
+ docker tag nfcore/mypipeline:dev nfcore/mypipeline:1.0
303304
304305
INFO: Updating version in Singularity
305306
- VERSION 1.0dev

bin/sync

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
#!/usr/bin/env python
22

3-
from cookiecutter.main import cookiecutter
4-
import git
53
import json
64
import os
75
import requests
86
from requests.auth import HTTPBasicAuth
9-
import shutil
107
import sys
11-
import subprocess
12-
import tempfile
138
import syncutils.template
149

1510
# Set the default nf-core pipeline template branch
@@ -53,7 +48,7 @@ def main():
5348
pipelines = res.json().get('remote_workflows')
5449
if not pipelines:
5550
print("Pipeline information was empty!")
56-
51+
5752
# TODO: Remove this line, once we go for production
5853
pipelines = [
5954
{
@@ -82,21 +77,20 @@ def main():
8277
else:
8378
print("Created pull-request for pipeline \'{pipeline}\' successfully."
8479
.format(pipeline=pipeline["name"]))
85-
80+
8681
for pipeline, exception in sync_errors:
8782
print("Sync for pipeline {name} failed.".format(name=pipeline))
8883
print(exception)
8984

9085
for pipeline, return_code, content in pr_errors:
91-
print("Pull-request for pipeline \'{pipeline}\' failed,"
86+
print("Pull-request for pipeline \'{pipeline}\' failed,"
9287
" got return code {return_code}."
9388
.format(pipeline=pipeline, return_code=return_code))
9489
print(content)
95-
90+
9691
if pr_errors or sync_errors: sys.exit(1)
97-
92+
9893
sys.exit(0)
99-
94+
10095
if __name__ == "__main__":
10196
main()
102-

bin/syncutils/template.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import git
44
import os
55
import shutil
6-
import sys
7-
from cookiecutter.main import cookiecutter
86

97
import nf_core.create
108

@@ -29,7 +27,7 @@ def __init__(self, pipeline, branch=TEMPLATE_BRANCH, repo_url=""):
2927
self.templatedir = tempfile.mkdtemp()
3028
self.repo = git.Repo.clone_from(self.repo_url, self.tmpdir)
3129
assert self.repo
32-
30+
3331
def sync(self):
3432
"""Execute the template update.
3533
"""
@@ -49,7 +47,7 @@ def context_from_nextflow(self, nf_project_dir):
4947

5048
# Fetch the config variables from the Nextflow pipeline
5149
config = utils.fetch_wf_config(wf_path=nf_project_dir)
52-
50+
5351
# Checkout again to configured template branch
5452
self.repo.git.checkout("origin/{branch}".format(branch=self.branch),
5553
b="{branch}".format(branch=self.branch))

bin/syncutils/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def fetch_wf_config(wf_path):
1010
try:
1111
with open(os.devnull, 'w') as devnull:
1212
nfconfig_raw = subprocess.check_output(['nextflow', 'config', '-flat', wf_path], stderr=devnull)
13+
except OSError as e:
14+
if e.errno == os.errno.ENOENT:
15+
raise AssertionError("It looks like Nextflow is not installed. It is required for most nf-core functions.")
1316
except subprocess.CalledProcessError as e:
1417
raise AssertionError("`nextflow config` returned non-zero error code: %s,\n %s", e.returncode, e.output)
1518
else:
@@ -20,10 +23,10 @@ def fetch_wf_config(wf_path):
2023
return config
2124

2225
def create_context(config):
23-
"""Consumes a flat Nextflow config file and will create
26+
"""Consumes a flat Nextflow config file and will create
2427
a context dictionary with information for the nf-core template creation.
2528
26-
Returns: A dictionary with:
29+
Returns: A dictionary with:
2730
{
2831
'pipeline_name': '<parsed_name>'
2932
'pipeline_short_description': '<parsed_description>'
@@ -32,7 +35,7 @@ def create_context(config):
3235
"""
3336
context = {}
3437
context["pipeline_name"] = config.get("manifest.name") if config.get("manifest.name") else get_name_from_url(config.get("manifest.homePage"))
35-
context["pipeline_short_description"] = config.get("manifest.description")
38+
context["pipeline_short_description"] = config.get("manifest.description")
3639
context["version"] = config.get("manifest.version") if config.get("manifest.version") else config.get("params.version")
3740
context["author"] = config.get("manifest.author") if config.get("manifest.author") else "No author provided"
3841
return context

docs/lint_errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ nf-core pipelines must have CI testing with Travis or Circle CI.
107107
This test fails if the following happens:
108108

109109
* `.travis.yml` does not contain the string `nf-core lint ${TRAVIS_BUILD_DIR}` under `script`
110-
* `.travis.yml` does not contain the string `docker pull <container>` under `before_install`
110+
* `.travis.yml` does not contain the string `docker pull <container>:dev` under `before_install`
111111
* Where `<container>` is fetched from `params.container` in the `nextflow.config` file, without the docker tag _(if we have the tag the tests fail when making a release)_
112112
* `.travis.yml` does not test the Nextflow version specified in the pipeline as `manifest.nextflowVersion`
113113
* This is expected in the `env` section of the config, eg:

nf_core/bump_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def bump_pipeline_version(lint_obj, new_version):
3939
update_file_version("nextflow.config", lint_obj, nfconfig_pattern, nfconfig_newstr)
4040

4141
# Update travis image tag
42-
nfconfig_pattern = r"docker tag nfcore/{name} nfcore/{name}:(?:{tag}|latest)".format(name=lint_obj.pipeline_name.lower(), tag=current_version.replace('.',r'\.'))
43-
nfconfig_newstr = "docker tag nfcore/{name} nfcore/{name}:{tag}".format(name=lint_obj.pipeline_name.lower(), tag=docker_tag)
42+
nfconfig_pattern = r"docker tag nfcore/{name}:dev nfcore/{name}:(?:{tag}|latest)".format(name=lint_obj.pipeline_name.lower(), tag=current_version.replace('.',r'\.'))
43+
nfconfig_newstr = "docker tag nfcore/{name}:dev nfcore/{name}:{tag}".format(name=lint_obj.pipeline_name.lower(), tag=docker_tag)
4444
update_file_version(".travis.yml", lint_obj, nfconfig_pattern, nfconfig_newstr)
4545

4646
# Update Singularity version name

nf_core/create.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import git
1010
import logging
1111
import os
12-
import re
1312
import shutil
1413
import sys
1514
import tempfile

nf_core/download.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import logging
99
import hashlib
1010
import os
11-
import re
1211
import requests
1312
import requests_cache
1413
import subprocess
@@ -77,8 +76,8 @@ def download_workflow(self):
7776
self.pull_singularity_image(container)
7877

7978
def fetch_workflow_details(self, wfs):
80-
""" Fetch details of nf-core workflow to download
81-
79+
""" Fetch details of nf-core workflow to download
80+
8281
params:
8382
- wfs A nf_core.list.Workflows object
8483
"""

0 commit comments

Comments
 (0)