Skip to content

Commit 3652437

Browse files
committed
update sparsemap schema
1 parent fa2a0c6 commit 3652437

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

config_schema/siibra/map/v0.0.1.json

+10-19
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@
1010
"parcellation": {
1111
"$ref": "config_schema/at_id.json"
1212
},
13-
"sparsemap": {
14-
"type": "object",
15-
"properties": {
16-
"is_sparsemap": {
17-
"type": "boolean"
18-
},
19-
"cached": {
20-
"type": "boolean"
21-
},
22-
"url": {
23-
"type": "string"
24-
}
25-
}
13+
"represented_as_sparsemap": {
14+
"type": "boolean"
2615
},
2716
"volumes": {
2817
"type": "array",
@@ -42,11 +31,12 @@
4231
"type": "number"
4332
},
4433
"label": {
45-
"anyOf": [{
46-
47-
}, {
48-
"type": "null"
49-
}]
34+
"anyOf": [
35+
{},
36+
{
37+
"type": "null"
38+
}
39+
]
5040
},
5141
"fragment": {
5242
"type": "string"
@@ -64,8 +54,9 @@
6454
"required": [
6555
"volumes",
6656
"@type",
57+
"@id",
6758
"space",
6859
"parcellation",
6960
"indices"
7061
]
71-
}
62+
}

siibra/configuration/factory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def build_map(cls, spec):
307307
spec, space_id=spec["space"].get("@id"), name_prefix=identifier
308308
)
309309

310-
if spec.get("sparsemap", {}).get("is_sparsemap"):
310+
if spec.get("represented_as_sparsemap", False):
311311
Maptype = sparsemap.SparseMap
312312
else:
313313
Maptype = parcellationmap.Map

0 commit comments

Comments
 (0)