Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into add-cleanup-to-download
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasadn committed Mar 15, 2024
2 parents 8f3ddb6 + 3fe0a1f commit 6d65c60
Show file tree
Hide file tree
Showing 65 changed files with 204 additions and 174 deletions.
2 changes: 1 addition & 1 deletion .github/actions/create-lint-wf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
# Set up Nextflow
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
uses: nf-core/setup-nextflow@v2
with:
version: ${{ matrix.NXF_VER }}

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _determine_change_type(pr_title) -> tuple[str, str]:
section, section_header = _determine_change_type(pr_title)

# Remove section indicator from the PR title.
pr_title = re.sub(rf"{section}[:\s]*", "", pr_title, flags=re.IGNORECASE)
pr_title = re.sub(rf"{section}:[\s]*", "", pr_title, flags=re.IGNORECASE)

# Prepare the change log entry.
pr_link = f"([#{pr_number}]({REPO_URL}/pull/{pr_number}))"
Expand All @@ -91,7 +91,6 @@ def _determine_change_type(pr_title) -> tuple[str, str]:
new_lines = [
f"- {pr_title} {pr_link}\n",
]

print(f"Adding new lines into section '{section}':\n" + "".join(new_lines))

# Finally, updating the changelog.
Expand Down Expand Up @@ -144,10 +143,11 @@ def _skip_existing_entry_for_this_pr(line: str, same_section: bool = True) -> st

# Parse version from the line `## v2.12dev` or
# `## [v2.11.1 - Magnesium Dragon Patch](https://github.com/nf-core/tools/releases/tag/2.11) - [2023-12-20]` ...
if not (m := re.match(r".*(v\d+\.\d+(dev)?).*", line)):
if not (m := re.match(r".*(v\d+\.\d+.\d*(dev)?).*", line)):
print(f"Cannot parse version from line {line.strip()}.", file=sys.stderr)
sys.exit(1)
version = m.group(1)
print(f"Found version: {version}")

if not inside_version_dev:
if not version.endswith("dev"):
Expand Down Expand Up @@ -209,6 +209,7 @@ def _skip_existing_entry_for_this_pr(line: str, same_section: bool = True) -> st
# If the line already contains a link to the PR, don't add it again.
line = _skip_existing_entry_for_this_pr(line, same_section=True)
section_lines.append(line)

else:
updated_lines.append(line)

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- "docs/**"
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
release:
types: [published]
workflow_dispatch:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- nf_core/pipeline-template/**
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -72,7 +75,7 @@ jobs:
pip install .
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
uses: nf-core/setup-nextflow@v2
with:
version: latest-everything

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- "docs/**"
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -59,7 +62,7 @@ jobs:
pip install .
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
uses: nf-core/setup-nextflow@v2
with:
version: ${{ matrix.NXF_VER }}

Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
# ignore github workflows except for the current one
- ".github/**"
- "!.github/workflows/pytest.yml"
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -119,32 +121,10 @@ jobs:
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- name: Look if nf-test is already installed and write to env variable
id: check-nftest
run: |
if [ -f /usr/local/bin/nf-test ]; then
echo "nftest_installed=true" >> $GITHUB_ENV
else
echo "nftest_installed=false" >> $GITHUB_ENV
fi
- name: Cache nf-test installation
if: env.nftest_installed != 'true'
id: cache-software
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: ${{ runner.os }}-nftest-${{ env.date }}
uses: nf-core/setup-nextflow@v2

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true' && env.nftest_installed != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
uses: nf-core/setup-nf-test@v1

- name: move coveragerc file up
run: |
Expand Down Expand Up @@ -197,7 +177,7 @@ jobs:
mv .github/.coveragerc .
- name: Download all artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4
- name: Run coverage
run: |
coverage combine --keep coverage*/.coverage*
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/rich-codex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,10 @@ jobs:
cache-dependency-path: setup.py

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- name: Cache nf-test installation
id: cache-software
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: ${{ runner.os }}-nftest-${{ env.date }}
uses: nf-core/setup-nextflow@v2

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
uses: nf-core/setup-nf-test@v1

- name: Install nf-core/tools
run: pip install git+https://github.com/nf-core/tools.git@dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
pip install .
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
uses: nf-core/setup-nextflow@v2
with:
version: "latest-everything"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_components_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:

- name: Update modules
run: nf-core modules update --all
working-directory: nf-core/pipeline-template
working-directory: nf_core/pipeline-template

- name: Update subworkflows
run: nf-core subworkflows update --all
working-directory: nf-core/pipeline-template
working-directory: nf_core/pipeline-template

# Commit the changes
- name: Commit changes
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: nfcore/gitpod:latest
image: nfcore/gitpod:dev
tasks:
- name: install current state of nf-core/tools and setup pre-commit
command: |
Expand Down
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.2
hooks:
- id: ruff # linter
args: [--fix, --exit-non-zero-on-fix] # sort imports and fix
Expand All @@ -9,6 +9,8 @@ repos:
rev: "v3.1.0"
hooks:
- id: prettier
additional_dependencies:
- prettier@3.2.5

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3"
Expand All @@ -17,7 +19,7 @@ repos:
alias: ec

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.9.0"
hooks:
- id: mypy
additional_dependencies:
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# nf-core/tools: Changelog

