Skip to content

Commit 34bc338

Browse files
authored
Merge pull request #3406 from nf-core/dev
dev -> main for 3.1.2
2 parents 45c7879 + e481084 commit 34bc338

File tree

24 files changed

+327
-57
lines changed

24 files changed

+327
-57
lines changed

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797

9898
run: |
9999
pushd nf-core/${{ matrix.pipeline }}
100-
defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2)
100+
defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2 | sed "s/'//g")
101101
if [ -z "$defaultBranch" ]; then
102102
defaultBranch="master"
103103
fi

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.8.2
3+
rev: v0.8.6
44
hooks:
55
- id: ruff # linter
66
args: [--fix, --exit-non-zero-on-fix] # sort imports and fix
@@ -19,7 +19,7 @@ repos:
1919
alias: ec
2020

2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: "v1.13.0"
22+
rev: "v1.14.1"
2323
hooks:
2424
- id: mypy
2525
additional_dependencies:

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+
## [v3.1.2 - Brass Boxfish Patch](https://github.com/nf-core/tools/releases/tag/3.1.2) - [2025-01-20]
4+
5+
### Template
6+
7+
- Bump nf-schema to `2.3.0` ([#3401](https://github.com/nf-core/tools/pull/3401))
8+
- Remove jinja formatting which was deleting line breaks ([#3405](https://github.com/nf-core/tools/pull/3405))
9+
10+
### Download
11+
12+
- Allow `nf-core pipelines download -r` to download commits ([#3374](https://github.com/nf-core/tools/pull/3374))
13+
- Fix faulty Download Test Action to ensure that setup and test run as one job and on the same runner ([#3389](https://github.com/nf-core/tools/pull/3389))
14+
15+
### Modules
16+
17+
- Fix bump-versions: only append module name if it is a dir and contains `main.nf` ([#3384](https://github.com/nf-core/tools/pull/3384))
18+
19+
### General
20+
21+
- `manifest.author` is not required anymore ([#3397](https://github.com/nf-core/tools/pull/3397))
22+
- Parameters schema validation: allow `oneOf`, `anyOf` and `allOf` with `required` ([#3386](https://github.com/nf-core/tools/pull/3386))
23+
- Run pre-comit when rendering template for pipelines sync ([#3371](https://github.com/nf-core/tools/pull/3371))
24+
- Fix sync GHA by removing quotes from parsed branch name ([#3394](https://github.com/nf-core/tools/pull/3394))
25+
326
## [v3.1.1 - Brass Boxfish Patch](https://github.com/nf-core/tools/releases/tag/3.1.1) - [2024-12-20]
427

528
### Template

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim@sha256:2b0079146a74e23bf4ae8f6a28e1b484c6292f6fb904cbb51825b4a19812fcd8
1+
FROM python:3.12-slim@sha256:10f3aaab98db50cba827d3b33a91f39dc9ec2d02ca9b85cbc5008220d07b17f3
22
33
description="Docker image containing requirements for nf-core/tools"
44

nf_core/modules/modules_utils.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,20 @@ def get_installed_modules(directory: Path, repo_type="modules") -> Tuple[List[st
6565
local_modules = sorted([x for x in local_modules if x.endswith(".nf")])
6666

6767
# Get nf-core modules
68-
if os.path.exists(nfcore_modules_dir):
69-
for m in sorted([m for m in os.listdir(nfcore_modules_dir) if not m == "lib"]):
70-
if not os.path.isdir(os.path.join(nfcore_modules_dir, m)):
68+
if nfcore_modules_dir.exists():
69+
for m in sorted([m for m in nfcore_modules_dir.iterdir() if not m == "lib"]):
70+
if not m.is_dir():
7171
raise ModuleExceptionError(
7272
f"File found in '{nfcore_modules_dir}': '{m}'! This directory should only contain module directories."
7373
)
74-
m_content = os.listdir(os.path.join(nfcore_modules_dir, m))
74+
m_content = [d.name for d in m.iterdir()]
7575
# Not a module, but contains sub-modules
7676
if "main.nf" not in m_content:
7777
for tool in m_content:
78-
nfcore_modules_names.append(os.path.join(m, tool))
78+
if (m / tool).is_dir() and "main.nf" in [d.name for d in (m / tool).iterdir()]:
79+
nfcore_modules_names.append(str(Path(m.name, tool)))
7980
else:
80-
nfcore_modules_names.append(m)
81+
nfcore_modules_names.append(m.name)
8182

8283
# Make full (relative) file paths and create NFCoreComponent objects
8384
if local_modules_dir:

nf_core/pipeline-template/.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
steps:
4747
- name: Check out pipeline code
4848
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
49+
with:
50+
fetch-depth: 0
4951

5052
- name: Set up Nextflow
5153
uses: nf-core/setup-nextflow@v2

nf_core/pipeline-template/.github/workflows/download_pipeline.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,18 @@ jobs:
3535
REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }}
3636
REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }}
3737
steps:
38-
- name: Install Nextflow{% endraw %}
38+
- name: Get the repository name and current branch
39+
id: get_repo_properties
40+
run: |
41+
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
42+
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT"
43+
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT{% endraw %}"
44+
45+
download:
46+
runs-on: ubuntu-latest
47+
needs: configure
48+
steps:
49+
- name: Install Nextflow
3950
uses: nf-core/setup-nextflow@v2
4051

4152
- name: Disk space cleanup
@@ -56,24 +67,13 @@ jobs:
5667
python -m pip install --upgrade pip
5768
pip install git+https://github.com/nf-core/tools.git@dev
5869
59-
- name: Get the repository name and current branch set as environment variable
60-
id: get_repo_properties
61-
run: |
62-
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
63-
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT"
64-
echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"
65-
6670
- name: Make a cache directory for the container images
6771
run: |
6872
mkdir -p ./singularity_container_images
6973
70-
download:
71-
runs-on: ubuntu-latest
72-
needs: configure
73-
steps:
7474
- name: Download the pipeline
7575
env:
76-
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
76+
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images{% raw %}
7777
run: |
7878
nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \
7979
--revision ${{ needs.configure.outputs.REPO_BRANCH }} \
@@ -85,7 +85,10 @@ jobs:
8585
--download-configuration 'yes'
8686
8787
- name: Inspect download
88-
run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}{% endraw %}{% if test_config %}{% raw %}
88+
run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}{% endraw %}
89+
90+
- name: Inspect container images
91+
run: tree ./singularity_container_images | tee ./container_initial{% if test_config %}{% raw %}
8992

9093
- name: Count the downloaded number of container images
9194
id: count_initial
@@ -123,7 +126,8 @@ jobs:
123126
final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}
124127
difference=$((final_count - initial_count))
125128
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
126-
tree ./singularity_container_images
129+
tree ./singularity_container_images > ./container_afterwards
130+
diff ./container_initial ./container_afterwards
127131
exit 1
128132
else
129133
echo "The pipeline can be downloaded successfully!"

nf_core/pipeline-template/CITATIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
{%- endif %}
2020

21-
{%- if multiqc %}- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)
21+
{% if multiqc %}- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)
2222

2323
> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.
2424

nf_core/pipeline-template/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</picture>
88
</h1>
99

10-
{%- else -%}
10+
{% else -%}
1111

1212
# {{ name }}
1313

@@ -54,7 +54,7 @@
5454
## Usage
5555

5656
> [!NOTE]
57-
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. {%- if test_config %}Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.{% endif %}
57+
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. {% if test_config %}Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.{% endif %}
5858
5959
<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
6060
Explain what rows and columns represent. For instance (please edit as appropriate):
@@ -120,7 +120,7 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
120120
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
121121
<!-- If you use {{ name }} for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->
122122

123-
{%- if citations %}<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->
123+
{% if citations %}<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->
124124

125125
An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
126126
{%- endif %}

nf_core/pipeline-template/conf/test.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ params {
2727
// TODO nf-core: Give any required params for the test so that command line flags are not needed
2828
input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
2929

30-
{% if igenomes -%}
30+
{%- if igenomes -%}
31+
3132
// Genome references
3233
genome = 'R64-1-1'
3334
{%- endif %}

0 commit comments

Comments
 (0)