Skip to content

Commit 3c4fa81

Browse files
committed
rocrate: remove duplicated entries for name and version
1 parent 045aaec commit 3c4fa81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nf_core/pipelines/rocrate.py

+6
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)