vfbquery 0.3.3__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vfbquery-0.3.3 → vfbquery-0.4.0}/PKG-INFO +39 -40
- {vfbquery-0.3.3 → vfbquery-0.4.0}/README.md +39 -40
- {vfbquery-0.3.3 → vfbquery-0.4.0}/setup.py +1 -1
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/test/term_info_queries_test.py +64 -9
- vfbquery-0.4.0/src/test/test_default_caching.py +173 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/test/test_examples_diff.py +6 -1
- vfbquery-0.4.0/src/vfbquery/__init__.py +65 -0
- vfbquery-0.4.0/src/vfbquery/cache_enhancements.py +465 -0
- vfbquery-0.4.0/src/vfbquery/cached_functions.py +227 -0
- vfbquery-0.4.0/src/vfbquery/solr_cache_integration.py +212 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery/solr_fetcher.py +47 -3
- vfbquery-0.4.0/src/vfbquery/solr_result_cache.py +613 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery/term_info_queries.py +18 -2
- vfbquery-0.4.0/src/vfbquery/test_utils.py +146 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery/vfb_queries.py +325 -54
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery.egg-info/PKG-INFO +39 -40
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery.egg-info/SOURCES.txt +5 -0
- vfbquery-0.3.3/src/vfbquery/__init__.py +0 -4
- vfbquery-0.3.3/src/vfbquery/test_utils.py +0 -39
- {vfbquery-0.3.3 → vfbquery-0.4.0}/LICENSE +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/pyproject.toml +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/setup.cfg +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/test/__init__.py +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/test/readme_parser.py +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery.egg-info/dependency_links.txt +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery.egg-info/requires.txt +0 -0
- {vfbquery-0.3.3 → vfbquery-0.4.0}/src/vfbquery.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vfbquery
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Wrapper for querying VirtualFlyBrain knowledge graph.
|
|
5
5
|
Home-page: https://github.com/VirtualFlyBrain/VFBquery
|
|
6
6
|
Author: VirtualFlyBrain
|
|
@@ -53,7 +53,7 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
53
53
|
"Meta": {
|
|
54
54
|
"Name": "[medulla](FBbt_00003748)",
|
|
55
55
|
"Description": "The second optic neuropil, sandwiched between the lamina and the lobula complex. It is divided into 10 layers: 1-6 make up the outer (distal) medulla, the seventh (or serpentine) layer exhibits a distinct architecture and layers 8-10 make up the inner (proximal) medulla (Ito et al., 2014).",
|
|
56
|
-
"Comment": "",
|
|
56
|
+
"Comment": "Nern et al. (2025) - doi:10.1038/s41586-025-08746-0 say distal is M1-5 and M6-7 is central medulla.",
|
|
57
57
|
"Types": "[anterior ectoderm derivative](FBbt_00025991); [synaptic neuropil domain](FBbt_00040007)",
|
|
58
58
|
"Relationships": "[develops from](RO_0002202): [medulla anlage](FBbt_00001935); [is part of](BFO_0000050): [adult optic lobe](FBbt_00003701)"
|
|
59
59
|
},
|
|
@@ -117,25 +117,25 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
117
117
|
"id": "VFB_00102107",
|
|
118
118
|
"label": "[ME on JRC2018Unisex adult brain](VFB_00102107)",
|
|
119
119
|
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
120
|
-
"thumbnail": "[](VFB_00101567,VFB_00102107)"
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
"id": "VFB_00101385",
|
|
124
124
|
"label": "[ME%28R%29 on JRC_FlyEM_Hemibrain](VFB_00101385)",
|
|
125
125
|
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
126
|
-
"thumbnail": "[ on JRC_FlyEM_Hemibrain aligned to JRC_FlyEM_Hemibrain')](VFB_00101384,VFB_00101385)"
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"id": "VFB_00030810",
|
|
130
130
|
"label": "[medulla on adult brain template Ito2014](VFB_00030810)",
|
|
131
|
-
"tags": "Nervous_system|Visual_system|
|
|
131
|
+
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
132
132
|
"thumbnail": "[](VFB_00030786,VFB_00030810)"
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"id": "VFB_00030624",
|
|
136
136
|
"label": "[medulla on adult brain template JFRC2](VFB_00030624)",
|
|
137
|
-
"tags": "Nervous_system|Visual_system|
|
|
138
|
-
"thumbnail": "[](VFB_00017894,VFB_00030624)"
|
|
137
|
+
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
138
|
+
"thumbnail": "[](VFB_00017894,VFB_00030624)"
|
|
139
139
|
}
|
|
140
140
|
]
|
|
141
141
|
},
|
|
@@ -143,20 +143,9 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
143
143
|
"count": 4
|
|
144
144
|
}
|
|
145
145
|
],
|
|
146
|
-
"IsIndividual":
|
|
147
|
-
"IsClass":
|
|
146
|
+
"IsIndividual": false,
|
|
147
|
+
"IsClass": true,
|
|
148
148
|
"Examples": {
|
|
149
|
-
"VFB_00017894": [
|
|
150
|
-
{
|
|
151
|
-
"id": "VFB_00030624",
|
|
152
|
-
"label": "medulla on adult brain template JFRC2",
|
|
153
|
-
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnail.png",
|
|
154
|
-
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnailT.png",
|
|
155
|
-
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.nrrd",
|
|
156
|
-
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.wlz",
|
|
157
|
-
"obj": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume_man.obj"
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
149
|
"VFB_00101384": [
|
|
161
150
|
{
|
|
162
151
|
"id": "VFB_00101385",
|
|
@@ -179,6 +168,17 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
179
168
|
"obj": "https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume_man.obj"
|
|
180
169
|
}
|
|
181
170
|
],
|
|
171
|
+
"VFB_00017894": [
|
|
172
|
+
{
|
|
173
|
+
"id": "VFB_00030624",
|
|
174
|
+
"label": "medulla on adult brain template JFRC2",
|
|
175
|
+
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnail.png",
|
|
176
|
+
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnailT.png",
|
|
177
|
+
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.nrrd",
|
|
178
|
+
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.wlz",
|
|
179
|
+
"obj": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume_man.obj"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
182
|
"VFB_00030786": [
|
|
183
183
|
{
|
|
184
184
|
"id": "VFB_00030810",
|
|
@@ -191,7 +191,7 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
191
191
|
}
|
|
192
192
|
]
|
|
193
193
|
},
|
|
194
|
-
"IsTemplate":
|
|
194
|
+
"IsTemplate": false,
|
|
195
195
|
"Synonyms": [
|
|
196
196
|
{
|
|
197
197
|
"label": "ME",
|
|
@@ -323,14 +323,14 @@ vfb.get_term_info('VFB_00000001')
|
|
|
323
323
|
"score": "0.61",
|
|
324
324
|
"name": "[fru-M-000204](VFB_00000333)",
|
|
325
325
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
326
|
-
"thumbnail": "[](VFB_00017894,VFB_00000333)"
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
"id": "VFB_00000333",
|
|
330
330
|
"score": "0.61",
|
|
331
331
|
"name": "[fru-M-000204](VFB_00000333)",
|
|
332
332
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
333
|
-
"thumbnail": "[](VFB_00101567,VFB_00000333)"
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
"id": "VFB_00002439",
|
|
@@ -347,32 +347,20 @@ vfb.get_term_info('VFB_00000001')
|
|
|
347
347
|
"thumbnail": "[](VFB_00017894,VFB_00002439)"
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
|
-
"id": "
|
|
350
|
+
"id": "VFB_00000845",
|
|
351
351
|
"score": "0.59",
|
|
352
|
-
"name": "[fru-M-
|
|
352
|
+
"name": "[fru-M-100191](VFB_00000845)",
|
|
353
353
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
354
|
-
"thumbnail": "[](VFB_00101567,VFB_00000845)"
|
|
355
355
|
}
|
|
356
356
|
]
|
|
357
357
|
},
|
|
358
358
|
"output_format": "table",
|
|
359
|
-
"count":
|
|
359
|
+
"count": 60
|
|
360
360
|
}
|
|
361
361
|
],
|
|
362
362
|
"IsIndividual": True,
|
|
363
363
|
"Images": {
|
|
364
|
-
"VFB_00101567": [
|
|
365
|
-
{
|
|
366
|
-
"id": "VFB_00000001",
|
|
367
|
-
"label": "fru-M-200266",
|
|
368
|
-
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnail.png",
|
|
369
|
-
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnailT.png",
|
|
370
|
-
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.nrrd",
|
|
371
|
-
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.wlz",
|
|
372
|
-
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.obj",
|
|
373
|
-
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.swc"
|
|
374
|
-
}
|
|
375
|
-
],
|
|
376
364
|
"VFB_00017894": [
|
|
377
365
|
{
|
|
378
366
|
"id": "VFB_00000001",
|
|
@@ -384,6 +372,18 @@ vfb.get_term_info('VFB_00000001')
|
|
|
384
372
|
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00017894/volume.obj",
|
|
385
373
|
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00017894/volume.swc"
|
|
386
374
|
}
|
|
375
|
+
],
|
|
376
|
+
"VFB_00101567": [
|
|
377
|
+
{
|
|
378
|
+
"id": "VFB_00000001",
|
|
379
|
+
"label": "fru-M-200266",
|
|
380
|
+
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnail.png",
|
|
381
|
+
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnailT.png",
|
|
382
|
+
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.nrrd",
|
|
383
|
+
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.wlz",
|
|
384
|
+
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.obj",
|
|
385
|
+
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.swc"
|
|
386
|
+
}
|
|
387
387
|
]
|
|
388
388
|
},
|
|
389
389
|
"IsClass": False,
|
|
@@ -405,7 +405,6 @@ Template example:
|
|
|
405
405
|
```python
|
|
406
406
|
vfb.get_term_info('VFB_00101567')
|
|
407
407
|
```
|
|
408
|
-
|
|
409
408
|
```json
|
|
410
409
|
{
|
|
411
410
|
"Name": "JRC2018U",
|
|
@@ -33,7 +33,7 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
33
33
|
"Meta": {
|
|
34
34
|
"Name": "[medulla](FBbt_00003748)",
|
|
35
35
|
"Description": "The second optic neuropil, sandwiched between the lamina and the lobula complex. It is divided into 10 layers: 1-6 make up the outer (distal) medulla, the seventh (or serpentine) layer exhibits a distinct architecture and layers 8-10 make up the inner (proximal) medulla (Ito et al., 2014).",
|
|
36
|
-
"Comment": "",
|
|
36
|
+
"Comment": "Nern et al. (2025) - doi:10.1038/s41586-025-08746-0 say distal is M1-5 and M6-7 is central medulla.",
|
|
37
37
|
"Types": "[anterior ectoderm derivative](FBbt_00025991); [synaptic neuropil domain](FBbt_00040007)",
|
|
38
38
|
"Relationships": "[develops from](RO_0002202): [medulla anlage](FBbt_00001935); [is part of](BFO_0000050): [adult optic lobe](FBbt_00003701)"
|
|
39
39
|
},
|
|
@@ -97,25 +97,25 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
97
97
|
"id": "VFB_00102107",
|
|
98
98
|
"label": "[ME on JRC2018Unisex adult brain](VFB_00102107)",
|
|
99
99
|
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
100
|
-
"thumbnail": "[](VFB_00101567,VFB_00102107)"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"id": "VFB_00101385",
|
|
104
104
|
"label": "[ME%28R%29 on JRC_FlyEM_Hemibrain](VFB_00101385)",
|
|
105
105
|
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
106
|
-
"thumbnail": "[ on JRC_FlyEM_Hemibrain aligned to JRC_FlyEM_Hemibrain')](VFB_00101384,VFB_00101385)"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"id": "VFB_00030810",
|
|
110
110
|
"label": "[medulla on adult brain template Ito2014](VFB_00030810)",
|
|
111
|
-
"tags": "Nervous_system|Visual_system|
|
|
111
|
+
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
112
112
|
"thumbnail": "[](VFB_00030786,VFB_00030810)"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"id": "VFB_00030624",
|
|
116
116
|
"label": "[medulla on adult brain template JFRC2](VFB_00030624)",
|
|
117
|
-
"tags": "Nervous_system|Visual_system|
|
|
118
|
-
"thumbnail": "[](VFB_00017894,VFB_00030624)"
|
|
117
|
+
"tags": "Nervous_system|Adult|Visual_system|Synaptic_neuropil_domain",
|
|
118
|
+
"thumbnail": "[](VFB_00017894,VFB_00030624)"
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
},
|
|
@@ -123,20 +123,9 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
123
123
|
"count": 4
|
|
124
124
|
}
|
|
125
125
|
],
|
|
126
|
-
"IsIndividual":
|
|
127
|
-
"IsClass":
|
|
126
|
+
"IsIndividual": false,
|
|
127
|
+
"IsClass": true,
|
|
128
128
|
"Examples": {
|
|
129
|
-
"VFB_00017894": [
|
|
130
|
-
{
|
|
131
|
-
"id": "VFB_00030624",
|
|
132
|
-
"label": "medulla on adult brain template JFRC2",
|
|
133
|
-
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnail.png",
|
|
134
|
-
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnailT.png",
|
|
135
|
-
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.nrrd",
|
|
136
|
-
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.wlz",
|
|
137
|
-
"obj": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume_man.obj"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
129
|
"VFB_00101384": [
|
|
141
130
|
{
|
|
142
131
|
"id": "VFB_00101385",
|
|
@@ -159,6 +148,17 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
159
148
|
"obj": "https://www.virtualflybrain.org/data/VFB/i/0010/2107/VFB_00101567/volume_man.obj"
|
|
160
149
|
}
|
|
161
150
|
],
|
|
151
|
+
"VFB_00017894": [
|
|
152
|
+
{
|
|
153
|
+
"id": "VFB_00030624",
|
|
154
|
+
"label": "medulla on adult brain template JFRC2",
|
|
155
|
+
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnail.png",
|
|
156
|
+
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/thumbnailT.png",
|
|
157
|
+
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.nrrd",
|
|
158
|
+
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume.wlz",
|
|
159
|
+
"obj": "https://www.virtualflybrain.org/data/VFB/i/0003/0624/VFB_00017894/volume_man.obj"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
162
|
"VFB_00030786": [
|
|
163
163
|
{
|
|
164
164
|
"id": "VFB_00030810",
|
|
@@ -171,7 +171,7 @@ vfb.get_term_info('FBbt_00003748')
|
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
},
|
|
174
|
-
"IsTemplate":
|
|
174
|
+
"IsTemplate": false,
|
|
175
175
|
"Synonyms": [
|
|
176
176
|
{
|
|
177
177
|
"label": "ME",
|
|
@@ -303,14 +303,14 @@ vfb.get_term_info('VFB_00000001')
|
|
|
303
303
|
"score": "0.61",
|
|
304
304
|
"name": "[fru-M-000204](VFB_00000333)",
|
|
305
305
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
306
|
-
"thumbnail": "[](VFB_00017894,VFB_00000333)"
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"id": "VFB_00000333",
|
|
310
310
|
"score": "0.61",
|
|
311
311
|
"name": "[fru-M-000204](VFB_00000333)",
|
|
312
312
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
313
|
-
"thumbnail": "[](VFB_00101567,VFB_00000333)"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"id": "VFB_00002439",
|
|
@@ -327,32 +327,20 @@ vfb.get_term_info('VFB_00000001')
|
|
|
327
327
|
"thumbnail": "[](VFB_00017894,VFB_00002439)"
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
|
-
"id": "
|
|
330
|
+
"id": "VFB_00000845",
|
|
331
331
|
"score": "0.59",
|
|
332
|
-
"name": "[fru-M-
|
|
332
|
+
"name": "[fru-M-100191](VFB_00000845)",
|
|
333
333
|
"tags": "Expression_pattern_fragment|Neuron|Adult|lineage_CM3",
|
|
334
|
-
"thumbnail": "[](VFB_00101567,VFB_00000845)"
|
|
335
335
|
}
|
|
336
336
|
]
|
|
337
337
|
},
|
|
338
338
|
"output_format": "table",
|
|
339
|
-
"count":
|
|
339
|
+
"count": 60
|
|
340
340
|
}
|
|
341
341
|
],
|
|
342
342
|
"IsIndividual": True,
|
|
343
343
|
"Images": {
|
|
344
|
-
"VFB_00101567": [
|
|
345
|
-
{
|
|
346
|
-
"id": "VFB_00000001",
|
|
347
|
-
"label": "fru-M-200266",
|
|
348
|
-
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnail.png",
|
|
349
|
-
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnailT.png",
|
|
350
|
-
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.nrrd",
|
|
351
|
-
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.wlz",
|
|
352
|
-
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.obj",
|
|
353
|
-
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.swc"
|
|
354
|
-
}
|
|
355
|
-
],
|
|
356
344
|
"VFB_00017894": [
|
|
357
345
|
{
|
|
358
346
|
"id": "VFB_00000001",
|
|
@@ -364,6 +352,18 @@ vfb.get_term_info('VFB_00000001')
|
|
|
364
352
|
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00017894/volume.obj",
|
|
365
353
|
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00017894/volume.swc"
|
|
366
354
|
}
|
|
355
|
+
],
|
|
356
|
+
"VFB_00101567": [
|
|
357
|
+
{
|
|
358
|
+
"id": "VFB_00000001",
|
|
359
|
+
"label": "fru-M-200266",
|
|
360
|
+
"thumbnail": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnail.png",
|
|
361
|
+
"thumbnail_transparent": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/thumbnailT.png",
|
|
362
|
+
"nrrd": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.nrrd",
|
|
363
|
+
"wlz": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.wlz",
|
|
364
|
+
"obj": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.obj",
|
|
365
|
+
"swc": "https://www.virtualflybrain.org/data/VFB/i/0000/0001/VFB_00101567/volume.swc"
|
|
366
|
+
}
|
|
367
367
|
]
|
|
368
368
|
},
|
|
369
369
|
"IsClass": False,
|
|
@@ -385,7 +385,6 @@ Template example:
|
|
|
385
385
|
```python
|
|
386
386
|
vfb.get_term_info('VFB_00101567')
|
|
387
387
|
```
|
|
388
|
-
|
|
389
388
|
```json
|
|
390
389
|
{
|
|
391
390
|
"Name": "JRC2018U",
|
|
@@ -1293,4 +1292,4 @@ vfb.get_templates(return_dataframe=False)
|
|
|
1293
1292
|
],
|
|
1294
1293
|
"count": 10
|
|
1295
1294
|
}
|
|
1296
|
-
```
|
|
1295
|
+
```
|
|
@@ -64,7 +64,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
64
64
|
|
|
65
65
|
self.assertEqual(0, len(terminfo.xrefs))
|
|
66
66
|
|
|
67
|
-
self.assertEqual(
|
|
67
|
+
self.assertEqual(7, len(terminfo.pub_syn))
|
|
68
68
|
|
|
69
69
|
# Check that we have the expected synonym labels (order-independent)
|
|
70
70
|
synonym_labels = [entry.synonym.label for entry in terminfo.pub_syn]
|
|
@@ -145,7 +145,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
145
145
|
self.assertFalse("link" in serialized)
|
|
146
146
|
self.assertEqual(4, len(serialized["types"]))
|
|
147
147
|
self.assertTrue("Anatomy" in serialized["types"])
|
|
148
|
-
self.assertEqual("Cyst composed of two cyst cells following the division of a newly-formed cystoblast in the germarium. The two cells are connected by a cytoplasmic bridge.\n([
|
|
148
|
+
self.assertEqual("Cyst composed of two cyst cells following the division of a newly-formed cystoblast in the germarium. The two cells are connected by a cytoplasmic bridge.\n([King, 1970](FBrf0021038))", serialized["description"])
|
|
149
149
|
self.assertTrue("synonyms" in serialized)
|
|
150
150
|
self.assertEqual(1, len(serialized["synonyms"]))
|
|
151
151
|
self.assertEqual("has_exact_synonym: germarial 2-cell cluster ([King, 1970](FBrf0021038))", serialized["synonyms"][0])
|
|
@@ -166,13 +166,10 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
166
166
|
self.assertFalse("examples" in serialized)
|
|
167
167
|
self.assertFalse("thumbnail" in serialized)
|
|
168
168
|
self.assertTrue("references" in serialized)
|
|
169
|
-
self.assertEqual(
|
|
170
|
-
self.assertEqual({'link': '[Spradling, 1993, Bate, Martinez Arias, 1993: 1--70](FBrf0064777)',
|
|
171
|
-
'refs': ['http://flybase.org/reports/FBrf0064777'],
|
|
172
|
-
'types': ' pub'}, serialized["references"][0])
|
|
169
|
+
self.assertEqual(1, len(serialized["references"]))
|
|
173
170
|
self.assertEqual({'link': '[King, 1970, Ovarian Development in Drosophila melanogaster. ](FBrf0021038)',
|
|
174
171
|
'refs': ['http://flybase.org/reports/FBrf0021038'],
|
|
175
|
-
'types': ' pub'}, serialized["references"][
|
|
172
|
+
'types': ' pub'}, serialized["references"][0])
|
|
176
173
|
self.assertFalse("targetingSplits" in serialized)
|
|
177
174
|
self.assertFalse("targetingNeurons" in serialized)
|
|
178
175
|
|
|
@@ -261,7 +258,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
261
258
|
self.assertTrue("Turner-Evans et al., 2020" in description)
|
|
262
259
|
|
|
263
260
|
self.assertTrue("synonyms" in serialized)
|
|
264
|
-
self.assertEqual(
|
|
261
|
+
self.assertEqual(10, len(serialized["synonyms"]))
|
|
265
262
|
print(serialized["synonyms"][0])
|
|
266
263
|
self.assertTrue("has_exact_synonym: EB-PB 1 glomerulus-D/Vgall neuron" in serialized["synonyms"])
|
|
267
264
|
self.assertFalse("source" in serialized)
|
|
@@ -293,7 +290,7 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
293
290
|
self.assertFalse("thumbnail" in serialized)
|
|
294
291
|
|
|
295
292
|
self.assertTrue("references" in serialized)
|
|
296
|
-
self.assertEqual(
|
|
293
|
+
self.assertEqual(7, len(serialized["references"]))
|
|
297
294
|
|
|
298
295
|
self.assertTrue("targetingSplits" in serialized)
|
|
299
296
|
self.assertEqual(6, len(serialized["targetingSplits"]))
|
|
@@ -527,6 +524,64 @@ class TermInfoQueriesTest(unittest.TestCase):
|
|
|
527
524
|
self.assertFalse("filemeta" in serialized)
|
|
528
525
|
self.assertFalse("template" in serialized)
|
|
529
526
|
|
|
527
|
+
def test_term_info_performance(self):
|
|
528
|
+
"""
|
|
529
|
+
Performance test for specific term info queries.
|
|
530
|
+
Tests the execution time for FBbt_00003748 and VFB_00101567.
|
|
531
|
+
"""
|
|
532
|
+
import vfbquery as vfb
|
|
533
|
+
|
|
534
|
+
# Test performance for FBbt_00003748 (mushroom body)
|
|
535
|
+
start_time = time.time()
|
|
536
|
+
result_1 = vfb.get_term_info('FBbt_00003748')
|
|
537
|
+
duration_1 = time.time() - start_time
|
|
538
|
+
|
|
539
|
+
# Test performance for VFB_00101567 (individual anatomy)
|
|
540
|
+
start_time = time.time()
|
|
541
|
+
result_2 = vfb.get_term_info('VFB_00101567')
|
|
542
|
+
duration_2 = time.time() - start_time
|
|
543
|
+
|
|
544
|
+
# Print performance metrics for GitHub Actions logs
|
|
545
|
+
print(f"\n" + "="*50)
|
|
546
|
+
print(f"Performance Test Results:")
|
|
547
|
+
print(f"="*50)
|
|
548
|
+
print(f"FBbt_00003748 query took: {duration_1:.4f} seconds")
|
|
549
|
+
print(f"VFB_00101567 query took: {duration_2:.4f} seconds")
|
|
550
|
+
print(f"Total time for both queries: {duration_1 + duration_2:.4f} seconds")
|
|
551
|
+
|
|
552
|
+
# Performance categories
|
|
553
|
+
total_time = duration_1 + duration_2
|
|
554
|
+
if total_time < 1.0:
|
|
555
|
+
performance_level = "🟢 Excellent (< 1 second)"
|
|
556
|
+
elif total_time < 2.0:
|
|
557
|
+
performance_level = "🟡 Good (1-2 seconds)"
|
|
558
|
+
elif total_time < 4.0:
|
|
559
|
+
performance_level = "🟠 Acceptable (2-4 seconds)"
|
|
560
|
+
else:
|
|
561
|
+
performance_level = "🔴 Slow (> 4 seconds)"
|
|
562
|
+
|
|
563
|
+
print(f"Performance Level: {performance_level}")
|
|
564
|
+
print(f"="*50)
|
|
565
|
+
|
|
566
|
+
# Basic assertions to ensure the queries succeeded
|
|
567
|
+
self.assertIsNotNone(result_1, "FBbt_00003748 query returned None")
|
|
568
|
+
self.assertIsNotNone(result_2, "VFB_00101567 query returned None")
|
|
569
|
+
|
|
570
|
+
# Performance assertions - fail if queries take too long
|
|
571
|
+
# These thresholds are based on observed performance characteristics
|
|
572
|
+
max_single_query_time = 2.0 # seconds
|
|
573
|
+
max_total_time = 4.0 # seconds (2 queries * 2 seconds each)
|
|
574
|
+
|
|
575
|
+
self.assertLess(duration_1, max_single_query_time,
|
|
576
|
+
f"FBbt_00003748 query took {duration_1:.4f}s, exceeding {max_single_query_time}s threshold")
|
|
577
|
+
self.assertLess(duration_2, max_single_query_time,
|
|
578
|
+
f"VFB_00101567 query took {duration_2:.4f}s, exceeding {max_single_query_time}s threshold")
|
|
579
|
+
self.assertLess(duration_1 + duration_2, max_total_time,
|
|
580
|
+
f"Total query time {duration_1 + duration_2:.4f}s exceeds {max_total_time}s threshold")
|
|
581
|
+
|
|
582
|
+
# Log success
|
|
583
|
+
print("Performance test completed successfully!")
|
|
584
|
+
|
|
530
585
|
|
|
531
586
|
class TestVariable:
|
|
532
587
|
|