Skip to content

Commit

Permalink
Merge branch 'dev' into api_schema_description
Browse files Browse the repository at this point in the history
  • Loading branch information
aelezi01 authored Mar 28, 2023
2 parents d19f64b + f3b5d1e commit fe63c0b
Show file tree
Hide file tree
Showing 60 changed files with 924 additions and 790 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ body:
* 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)_
* Python version _(eg. 3.10, 3.11)_
4 changes: 2 additions & 2 deletions .github/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
6. Create a PR from `dev` to `master`
7. Make sure all CI tests are passing again (additional tests are run on PRs to `master`)
8. Request review (2 approvals required)
9. Merge the PR into `master`
10. Run `rich-codex` to regenerate docs screengrabs (actions `workflow_dispatch` button)
9. Run `rich-codex` to regenerate docs screengrabs (actions `workflow_dispatch` button)
10. Merge the PR into `master`
11. Wait for CI tests on the commit to passed
12. (Optional but a good idea) Run a manual sync on `nf-core/testpipeline` and check that CI is passing on the resulting PR.
13. Create a new release copying the `CHANGELOG` for that release into the description section.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Check PRs
if: github.repository == 'nf-core/tools'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/tools ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/tools ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools-api-docs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools-api-docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.6.2"
rev: "v2.7.1"
hooks:
- id: prettier
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ adaptivecard.json
slackreport.json
docs/api/_build
testing

nf_core/module-template/modules/meta.yml
nf_core/module-template/tests/test.yml
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
# nf-core/tools: Changelog

# v2.8dev

### Template

