obi-notebook 0.2.dev1__tar.gz → 0.2.dev2__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.
Files changed (22) hide show
  1. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/PKG-INFO +1 -1
  2. obi_notebook-0.2.dev2/example.ipynb +333 -0
  3. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook/get_entities.py +1 -1
  4. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook.egg-info/PKG-INFO +1 -1
  5. obi_notebook-0.2.dev1/example.ipynb +0 -183
  6. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/.github/workflows/sdist.yml +0 -0
  7. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/.github/workflows/tox.yml +0 -0
  8. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/.gitignore +0 -0
  9. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/CHANGELOG.rst +0 -0
  10. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/LICENSE.txt +0 -0
  11. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/README.md +0 -0
  12. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/demo.gif +0 -0
  13. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/pyproject.toml +0 -0
  14. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/setup.cfg +0 -0
  15. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook/__init__.py +0 -0
  16. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook/get_projects.py +0 -0
  17. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook.egg-info/SOURCES.txt +0 -0
  18. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook.egg-info/dependency_links.txt +0 -0
  19. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook.egg-info/requires.txt +0 -0
  20. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/src/obi_notebook.egg-info/top_level.txt +0 -0
  21. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/tox.ini +0 -0
  22. {obi_notebook-0.2.dev1 → obi_notebook-0.2.dev2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: obi_notebook
3
- Version: 0.2.dev1
3
+ Version: 0.2.dev2
4
4
  Summary: convenience functions for OBI notebooks
5
5
  Author-email: Open Brain Institute <jean-denis.courcol@epfl.ch>
6
6
  Maintainer-email: Open Brain Institute <jean-denis.courcol@epfl.ch>
@@ -0,0 +1,333 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "7eb47475-67c6-499a-a2b4-19f8a64974d0",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import obi_auth\n",
11
+ "\n",
12
+ "from obi_notebook import get_entities, get_projects\n",
13
+ "\n",
14
+ "environment_str = \"staging\""
15
+ ]
16
+ },
17
+ {
18
+ "cell_type": "markdown",
19
+ "id": "4d984b92-cadd-4b07-9813-b2333272610f",
20
+ "metadata": {},
21
+ "source": [
22
+ "get authentication token for production"
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "code",
27
+ "execution_count": 2,
28
+ "id": "323cb45c-91e3-451f-8a80-374e61433d31",
29
+ "metadata": {},
30
+ "outputs": [],
31
+ "source": [
32
+ "token = obi_auth.get_token(environment=environment_str)"
33
+ ]
34
+ },
35
+ {
36
+ "cell_type": "markdown",
37
+ "id": "b60e8643-3ad5-4619-a052-5bd8b64713fd",
38
+ "metadata": {},
39
+ "source": [
40
+ "a widget to select project to use"
41
+ ]
42
+ },
43
+ {
44
+ "cell_type": "code",
45
+ "execution_count": 3,
46
+ "id": "77c47560-1163-4466-83fc-43abc6e0801a",
47
+ "metadata": {},
48
+ "outputs": [
49
+ {
50
+ "data": {
51
+ "application/vnd.jupyter.widget-view+json": {
52
+ "model_id": "639a72897c7045f78bb7aea5afbec767",
53
+ "version_major": 2,
54
+ "version_minor": 0
55
+ },
56
+ "text/plain": [
57
+ "Dropdown(description='Select:', options=(('Proximal vs. distal inhibition', {'id': '32008ab5-76cf-47cd-b98b-a5…"
58
+ ]
59
+ },
60
+ "metadata": {},
61
+ "output_type": "display_data"
62
+ }
63
+ ],
64
+ "source": [
65
+ "project_context = get_projects.get_projects(token, env=\"staging\")"
66
+ ]
67
+ },
68
+ {
69
+ "cell_type": "code",
70
+ "execution_count": 4,
71
+ "id": "d538dcac-1bdc-496b-8840-a7b32ea842ed",
72
+ "metadata": {},
73
+ "outputs": [
74
+ {
75
+ "data": {
76
+ "text/plain": [
77
+ "ProjectContext(project_id=UUID('32008ab5-76cf-47cd-b98b-a5013b30b533'), virtual_lab_id=UUID('1d8cccc0-f992-46aa-aac6-88e63c914314'), environment=<DeploymentEnvironment.staging: 'staging'>)"
78
+ ]
79
+ },
80
+ "execution_count": 4,
81
+ "metadata": {},
82
+ "output_type": "execute_result"
83
+ }
84
+ ],
85
+ "source": [
86
+ "project_context"
87
+ ]
88
+ },
89
+ {
90
+ "cell_type": "code",
91
+ "execution_count": 5,
92
+ "id": "93029f77-d71f-40f4-8c4d-9f23d2b650bc",
93
+ "metadata": {},
94
+ "outputs": [
95
+ {
96
+ "data": {
97
+ "application/vnd.jupyter.widget-view+json": {
98
+ "model_id": "e4b6463129a546d394d57efc46d07d7c",
99
+ "version_major": 2,
100
+ "version_minor": 0
101
+ },
102
+ "text/plain": [
103
+ "HBox(children=(Dropdown(description='Scale:', index=1, options=('pair', 'small', 'microcircuit', 'region', 'sy…"
104
+ ]
105
+ },
106
+ "metadata": {},
107
+ "output_type": "display_data"
108
+ },
109
+ {
110
+ "data": {
111
+ "application/vnd.jupyter.widget-view+json": {
112
+ "model_id": "9201fb70a891499cadada69780277194",
113
+ "version_major": 2,
114
+ "version_minor": 0
115
+ },
116
+ "text/plain": [
117
+ "Output()"
118
+ ]
119
+ },
120
+ "metadata": {},
121
+ "output_type": "display_data"
122
+ }
123
+ ],
124
+ "source": [
125
+ "circuit_ids = []\n",
126
+ "circuit_ids = get_entities.get_entities(\n",
127
+ " \"circuit\",\n",
128
+ " token,\n",
129
+ " circuit_ids,\n",
130
+ " return_entities=False,\n",
131
+ " multi_select=True,\n",
132
+ " show_pages=True,\n",
133
+ " project_context=project_context,\n",
134
+ " page_size=10,\n",
135
+ " default_scale=\"small\",\n",
136
+ " exclude_scales=[\"single\"],\n",
137
+ " add_columns=[\"subject.name\"],\n",
138
+ " env=environment_str,\n",
139
+ ")"
140
+ ]
141
+ },
142
+ {
143
+ "cell_type": "code",
144
+ "execution_count": 9,
145
+ "id": "da699ed4-39fd-4602-b54d-58a0b58c2539",
146
+ "metadata": {},
147
+ "outputs": [
148
+ {
149
+ "data": {
150
+ "text/plain": [
151
+ "['b86271b6-c56f-4c26-b502-05ef5bb514b6',\n",
152
+ " '3877500c-126d-410c-aa09-e44831464e80',\n",
153
+ " 'd66cea8b-5c9d-4bfb-bbfd-ca3d5fb5f12c']"
154
+ ]
155
+ },
156
+ "execution_count": 9,
157
+ "metadata": {},
158
+ "output_type": "execute_result"
159
+ }
160
+ ],
161
+ "source": [
162
+ "circuit_ids"
163
+ ]
164
+ },
165
+ {
166
+ "cell_type": "code",
167
+ "execution_count": 6,
168
+ "id": "a5f5445d-a61a-4fbe-962f-51e701434771",
169
+ "metadata": {},
170
+ "outputs": [
171
+ {
172
+ "data": {
173
+ "application/vnd.jupyter.widget-view+json": {
174
+ "model_id": "5fb0a08d2ce94d58a039c47fdd2f217f",
175
+ "version_major": 2,
176
+ "version_minor": 0
177
+ },
178
+ "text/plain": [
179
+ "HBox(children=(Combobox(value='', description='M-Type:', ensure_option=True, options=('A_BC', 'A_BFP', 'ACB_CT…"
180
+ ]
181
+ },
182
+ "metadata": {},
183
+ "output_type": "display_data"
184
+ },
185
+ {
186
+ "data": {
187
+ "application/vnd.jupyter.widget-view+json": {
188
+ "model_id": "a0c7ca20d54946f2af3e181c3adb3d70",
189
+ "version_major": 2,
190
+ "version_minor": 0
191
+ },
192
+ "text/plain": [
193
+ "Output()"
194
+ ]
195
+ },
196
+ "metadata": {},
197
+ "output_type": "display_data"
198
+ }
199
+ ],
200
+ "source": [
201
+ "morph_ids = []\n",
202
+ "morph_ids = get_entities.get_entities(\n",
203
+ " \"cell-morphology\",\n",
204
+ " token,\n",
205
+ " morph_ids,\n",
206
+ " return_entities=False,\n",
207
+ " multi_select=True,\n",
208
+ " show_pages=True,\n",
209
+ " project_context=project_context,\n",
210
+ " page_size=100,\n",
211
+ " add_columns=[\"mtypes\"],\n",
212
+ " env=environment_str,\n",
213
+ ")"
214
+ ]
215
+ },
216
+ {
217
+ "cell_type": "code",
218
+ "execution_count": 7,
219
+ "id": "2c9d28c4",
220
+ "metadata": {},
221
+ "outputs": [
222
+ {
223
+ "data": {
224
+ "text/plain": [
225
+ "['50248fe3-83bd-4c88-917b-63bcf0e01385',\n",
226
+ " '1c8ce2b1-3da1-4953-9b1b-bee8656000c4',\n",
227
+ " '15d02969-1e40-40ba-9081-d475d05897fd']"
228
+ ]
229
+ },
230
+ "execution_count": 7,
231
+ "metadata": {},
232
+ "output_type": "execute_result"
233
+ }
234
+ ],
235
+ "source": [
236
+ "morph_ids"
237
+ ]
238
+ },
239
+ {
240
+ "cell_type": "code",
241
+ "execution_count": 10,
242
+ "id": "90757b52",
243
+ "metadata": {},
244
+ "outputs": [
245
+ {
246
+ "data": {
247
+ "application/vnd.jupyter.widget-view+json": {
248
+ "model_id": "c2a91b53873b4e1fa54c161a59830f6b",
249
+ "version_major": 2,
250
+ "version_minor": 0
251
+ },
252
+ "text/plain": [
253
+ "HBox(children=(Combobox(value='', description='EM-Dataset:', ensure_option=True, options=('Portion 65 of the I…"
254
+ ]
255
+ },
256
+ "metadata": {},
257
+ "output_type": "display_data"
258
+ },
259
+ {
260
+ "data": {
261
+ "application/vnd.jupyter.widget-view+json": {
262
+ "model_id": "a08fd579c61b4377a0dd01478a5951be",
263
+ "version_major": 2,
264
+ "version_minor": 0
265
+ },
266
+ "text/plain": [
267
+ "Output()"
268
+ ]
269
+ },
270
+ "metadata": {},
271
+ "output_type": "display_data"
272
+ }
273
+ ],
274
+ "source": [
275
+ "cell_mesh_ids = []\n",
276
+ "circuit_ids = get_entities.get_entities(\n",
277
+ " \"em-cell-mesh\",\n",
278
+ " token,\n",
279
+ " cell_mesh_ids,\n",
280
+ " return_entities=False,\n",
281
+ " multi_select=True,\n",
282
+ " show_pages=True,\n",
283
+ " project_context=project_context,\n",
284
+ " page_size=10,\n",
285
+ " env=environment_str,\n",
286
+ " add_columns=[\"dense_reconstruction_cell_id\", \"subject.name\"],\n",
287
+ ")"
288
+ ]
289
+ },
290
+ {
291
+ "cell_type": "code",
292
+ "execution_count": 11,
293
+ "id": "6964ebe2",
294
+ "metadata": {},
295
+ "outputs": [
296
+ {
297
+ "data": {
298
+ "text/plain": [
299
+ "['2205be1a-a6db-4523-9a7b-0af309996583']"
300
+ ]
301
+ },
302
+ "execution_count": 11,
303
+ "metadata": {},
304
+ "output_type": "execute_result"
305
+ }
306
+ ],
307
+ "source": [
308
+ "cell_mesh_ids"
309
+ ]
310
+ }
311
+ ],
312
+ "metadata": {
313
+ "kernelspec": {
314
+ "display_name": ".venv (3.13.1)",
315
+ "language": "python",
316
+ "name": "python3"
317
+ },
318
+ "language_info": {
319
+ "codemirror_mode": {
320
+ "name": "ipython",
321
+ "version": 3
322
+ },
323
+ "file_extension": ".py",
324
+ "mimetype": "text/x-python",
325
+ "name": "python",
326
+ "nbconvert_exporter": "python",
327
+ "pygments_lexer": "ipython3",
328
+ "version": "3.13.1"
329
+ }
330
+ },
331
+ "nbformat": 4,
332
+ "nbformat_minor": 5
333
+ }
@@ -129,7 +129,7 @@ def get_entities(
129
129
  )