## v2.13.2dev

### Template

- Remove fasta default from nextflow.config ([#2828](https://github.com/nf-core/tools/pull/2828))
- Update templates to use nf-core/setup-nextflow v2
- Link to troubleshooting docs when pipeline fails ([#2845](https://github.com/nf-core/tools/pull/2845))
- Add fallback to `download_pipeline.yml` in case the pipeline does not support stub runs ([#2846](https://github.com/nf-core/tools/pull/2846))

### Linting

- Only match assignments of params in `main.nf` and not references like `params.aligner == <something>` ([#2833](https://github.com/nf-core/tools/pull/2833))

### Components

### General

- Update CI to use nf-core/setup-nextflow v2
- Changelog bot: handle also patch version before dev suffix ([#2820](https://github.com/nf-core/tools/pull/2820))
- Fix path in component update script ([#2823](https://github.com/nf-core/tools/pull/2823))
- Update prettier to 3.2.5 ([#2830](https://github.com/nf-core/tools/pull/2830))
- Update GitHub Actions ([#2827](https://github.com/nf-core/tools/pull/2827))
- Switch to setup-nf-test ([#2834](https://github.com/nf-core/tools/pull/2834))
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.3.2 ([#2836](https://github.com/nf-core/tools/pull/2836))
- Add tests for assignment and referencing of params in main.nf ([#2841](https://github.com/nf-core/tools/pull/2841))
- Optimize layers in dockerfile ([#2842](https://github.com/nf-core/tools/pull/2842))
- Update gitpod/workspace-base Docker digest to 1e133e5 ([#2843](https://github.com/nf-core/tools/pull/2843))
- Update python:3.11-slim Docker digest to a2eb07f ([#2847](https://github.com/nf-core/tools/pull/2847))

## [v2.13.1 - Tin Puppy Patch](https://github.com/nf-core/tools/releases/tag/2.13) - [2024-02-29]

### Template
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim@sha256:ce81dc539f0aedc9114cae640f8352fad83d37461c24a3615b01f081d0c0583a
FROM python:3.11-slim@sha256:a2eb07f336e4f194358382611b4fea136c632b40baa6314cb27a366deeaf0144
LABEL authors="phil.ewels@scilifelab.se,erik.danielsson@scilifelab.se" \
description="Docker image containing requirements for the nfcore tools"

Expand Down
1 change: 1 addition & 0 deletions docs/api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Sphinx>=3.3.1
sphinxcontrib-napoleon
sphinx-markdown-builder
sphinx_rtd_theme>=0.5.0
myst-parser
2 changes: 1 addition & 1 deletion nf_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Main nf_core module file.
"""Main nf_core module file.
Shouldn't do much, as everything is under subcommands.
"""
Expand Down
3 changes: 2 additions & 1 deletion nf_core/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
""" nf-core: Helper tools for use with nf-core Nextflow pipelines. """
"""nf-core: Helper tools for use with nf-core Nextflow pipelines."""

import logging
import os
import sys
Expand Down
7 changes: 3 additions & 4 deletions nf_core/components/components_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
The ComponentsTest class handles the generation and testing of nf-test snapshots.
"""


import logging
import os
import re
Expand Down Expand Up @@ -91,9 +90,9 @@ def run(self) -> None:
"""Run build steps"""
self.check_inputs()
os.environ["NFT_DIFF"] = "pdiff" # set nf-test differ to pdiff to get a better diff output
os.environ[
"NFT_DIFF_ARGS"
] = "--line-numbers --expand-tabs=2" # taken from https://code.askimed.com/nf-test/docs/assertions/snapshots/#snapshot-differences
os.environ["NFT_DIFF_ARGS"] = (
"--line-numbers --expand-tabs=2" # taken from https://code.askimed.com/nf-test/docs/assertions/snapshots/#snapshot-differences
)
with nf_core.utils.set_wd(Path(self.dir)):
self.check_snapshot_stability()
if len(self.errors) > 0:
Expand Down
1 change: 0 additions & 1 deletion nf_core/components/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
The ComponentCreate class handles generating of module and subworkflow templates
"""


import glob
import json
import logging
Expand Down
1 change: 0 additions & 1 deletion nf_core/components/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
in nf-core pipelines
"""


import logging
import operator
import os
Expand Down
1 change: 1 addition & 0 deletions nf_core/components/nfcore_component.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
The NFCoreComponent class holds information and utility functions for a single module or subworkflow
"""

import logging
import re
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions nf_core/create.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Creates a nf-core pipeline matching the current
organization's specification based on a template.
"""

import configparser
import logging
import os
Expand Down
Loading

0 comments on commit 6d65c60

Please sign in to comment.