Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocrate: remove duplicated entries for name and version #3333

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading