Skip to content

Commit b6c038c

Browse files
committed
Merge branch 'dev' into fix/1927
* dev: only add entry to files remove remaining print [automated] Update CHANGELOG.md fix edam BAM link on modules template add ontologies to meta.yml if not present [automated] Update CHANGELOG.md [automated] Update CHANGELOG.md docs: fix contributing link in the main README fix: linting with comments after the input directive
2 parents 04b26bb + d4f99fc commit b6c038c

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
### Linting
1111

1212
- Add linting for ifEmpty(null) ([#3411](https://github.com/nf-core/tools/pull/3411))
13+
- fix: linting with comments after the input directive ([#3458](https://github.com/nf-core/tools/pull/3458))
14+
- EDAM ontology fixes ([#3460](https://github.com/nf-core/tools/pull/3460))
1315

1416
### Modules
1517

@@ -26,6 +28,7 @@
2628
- Update prettier to 3.5.0 ([#3448](https://github.com/nf-core/tools/pull/3448))
2729
- chore(deps): update python:3.12-slim docker digest to 34656cd ([#3450](https://github.com/nf-core/tools/pull/3450))
2830
- Remove Twitter from README ([#3454](https://github.com/nf-core/tools/pull/3454))
31+
- docs: fix contributing link in the main README ([#3459](https://github.com/nf-core/tools/pull/3459))
2932
- Continuation of #3083 ([#3456](https://github.com/nf-core/tools/pull/3456))
3033

3134
## [v3.2.0 - Pewter Pangolin](https://github.com/nf-core/tools/releases/tag/3.2.0) - [2025-01-27]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pip install --upgrade -r requirements-dev.txt -e .
6161

6262
## Contributions and Support
6363

64-
If you would like to contribute to this package, please see the [contributing guidelines](.github/CONTRIBUTING.md).
64+
If you would like to contribute to this package, please see the [contributing guidelines](CONTRIBUTING.md).
6565

6666
For further information or help, don't hesitate to get in touch on the [Slack `#tools` channel](https://nfcore.slack.com/channels/tools) (you can join with [this invite](https://nf-co.re/join/slack)).
6767

nf_core/components/nfcore_component.py

+1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def get_inputs_from_main_nf(self) -> None:
206206
input_data = data.split("input:")[1].split("output:")[0]
207207
for line in input_data.split("\n"):
208208
channel_elements: Any = []
209+
line = line.split("//")[0] # remove any trailing comments
209210
regex = r"(val|path)\s*(\(([^)]+)\)|\s*([^)\s,]+))"
210211
matches = re.finditer(regex, line)
211212
for _, match in enumerate(matches, start=1):

nf_core/module-template/meta.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ input:
6262
pattern: {{ '"*.{bam,cram,sam}"' if not_empty_template else "" }}
6363
ontologies:
6464
{% if not_empty_template -%}
65-
- edam: "http://edamontology.org/format_25722" # BAM
65+
- edam: "http://edamontology.org/format_2572" # BAM
6666
- edam: "http://edamontology.org/format_2573" # CRAM
6767
- edam: "http://edamontology.org/format_3462" # SAM
6868
{% else -%}
@@ -112,7 +112,7 @@ output:
112112
pattern: {{ '"*.{bam,cram,sam}"' if not_empty_template else "" }}
113113
ontologies:
114114
{% if not_empty_template -%}
115-
- edam: "http://edamontology.org/format_25722" # BAM
115+
- edam: "http://edamontology.org/format_2572" # BAM
116116
- edam: "http://edamontology.org/format_2573" # CRAM
117117
- edam: "http://edamontology.org/format_3462" # SAM
118118
{% else -%}

nf_core/modules/lint/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ def update_meta_yml_file(self, mod):
394394
if "ontologies" in corrected_meta_yml["input"][i][j][element_name]:
395395
for ontology in corrected_meta_yml["input"][i][j][element_name]["ontologies"]:
396396
current_ontologies_i.append(ontology["edam"])
397+
elif corrected_meta_yml["input"][i][j][element_name]["type"] == "file":
398+
corrected_meta_yml["input"][i][j][element_name]["ontologies"] = []
397399
log.debug(f"expected ontologies for input: {expected_ontologies_i}")
398400
log.debug(f"current ontologies for input: {current_ontologies_i}")
399401
for ontology, ext in expected_ontologies_i:
@@ -404,7 +406,6 @@ def update_meta_yml_file(self, mod):
404406
corrected_meta_yml["input"][i][j][element_name]["ontologies"][-1].yaml_add_eol_comment(
405407
f"{edam_formats[ext][1]}", "edam"
406408
)
407-
print(f"added comment {edam_formats[ext][1]}")
408409
if "output" in meta_yml:
409410
for i, channel in enumerate(corrected_meta_yml["output"]):
410411
ch_name = list(channel.keys())[0]
@@ -420,6 +421,8 @@ def update_meta_yml_file(self, mod):
420421
if "ontologies" in corrected_meta_yml["output"][i][ch_name][j][element_name]:
421422
for ontology in corrected_meta_yml["output"][i][ch_name][j][element_name]["ontologies"]:
422423
current_ontologies_o.append(ontology["edam"])
424+
elif corrected_meta_yml["output"][i][ch_name][j][element_name]["type"] == "file":
425+
corrected_meta_yml["output"][i][ch_name][j][element_name]["ontologies"] = []
423426
log.debug(f"expected ontologies for output: {expected_ontologies_o}")
424427
log.debug(f"current ontologies for output: {current_ontologies_o}")
425428
for ontology, ext in expected_ontologies_o:

0 commit comments

Comments
 (0)