- Turn on automatic clean up of intermediate files in `work/` on successful pipeline completion in full-test config ([#2163](https://github.com/nf-core/tools/pull/2163)) [Contributed by @jfy133]
- Add documentation to `usage.md` on how to use `params.yml` files, based on nf-core/ampliseq text ([#2173](https://github.com/nf-core/tools/pull/2173/)) [Contributed by @jfy133, @d4straub]
- Make jobs automatically resubmit for a much wider range of exit codes (now `104` and `130..145`) ([#2170](https://github.com/nf-core/tools/pull/2170))
- Remove problematic sniffer code in samplesheet_check.py that could give false positive 'missing header' errors ([https://github.com/nf-core/tools/pull/2194]) [Contributed by @Midnighter, @jfy133]
- Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202))
- Fixed minor Jinja2 templating bug that caused the PR template to miss a newline

### Linting

### Modules

- Add an `--empty-template` option to create a module without TODO statements or examples ([#2175](https://github.com/nf-core/tools/pull/2175) & [#2177](https://github.com/nf-core/tools/pull/2177))

### Subworkflows

- Fixing problem when a module included in a subworkflow had a name change from TOOL to TOOL/SUBTOOL ([#2177](https://github.com/nf-core/tools/pull/2177))
- Fix `nf-core subworkflows test` not running subworkflow tests ([#2181](https://github.com/nf-core/tools/pull/2181))

### General

- `nf-core modules/subworkflows info` now prints the include statement for the module/subworkflow ([#2182](https://github.com/nf-core/tools/pull/2182)).

## [v2.7.2 - Mercury Eagle Patch](https://github.com/nf-core/tools/releases/tag/2.7.2) - [2022-12-19]

### Template

- Fix the syntax of github_output in GitHub actions ([#2114](https://github.com/nf-core/tools/pull/2114))
- Fix a bug introduced in 2.7 that made pipelines hang ([#2132](https://github.com/nf-core/tools/issues/2132))
- Explicitly disable `conda` when a container profile ([#2140](https://github.com/nf-core/tools/pull/2140))

### Linting

Expand All @@ -17,6 +44,7 @@
- Only check that a pipeline name doesn't contain dashes if the name is provided by prompt of `--name`. Don't check if a template file is used. ([#2123](https://github.com/nf-core/tools/pull/2123))
- Deprecate `--enable_conda` parameter. Use `conda.enable` instead ([#2131](https://github.com/nf-core/tools/pull/2131))
- Handle `json.load()` exceptions ([#2134](https://github.com/nf-core/tools/pull/2134))
- Deprecate Python 3.7 support because it reaches EOL ([#2210](https://github.com/nf-core/tools/pull/2210))

## [v2.7.1 - Mercury Eagle Patch](https://github.com/nf-core/tools/releases/tag/2.7.1) - [2022-12-08]

Expand Down Expand Up @@ -49,7 +77,8 @@ Another big release with lots of new features and bug fixes. Thanks to all contr

- Fix lint warnings for `samplesheet_check.nf` module ([#1875](https://github.com/nf-core/tools/pull/1875)).
- Check that the workflow name provided with a template doesn't contain dashes ([#1822](https://github.com/nf-core/tools/pull/1822))
- Remove `CITATION.cff` file from pipeline template, to avoid that pipeline Zenodo entries reference the nf-core publication instead of the pipeline ([#2059](https://github.com/nf-core/tools/pull/2059)).
- Remove `CITATION.cff` file from pipeline template, to avoid that pipeline Zenodo entries reference the nf-core publication instead of the pipeline ([#2059](https://github.com/nf-core/tools/pull/2059)).- Add initial CHM13 support ([1988](https://github.com/nf-core/tools/issues/1988))
- Add initial CHM13 support ([1988](https://github.com/nf-core/tools/issues/1988))

### Linting

Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ You can run the pipeline by simply providing the directory path for the `workflo
nextflow run /path/to/download/nf-core-rnaseq-dev/workflow/ --input mydata.csv --outdir results # usual parameters here
```

> Note that if you downloaded singularity images, you will need to use `-profile singularity` or have it enabled in your config file.
### Downloaded nf-core configs

The pipeline files are automatically updated (`params.custom_config_base` is set to `../configs`), so that the local copy of institutional configs are available when running the pipeline.
Expand Down Expand Up @@ -1041,6 +1043,8 @@ To list subworkflows installed in a local pipeline directory you can use `nf-cor

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
head: 25
-->

Expand All @@ -1054,6 +1058,8 @@ This shows documentation about the subworkflow on the command line, similar to w

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
-->

![`nf-core subworkflows info bam_rseqc`](docs/images/nf-core-subworkflows-info.svg)
Expand All @@ -1065,6 +1071,8 @@ A subworkflow installed this way will be installed to the `./subworkflows/nf-cor

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
-->

![`nf-core subworkflows install bam_rseqc`](docs/images/nf-core-subworkflows-install.svg)
Expand All @@ -1084,6 +1092,8 @@ You can update subworkflows installed from a remote repository in your pipeline

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
-->

![`nf-core subworkflows update --all --no-preview`](docs/images/nf-core-subworkflows-update.svg)
Expand Down Expand Up @@ -1143,6 +1153,8 @@ To delete a subworkflow from your pipeline, run `nf-core subworkflows remove`.

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
-->

![`nf-core subworkflows remove bam_rseqc`](docs/images/nf-core-subworkflows-remove.svg)
Expand Down Expand Up @@ -1171,10 +1183,10 @@ The `nf-core subworkflows create` command will prompt you with the relevant ques
<!-- RICH-CODEX
working_dir: tmp
before_command: git clone https://github.com/nf-core/modules.git && cd modules
fake_command: nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --label process_low --meta --force
fake_command: nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --force
-->

![`cd modules && nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --label process_low --meta --force`](docs/images/nf-core-subworkflows-create.svg)
![`cd modules && nf-core subworkflows create bam_stats_samtools --author @nf-core-bot --force`](docs/images/nf-core-subworkflows-create.svg)

### Create a subworkflow test config file

Expand All @@ -1186,6 +1198,8 @@ After you have written a minimal Nextflow script to test your subworkflow in `/t
working_dir: tmp/subworkflows
extra_env:
PROFILE: 'conda'
before_command: >
echo "repository_type: modules" >> .nf-core.yml
-->

![`nf-core subworkflows create-test-yml bam_stats_samtools --no-prompts --force`](docs/images/nf-core-subworkflows-create-test.svg)
Expand All @@ -1201,6 +1215,8 @@ working_dir: tmp/subworkflows
timeout: 30
extra_env:
PROFILE: 'conda'
before_command: >
echo "repository_type: pipeline" >> .nf-core.yml
-->

![`nf-core subworkflows test bam_rseqc --no-prompts`](docs/images/nf-core-subworkflows-test.svg)
Expand Down
2 changes: 1 addition & 1 deletion nf_core/.pre-commit-prettier-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.6.2"
rev: "v2.7.1"
hooks:
- id: prettier
16 changes: 12 additions & 4 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,16 @@ def remove(ctx, dir, tool):
@click.option("-f", "--force", is_flag=True, default=False, help="Overwrite any files if they already exist")
@click.option("-c", "--conda-name", type=str, default=None, help="Name of the conda package to use")
@click.option("-p", "--conda-package-version", type=str, default=None, help="Version of conda package to use")
def create_module(ctx, tool, dir, author, label, meta, no_meta, force, conda_name, conda_package_version):
@click.option(
"-i",
"--empty-template",
is_flag=True,
default=False,
help="Create a module from the template without TODOs or examples",
)
def create_module(
ctx, tool, dir, author, label, meta, no_meta, force, conda_name, conda_package_version, empty_template
):
"""
Create a new DSL2 module from the nf-core template.
Expand All @@ -700,7 +709,7 @@ def create_module(ctx, tool, dir, author, label, meta, no_meta, force, conda_nam
# Run function
try:
module_create = nf_core.modules.ModuleCreate(
dir, tool, author, label, has_meta, force, conda_name, conda_package_version
dir, tool, author, label, has_meta, force, conda_name, conda_package_version, empty_template
)
module_create.create()
except UserWarning as e:
Expand Down Expand Up @@ -1446,8 +1455,7 @@ def docs(schema_path, output, format, force, columns):
# Assume we're in a pipeline dir root if schema path not set
schema_obj.get_schema_path(schema_path)
schema_obj.load_schema()
if not output:
stdout.print(schema_obj.print_documentation(output, format, force, columns.split(",")))
schema_obj.print_documentation(output, format, force, columns.split(","))


# nf-core bump-version
Expand Down
2 changes: 0 additions & 2 deletions nf_core/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,10 @@ def update_file_version(filename, pipeline_obj, patterns):

replacements = []
for pattern in patterns:

found_match = False

newcontent = []
for line in content.splitlines():

# Match the pattern
matches_pattern = re.findall(rf"^.*{pattern[0]}.*$", line)
if matches_pattern:
Expand Down
Loading

0 comments on commit fe63c0b

Please sign in to comment.