Skip to content

Commit

Permalink
Merge pull request #3333 from mashehu/fix-duplicated-ro-crate-entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu authored Dec 9, 2024
2 parents 5497cac + 0e62e6e commit 55ca4d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
- Remove toList() channel operation from inside onComplete block ([#3304](https://github.com/nf-core/tools/pull/3304))
- build: Setup VS Code tests ([#3292](https://github.com/nf-core/tools/pull/3292))
- Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332))
- rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333))

### Version updates

Expand Down
6 changes: 6 additions & 0 deletions nf_core/pipelines/rocrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ def set_main_entity(self, main_entity_filename: str):
)
self.crate.mainEntity.append_to("version", self.version, compact=True)

# remove duplicate entries for version
self.crate.mainEntity["version"] = list(set(self.crate.mainEntity["version"]))

# get keywords from nf-core website
remote_workflows = requests.get("https://nf-co.re/pipelines.json").json()["remote_workflows"]
# go through all remote workflows and find the one that matches the pipeline name
Expand All @@ -236,6 +239,9 @@ def set_main_entity(self, main_entity_filename: str):
self.crate.mainEntity.append_to("license", self.crate.license)
self.crate.mainEntity.append_to("name", self.crate.name)

# remove duplicate entries for name
self.crate.mainEntity["name"] = list(set(self.crate.mainEntity["name"]))

if "dev" in self.version:
self.crate.creativeWorkStatus = "InProgress"
else:
Expand Down

0 comments on commit 55ca4d4

Please sign in to comment.