Skip to content

Commit

Permalink
Merge branch 'master' into rpetit3-print-choices
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Nov 16, 2021
2 parents 12103eb + f58077e commit d63d233
Show file tree
Hide file tree
Showing 66 changed files with 746 additions and 493 deletions.
45 changes: 0 additions & 45 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Bug report
description: Report something that is broken or incorrect
labels: bug
body:

- type: markdown
attributes:
value: |
Hi there!
Thanks for telling us about a problem with the nf-core/tools package.
- type: textarea
id: description
attributes:
label: Description of the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: command_used
attributes:
label: Command used and terminal output
description: Steps to reproduce the behaviour. Please paste the command and output from your terminal.
render: console
placeholder: |
$ nf-core lint ...
Some output where something broke
- type: textarea
id: system
attributes:
label: System information
description: |
* Nextflow version _(eg. 21.04.01)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of nf-core/tools _(eg. 1.1, 1.5, 1.8.2)_
* Python version _(eg. 3.7, 3.8)_
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
blank_issues_enabled: false
contact_links:
- name: Join nf-core
url: https://nf-co.re/join
Expand Down
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Feature request
description: Suggest an idea for nf-core/tools
labels: enhancement
body:
- type: textarea
id: description
attributes:
label: Description of feature
description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
validations:
required: true
11 changes: 8 additions & 3 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Create a pipeline and lint it
on: [push, pull_request]

# Uncomment if we need an edge release of Nextflow again
# env: NXF_EDGE: 1

jobs:
MakeTestWorkflow:
runs-on: ubuntu-latest
env:
NXF_ANSI_LOG: false
strategy:
matrix:
# Nextflow versions: check pipeline minimum and latest edge version
nxf_ver: ["NXF_VER=21.04.0", "NXF_EDGE=1"]
steps:
- uses: actions/checkout@v2
name: Check out source-code repository
Expand All @@ -27,6 +30,8 @@ jobs:
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
export ${{ matrix.nxf_ver }}
nextflow self-update
- name: nf-core create
run: nf-core --log-file log.txt create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Create a pipeline and test it
on: [push, pull_request]

# Uncomment if we need an edge release of Nextflow again
# env: NXF_EDGE: 1

jobs:
RunTestWorkflow:
runs-on: ubuntu-latest
env:
NXF_ANSI_LOG: false
strategy:
matrix:
# Nextflow versions: check pipeline minimum and latest edge version
nxf_ver: ["NXF_VER=21.04.0", "NXF_EDGE=1"]
steps:
- uses: actions/checkout@v2
name: Check out source-code repository
Expand All @@ -27,6 +30,8 @@ jobs:
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
export ${{ matrix.nxf_ver }}
nextflow self-update
- name: Run nf-core/tools
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2

- name: Check code lints with Black
uses: jpetrucciani/black-check@master
uses: psf/black@stable

# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# nf-core/tools: Changelog

## v2.2dev

### Template

