Skip to content

Commit 55ca4d4

Browse files
authored
Merge pull request #3333 from mashehu/fix-duplicated-ro-crate-entries
2 parents 5497cac + 0e62e6e commit 55ca4d4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
- Remove toList() channel operation from inside onComplete block ([#3304](https://github.com/nf-core/tools/pull/3304))
6464
- build: Setup VS Code tests ([#3292](https://github.com/nf-core/tools/pull/3292))
6565
- Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332))
66+
- rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333))
6667

6768
### Version updates
6869

nf_core/pipelines/rocrate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ def set_main_entity(self, main_entity_filename: str):
216216
)
217217
self.crate.mainEntity.append_to("version", self.version, compact=True)
218218

219+
# remove duplicate entries for version
220+
self.crate.mainEntity["version"] = list(set(self.crate.mainEntity["version"]))
221+
219222
# get keywords from nf-core website
220223
remote_workflows = requests.get("https://nf-co.re/pipelines.json").json()["remote_workflows"]
221224
# go through all remote workflows and find the one that matches the pipeline name
@@ -236,6 +239,9 @@ def set_main_entity(self, main_entity_filename: str):
236239
self.crate.mainEntity.append_to("license", self.crate.license)
237240
self.crate.mainEntity.append_to("name", self.crate.name)
238241

242+
# remove duplicate entries for name
243+
self.crate.mainEntity["name"] = list(set(self.crate.mainEntity["name"]))
244+
239245
if "dev" in self.version:
240246
self.crate.creativeWorkStatus = "InProgress"
241247
else:

0 commit comments

Comments
 (0)