Skip to content

Commit

Permalink
More switching of params.container with process. Fix tests.¨
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Mar 12, 2019
1 parent a3114e9 commit b9f35af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/lint_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The following variables are depreciated and fail the test if they are still pres
* The old method for specifying the pipeline version. Replaced by `manifest.version`
* `params.nf_required_version`
* The old method for specifying the minimum Nextflow version. Replaced by `manifest.nextflowVersion`
* `process.container`
* `params.container`
* The old method for specifying the dockerhub container address. Replaced by `process.container`

## Error #5 - Continuous Integration configuration ## {#5}
Expand All @@ -110,7 +110,7 @@ This test fails if the following happens:

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

Expand Down Expand Up @@ -154,7 +154,7 @@ The `README.md` files for a project are very important and must meet some requir

> This test only runs when `--release` is set or `$TRAVIS_BRANCH` is equal to `master`

These tests look at `params.container`, `process.container` and `$TRAVIS_TAG`, only
These tests look at `process.container` and `$TRAVIS_TAG`, only
if they are set.

* Container name must have a tag specified (eg. `nfcore/pipeline:version`)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def pf(wd, path):
pf(WD, 'lint_examples/license_incomplete_example')]

# The maximum sum of passed tests currently possible
MAX_PASS_CHECKS = 57
MAX_PASS_CHECKS = 59
# The additional tests passed for releases
ADD_PASS_RELEASE = 1

Expand Down Expand Up @@ -201,7 +201,7 @@ def test_version_consistency_pass(self):
"""Tests the workflow version and container version sucessfully"""
lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE)
lint_obj.config["manifest.version"] = "0.4"
lint_obj.config["params.container"] = "nfcore/tools:0.4"
lint_obj.config["process.container"] = "nfcore/tools:0.4"
lint_obj.check_version_consistency()
expectations = {"failed": 0, "warned": 0, "passed": 1}
self.assess_lint_status(lint_obj, **expectations)
Expand All @@ -213,7 +213,7 @@ def test_version_consistency_with_env_fail(self):
os.environ["TRAVIS_REPO_SLUG"] = "nf-core/testpipeline"
lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE)
lint_obj.config["manifest.version"] = "0.4"
lint_obj.config["params.container"] = "nfcore/tools:0.4"
lint_obj.config["process.container"] = "nfcore/tools:0.4"
lint_obj.config["process.container"] = "nfcore/tools:0.4"
lint_obj.check_version_consistency()
expectations = {"failed": 1, "warned": 0, "passed": 0}
Expand All @@ -226,7 +226,7 @@ def test_version_consistency_with_numeric_fail(self):
os.environ["TRAVIS_REPO_SLUG"] = "nf-core/testpipeline"
lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE)
lint_obj.config["manifest.version"] = "0.4"
lint_obj.config["params.container"] = "nfcore/tools:0.4"
lint_obj.config["process.container"] = "nfcore/tools:0.4"
lint_obj.check_version_consistency()
expectations = {"failed": 1, "warned": 0, "passed": 0}
self.assess_lint_status(lint_obj, **expectations)
Expand All @@ -238,7 +238,7 @@ def test_version_consistency_with_no_docker_version_fail(self):
os.environ["TRAVIS_REPO_SLUG"] = "nf-core/testpipeline"
lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE)
lint_obj.config["manifest.version"] = "0.4"
lint_obj.config["params.container"] = "nfcore/tools"
lint_obj.config["process.container"] = "nfcore/tools"
lint_obj.check_version_consistency()
expectations = {"failed": 1, "warned": 0, "passed": 0}
self.assess_lint_status(lint_obj, **expectations)
Expand All @@ -250,7 +250,7 @@ def test_version_consistency_with_env_pass(self):
os.environ["TRAVIS_REPO_SLUG"] = "nf-core/testpipeline"
lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE)
lint_obj.config["manifest.version"] = "0.4"
lint_obj.config["params.container"] = "nfcore/tools:0.4"
lint_obj.config["process.container"] = "nfcore/tools:0.4"
lint_obj.check_version_consistency()
expectations = {"failed": 0, "warned": 0, "passed": 1}
self.assess_lint_status(lint_obj, **expectations)
Expand Down

0 comments on commit b9f35af

Please sign in to comment.