* Disable cache in `nf_core.utils.fetch_wf_config` while performing `test_wf_use_local_configs`.
* Modify software version channel handling to support multiple software version emissions (e.g. from mulled containers), and multiple software versions.
* Update `dumpsoftwareversion` module to correctly report versions with trailing zeros.
* Remove `params.hostnames` from the pipeline template ([#1304](https://github.com/nf-core/tools/issues/1304))
* Update `.gitattributes` to mark installed modules and subworkflows as `linguist-generated` ([#1311](https://github.com/nf-core/tools/issues/1311))
* New YAML issue templates for pipeline bug reports and feature requests, with a much richer interface ([#1165](https://github.com/nf-core/tools/pull/1165))

### General

* Changed `questionary` `ask()` to `unsafe_ask()` to not catch `KeyboardInterupts` ([#1237](https://github.com/nf-core/tools/issues/1237))
* Fixed bug in `nf-core launch` due to revisions specified with `-r` not being added to nextflow command. ([#1246](https://github.com/nf-core/tools/issues/1246))
* Update regex in `readme` test of `nf-core lint` to agree with the pipeline template ([#1260](https://github.com/nf-core/tools/issues/1260))
* Update 'fix' message in `nf-core lint` to conform to the current command line options. ([#1259](https://github.com/nf-core/tools/issues/1259))
* Fixed bug in `nf-core list` when `NXF_HOME` is set
* Run CI test used to create and lint/run the pipeline template with minimum and latest edge release of NF ([#1304](https://github.com/nf-core/tools/issues/1304))
* New YAML issue templates for tools bug reports and feature requests, with a much richer interface ([#1165](https://github.com/nf-core/tools/pull/1165))

### Modules

* Fixed typo in `module_utils.py`.
* Added `--diff` flag to `nf-core modules update` which shows the diff between the installed files and the versions
* Update `nf-core modules create` help texts which were not changed with the introduction of the `--dir` flag

## [v2.1 - Zinc Zebra](https://github.com/nf-core/tools/releases/tag/2.1) - [2021-07-27]

### Template
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,11 +1019,12 @@ INFO Downloaded 3 files to ./modules/nf-core/modules/fastqc

You can pass the module name as an optional argument to `nf-core modules update` instead of using the cli prompt, eg: `nf-core modules update fastqc`. You can specify a pipeline directory other than the current working directory by using the `--dir <pipeline dir>`.

There are four additional flags that you can use with this command:
There are five additional flags that you can use with this command:

* `--force`: Reinstall module even if it appears to be up to date
* `--prompt`: Select the module version using a cli prompt.
* `--sha <commit_sha>`: Install the module at a specific commit from the `nf-core/modules` repository.
* `--diff`: Show the diff between the installed files and the new version before installing.
* `--all`: Use this flag to run the command on all modules in the pipeline.

If you don't want to update certain modules or want to update them to specific versions, you can make use of the `.nf-core.yml` configuration file. For example, you can prevent the `star/align` module installed from `nf-core/modules` from being updated by adding the following to the `.nf-core.yml` file:
Expand Down
13 changes: 9 additions & 4 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,19 @@ def install(ctx, tool, dir, prompt, force, sha):
@click.option("-p", "--prompt", is_flag=True, default=False, help="Prompt for the version of the module")
@click.option("-s", "--sha", type=str, metavar="<commit sha>", help="Install module at commit SHA")
@click.option("-a", "--all", is_flag=True, default=False, help="Update all modules installed in pipeline")
def update(ctx, tool, dir, force, prompt, sha, all):
@click.option(
"-c", "--diff", is_flag=True, default=False, help="Show differences between module versions before updating"
)
def update(ctx, tool, dir, force, prompt, sha, all, diff):
"""
Update DSL2 modules within a pipeline.
Fetches and updates module files from a remote repo e.g. nf-core/modules.
"""
try:
module_install = nf_core.modules.ModuleUpdate(dir, force=force, prompt=prompt, sha=sha, update_all=all)
module_install = nf_core.modules.ModuleUpdate(
dir, force=force, prompt=prompt, sha=sha, update_all=all, diff=diff
)
module_install.modules_repo = ctx.obj["modules_repo_obj"]
exit_status = module_install.update(tool)
if not exit_status and all:
Expand Down Expand Up @@ -497,10 +502,10 @@ def create_module(ctx, tool, dir, author, label, meta, no_meta, force, conda_nam
"""
Create a new DSL2 module from the nf-core template.
If <directory> is a pipeline, this function creates a file called
If the specified directory is a pipeline, this function creates a file called
'modules/local/tool_subtool.nf'
If <directory> is a clone of nf-core/modules, it creates or modifies files
If the specified directory is a clone of nf-core/modules, it creates or modifies files
in 'modules/', 'tests/modules' and 'tests/config/pytest_modules.yml'
"""
# Combine two bool flags into one variable
Expand Down
2 changes: 2 additions & 0 deletions nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ def wf_use_local_configs(self):
nfconfig = nfconfig_fh.read()

# Replace the target string
log.debug(f"Replacing '{find_str}' with '{repl_str}'")
nfconfig = nfconfig.replace(find_str, repl_str)

# Append the singularity.cacheDir to the end if we need it
Expand All @@ -407,6 +408,7 @@ def wf_use_local_configs(self):
)

# Write the file out again
log.debug(f"Updating '{nfconfig_fn}'")
with open(nfconfig_fn, "w") as nfconfig_fh:
nfconfig_fh.write(nfconfig)

Expand Down
2 changes: 1 addition & 1 deletion nf_core/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_pipeline_schema(self):
return False

self.pipeline_revision = nf_core.utils.prompt_pipeline_release_branch(wf_releases, wf_branches)
self.nextflow_cmd += " -r {}".format(self.pipeline_revision)
self.nextflow_cmd += " -r {}".format(self.pipeline_revision)

# Get schema from name, load it and lint it
try:
Expand Down
15 changes: 7 additions & 8 deletions nf_core/lint/files_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def files_exist(self):
.markdownlint.yml
.github/.dockstore.yml
.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/bug_report.yml
.github/ISSUE_TEMPLATE/config.yml
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/feature_request.yml
.github/PULL_REQUEST_TEMPLATE.md
.github/workflows/branch.yml
.github/workflows/ci.yml
Expand All @@ -36,7 +36,6 @@ def files_exist(self):
assets/email_template.txt
assets/nf-core-PIPELINE_logo.png
assets/sendmail_template.txt
bin/scrape_software_versions.py
conf/modules.config
conf/test.config
conf/test_full.config
Expand All @@ -52,7 +51,6 @@ def files_exist(self):
lib/NfcoreTemplate.groovy
lib/Utils.groovy
lib/WorkflowMain.groovy
modules/local/get_software_versions.nf
nextflow_schema.json
nextflow.config
README.md
Expand All @@ -78,6 +76,7 @@ def files_exist(self):
bin/markdown_to_html.r
conf/aws.config
.github/workflows/push_dockerhub.yml
.github/ISSUE_TEMPLATE/bug_report.md
Files that *should not* be present:
Expand Down Expand Up @@ -109,9 +108,9 @@ def files_exist(self):
["README.md"],
[os.path.join(".github", ".dockstore.yml")],
[os.path.join(".github", "CONTRIBUTING.md")],
[os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.md")],
[os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.yml")],
[os.path.join(".github", "ISSUE_TEMPLATE", "config.yml")],
[os.path.join(".github", "ISSUE_TEMPLATE", "feature_request.md")],
[os.path.join(".github", "ISSUE_TEMPLATE", "feature_request.yml")],
[os.path.join(".github", "PULL_REQUEST_TEMPLATE.md")],
[os.path.join(".github", "workflows", "branch.yml")],
[os.path.join(".github", "workflows", "ci.yml")],
Expand All @@ -121,7 +120,6 @@ def files_exist(self):
[os.path.join("assets", "email_template.txt")],
[os.path.join("assets", "sendmail_template.txt")],
[os.path.join("assets", f"nf-core-{short_name}_logo.png")],
[os.path.join("bin", "scrape_software_versions.py")],
[os.path.join("conf", "modules.config")],
[os.path.join("conf", "test.config")],
[os.path.join("conf", "test_full.config")],
Expand All @@ -135,7 +133,6 @@ def files_exist(self):
[os.path.join("lib", "NfcoreTemplate.groovy")],
[os.path.join("lib", "Utils.groovy")],
[os.path.join("lib", "WorkflowMain.groovy")],
[os.path.join("modules", "local", "get_software_versions.nf")],
]

files_warn = [
Expand All @@ -156,6 +153,8 @@ def files_exist(self):
os.path.join("bin", "markdown_to_html.r"),
os.path.join("conf", "aws.config"),
os.path.join(".github", "workflows", "push_dockerhub.yml"),
os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.md"),
os.path.join(".github", "ISSUE_TEMPLATE", "feature_request.md"),
]
files_warn_ifexists = [".travis.yml"]

Expand Down
Loading

0 comments on commit d63d233

Please sign in to comment.