From 6bc6ff2ac9ad316ddd2a713e41ba40a38d2f00c5 Mon Sep 17 00:00:00 2001 From: fynnbe Date: Mon, 8 Jul 2024 16:02:30 +0200 Subject: [PATCH] ignore all hidden folders (no concept starts with '.') --- bioimageio_collection_backoffice/remote_collection.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bioimageio_collection_backoffice/remote_collection.py b/bioimageio_collection_backoffice/remote_collection.py index 2b8e9257..e1a5e816 100644 --- a/bioimageio_collection_backoffice/remote_collection.py +++ b/bioimageio_collection_backoffice/remote_collection.py @@ -295,10 +295,12 @@ def get_concepts(self): RecordConcept(client=self.client, concept_id=concept_id) for d in self.client.ls("", only_folders=True) if (concept_id := d.strip("/")) not in self.partner_ids + and not d.startswith(".") ] + [ # resources in partner folders RecordConcept(client=self.client, concept_id=pid + "/" + d.strip("/")) for pid in self.partner_ids for d in self.client.ls(pid + "/", only_folders=True) + if not d.startswith(".") ] def _select_parts(self, type_: str): @@ -1134,7 +1136,11 @@ def create_collection_entries( VersionInfo( v=record_version.version, created=record_version.info.created, - doi=None if isinstance(record_version, RecordDraft) else record_version.info.doi, + doi=( + None + if isinstance(record_version, RecordDraft) + else record_version.info.doi + ), ) ) compat_reports = record_version.get_all_compatibility_reports()