Skip to content

Commit

Permalink
Merge branch 'dev' into version-badges
Browse files Browse the repository at this point in the history
  • Loading branch information
jfy133 authored Jan 21, 2025
2 parents 6586cc3 + 0716d91 commit 191d211
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:

run: |
pushd nf-core/${{ matrix.pipeline }}
defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2)
defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2 | sed "s/'//g")
if [ -z "$defaultBranch" ]; then
defaultBranch="master"
fi
Expand Down
29 changes: 20 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
# nf-core/tools: Changelog

## v3.1.2dev
## v3.2.0dev

### Template

- Add nf-core template version badges to README ([#3396](https://github.com/nf-core/tools/pull/3396))

### Linting

### Modules

### Subworkflows

### General

## [v3.1.2 - Brass Boxfish Patch](https://github.com/nf-core/tools/releases/tag/3.1.2) - [2025-01-20]

### Template

- Bump nf-schema to `2.3.0` ([#3401](https://github.com/nf-core/tools/pull/3401))
- Remove jinja formatting which was deleting line breaks ([#3405](https://github.com/nf-core/tools/pull/3405))

### Download

- Allow `nf-core pipelines download -r` to download commits ([#3374](https://github.com/nf-core/tools/pull/3374))
- 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))

### Linting

### Modules

- 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))

### Subworkflows
- 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))

### General

- Parameters schema validation: allow oneOf, anyOf and allOf with `required` ([#3386](https://github.com/nf-core/tools/pull/3386))
- `manifest.author` is not required anymore ([#3397](https://github.com/nf-core/tools/pull/3397))
- Parameters schema validation: allow `oneOf`, `anyOf` and `allOf` with `required` ([#3386](https://github.com/nf-core/tools/pull/3386))
- Run pre-comit when rendering template for pipelines sync ([#3371](https://github.com/nf-core/tools/pull/3371))

### Version updates
- Fix sync GHA by removing quotes from parsed branch name ([#3394](https://github.com/nf-core/tools/pull/3394))

## [v3.1.1 - Brass Boxfish Patch](https://github.com/nf-core/tools/releases/tag/3.1.1) - [2024-12-20]

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{%- endif %}

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

> 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.
Expand Down
6 changes: 3 additions & 3 deletions nf_core/pipeline-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</picture>
</h1>

{%- else -%}
{% else -%}

# {{ name }}

Expand Down Expand Up @@ -55,7 +55,7 @@
## Usage

> [!NOTE]
> 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 %}
> 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 %}
<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
Explain what rows and columns represent. For instance (please edit as appropriate):
Expand Down Expand Up @@ -121,7 +121,7 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
<!-- 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. -->
<!-- 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) -->

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

An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ manifest {
{% if nf_schema -%}
// Nextflow plugins
plugins {
id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id 'nf-schema@2.3.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

validation {
Expand Down
13 changes: 11 additions & 2 deletions nf_core/pipelines/lint/files_unchanged.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import filecmp
import logging
import os
import re
import shutil
import tempfile
from pathlib import Path
Expand Down Expand Up @@ -68,7 +69,10 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
could_fix: bool = False

# Check that we have the minimum required config
required_pipeline_config = {"manifest.name", "manifest.description", "manifest.author"}
required_pipeline_config = {
"manifest.name",
"manifest.description",
} # TODO: add "manifest.contributors" when minimum nextflow version is >=24.10.0
missing_pipeline_config = required_pipeline_config.difference(self.nf_config)
if missing_pipeline_config:
return {"ignored": [f"Required pipeline config not found - {missing_pipeline_config}"]}
Expand Down Expand Up @@ -117,10 +121,15 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]:
tmp_dir.mkdir(parents=True)

# Create a template.yaml file for the pipeline creation
if "manifest.author" in self.nf_config:
names = self.nf_config["manifest.author"].strip("\"'")
if "manifest.contributors" in self.nf_config:
contributors = self.nf_config["manifest.contributors"]
names = ", ".join(re.findall(r"name:'([^']+)'", contributors))
template_yaml = {
"name": short_name,
"description": self.nf_config["manifest.description"].strip("\"'"),
"author": self.nf_config["manifest.author"].strip("\"'"),
"author": names,
"org": prefix,
}

Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipelines/rocrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def add_main_authors(self, wf_file: rocrate.model.entity.Entity) -> None:
try:
git_contributors: Set[str] = set()
if self.pipeline_obj.repo is None:
log.info("No git repository found. No git contributors will be added as authors.")
log.debug("No git repository found. No git contributors will be added as authors.")
return
commits_touching_path = list(self.pipeline_obj.repo.iter_commits(paths="main.nf"))

Expand Down
6 changes: 5 additions & 1 deletion nf_core/pipelines/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def __init__(
self.made_changes = False
self.make_pr = make_pr
self.gh_pr_returned_data: Dict = {}
self.required_config_vars = ["manifest.name", "manifest.description", "manifest.version", "manifest.author"]
self.required_config_vars = [
"manifest.name",
"manifest.description",
"manifest.version",
] # TODO: add "manifest.contributors" when minimum nextflow version is >=24.10.0
self.force_pr = force_pr

self.gh_username = gh_username
Expand Down
4 changes: 3 additions & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,8 +1352,10 @@ def load_tools_config(directory: Union[str, Path] = ".") -> Tuple[Optional[Path]
contributors = wf_config["manifest.contributors"]
names = re.findall(r"name:'([^']+)'", contributors)
author_names = ", ".join(names)
else:
elif "manifest.author" in wf_config:
author_names = wf_config["manifest.author"].strip("'\"")
else:
author_names = None
if nf_core_yaml_config.template is None:
# The .nf-core.yml file did not contain template information
nf_core_yaml_config.template = NFCoreTemplateConfig(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import find_packages, setup

version = "3.1.2dev"
version = "3.2.0dev"

with open("README.md") as f:
readme = f.read()
Expand Down

0 comments on commit 191d211

Please sign in to comment.