Skip to content

Commit 51bd3d9

Browse files
committed
loading older versions
1 parent d59f835 commit 51bd3d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pipeline/src/collection.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ def load(self, *paths):
160160
with open(path, "r") as fp:
161161
data = json.load(fp)
162162
if "@graph" in data:
163+
if data["@context"]["@vocab"].startswith("https://openminds.ebrains.eu/"):
164+
version="v3"
165+
else:
166+
version="latest"
163167
for item in data["@graph"]:
164168
if "@type" in item:
165-
cls = lookup_type(item["@type"])
169+
cls = lookup_type(item["@type"],version=version)
166170
node = cls.from_jsonld(item)
167171
else:
168172
# allow links to metadata instances outside this collection

0 commit comments

Comments
 (0)