130
130
  filters_dict["scale"] = scale_filter
131
131
  filters_dict["name__ilike"] = widgets.Text(description="Name:")
132
- elif entity_type == "reconstruction-morphology":
132
+ elif entity_type == "reconstruction-morphology" or entity_type == "cell-morphology":
133
133
  lst_mtypes = _list_of_existing_mtypes(entity_core_url, token) + [""]
134
134
  mtype_filter = widgets.Combobox(
135
135
  placeholder="Select M-Type",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: obi_notebook
3
- Version: 0.2.dev1
3
+ Version: 0.2.dev2
4
4
  Summary: convenience functions for OBI notebooks
5
5
  Author-email: Open Brain Institute <jean-denis.courcol@epfl.ch>
6
6
  Maintainer-email: Open Brain Institute <jean-denis.courcol@epfl.ch>
@@ -1,183 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": null,
6
- "id": "7eb47475-67c6-499a-a2b4-19f8a64974d0",
7
- "metadata": {},
8
- "outputs": [],
9
- "source": [
10
- "import obi_auth\n",
11
- "\n",
12
- "from obi_notebook import get_entities, get_projects\n",
13
- "\n",
14
- "environment_str = \"staging\""
15
- ]
16
- },
17
- {
18
- "cell_type": "markdown",
19
- "id": "4d984b92-cadd-4b07-9813-b2333272610f",
20
- "metadata": {},
21
- "source": [
22
- "get authentication token for production"
23
- ]
24
- },
25
- {
26
- "cell_type": "code",
27
- "execution_count": null,
28
- "id": "323cb45c-91e3-451f-8a80-374e61433d31",
29
- "metadata": {},
30
- "outputs": [],
31
- "source": [
32
- "token = obi_auth.get_token(environment=environment_str)"
33
- ]
34
- },
35
- {
36
- "cell_type": "markdown",
37
- "id": "b60e8643-3ad5-4619-a052-5bd8b64713fd",
38
- "metadata": {},
39
- "source": [
40
- "a widget to select project to use"
41
- ]
42
- },
43
- {
44
- "cell_type": "code",
45
- "execution_count": null,
46
- "id": "77c47560-1163-4466-83fc-43abc6e0801a",
47
- "metadata": {},
48
- "outputs": [],
49
- "source": [
50
- "project_context = get_projects.get_projects(token, env=\"staging\")"
51
- ]
52
- },
53
- {
54
- "cell_type": "code",
55
- "execution_count": null,
56
- "id": "d538dcac-1bdc-496b-8840-a7b32ea842ed",
57
- "metadata": {},
58
- "outputs": [],
59
- "source": [
60
- "project_context"
61
- ]
62
- },
63
- {
64
- "cell_type": "code",
65
- "execution_count": null,
66
- "id": "93029f77-d71f-40f4-8c4d-9f23d2b650bc",
67
- "metadata": {},
68
- "outputs": [],
69
- "source": [
70
- "circuit_ids = []\n",
71
- "circuit_ids = get_entities.get_entities(\n",
72
- " \"circuit\",\n",
73
- " token,\n",
74
- " circuit_ids,\n",
75
- " return_entities=False,\n",
76
- " multi_select=True,\n",
77
- " show_pages=True,\n",
78
- " project_context=project_context,\n",
79
- " page_size=10,\n",
80
- " default_scale=\"small\",\n",
81
- " exclude_scales=[\"single\"],\n",
82
- " add_columns=[\"subject.name\"],\n",
83
- " env=environment_str,\n",
84
- ")"
85
- ]
86
- },
87
- {
88
- "cell_type": "code",
89
- "execution_count": null,
90
- "id": "da699ed4-39fd-4602-b54d-58a0b58c2539",
91
- "metadata": {},
92
- "outputs": [],
93
- "source": [
94
- "circuit_ids"
95
- ]
96
- },
97
- {
98
- "cell_type": "code",
99
- "execution_count": null,
100
- "id": "a5f5445d-a61a-4fbe-962f-51e701434771",
101
- "metadata": {},
102
- "outputs": [],
103
- "source": [
104
- "morph_ids = []\n",
105
- "morph_ids = get_entities.get_entities(\n",
106
- " \"reconstruction-morphology\",\n",
107
- " token,\n",
108
- " morph_ids,\n",
109
- " return_entities=False,\n",
110
- " multi_select=True,\n",
111
- " show_pages=True,\n",
112
- " project_context=project_context,\n",
113
- " page_size=100,\n",
114
- " add_columns=[\"mtypes\"],\n",
115
- " env=environment_str,\n",
116
- ")"
117
- ]
118
- },
119
- {
120
- "cell_type": "code",
121
- "execution_count": null,
122
- "id": "2c9d28c4",
123
- "metadata": {},
124
- "outputs": [],
125
- "source": [
126
- "morph_ids"
127
- ]
128
- },
129
- {
130
- "cell_type": "code",
131
- "execution_count": null,
132
- "id": "90757b52",
133
- "metadata": {},
134
- "outputs": [],
135
- "source": [
136
- "cell_mesh_ids = []\n",
137
- "circuit_ids = get_entities.get_entities(\n",
138
- " \"em-cell-mesh\",\n",
139
- " token,\n",
140
- " cell_mesh_ids,\n",
141
- " return_entities=False,\n",
142
- " multi_select=True,\n",
143
- " show_pages=True,\n",
144
- " project_context=project_context,\n",
145
- " page_size=10,\n",
146
- " env=environment_str,\n",
147
- " add_columns=[\"dense_reconstruction_cell_id\", \"subject.name\"],\n",
148
- ")"
149
- ]
150
- },
151
- {
152
- "cell_type": "code",
153
- "execution_count": null,
154
- "id": "6964ebe2",
155
- "metadata": {},
156
- "outputs": [],
157
- "source": [
158
- "cell_mesh_ids"
159
- ]
160
- }
161
- ],
162
- "metadata": {
163
- "kernelspec": {
164
- "display_name": ".venv (3.13.1)",
165
- "language": "python",
166
- "name": "python3"
167
- },
168
- "language_info": {
169
- "codemirror_mode": {
170
- "name": "ipython",
171
- "version": 3
172
- },
173
- "file_extension": ".py",
174
- "mimetype": "text/x-python",
175
- "name": "python",
176
- "nbconvert_exporter": "python",
177
- "pygments_lexer": "ipython3",
178
- "version": "3.13.1"
179
- }
180
- },
181
- "nbformat": 4,
182
- "nbformat_minor": 5
183
- }
File without changes
File without changes