Skip to content

Commit

Permalink
rocrate: remove duplicated entries for name and version
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Dec 9, 2024
1 parent 045aaec commit 3c4fa81
Showing 1 changed file with 6 additions and 0 deletions.
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 3c4fa81

Please sign in to comment.