Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Commit df46b76

Browse files
authored
Merge pull request #77 from CBroz1/main
Config items to notebook 9
2 parents d4be911 + 122c55d commit df46b76

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
55

66
## [0.2.1] - 2022-07-22
77
+ Add - Mention CodeBook data directory in notebooks
8+
+ Add - Mention of config items in notebook 09
89
+ Update - Remove directory assertion in notebooks for CodeBook deployment
910
+ Update - Move all export functions from `pipeline` to `export` script
1011

notebooks/09-NWB-export.ipynb

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,30 @@
4444
"dj.config['display.limit']=10"
4545
]
4646
},
47+
{
48+
"cell_type": "markdown",
49+
"id": "f2161a4e",
50+
"metadata": {},
51+
"source": [
52+
"CodeBook users should also set a couple additional config parameters."
53+
]
54+
},
55+
{
56+
"cell_type": "code",
57+
"execution_count": null,
58+
"id": "f9c423ab",
59+
"metadata": {},
60+
"outputs": [],
61+
"source": [
62+
"username_as_prefix = dj.config[\"database.user\"] + \"_\"\n",
63+
"if not dj.config['custom']:\n",
64+
" dj.config['custom'] = {}\n",
65+
"dj.config['custom'].update({\n",
66+
" \"ephys_mode\": \"no-curation\",\n",
67+
" \"database.prefix\": username_as_prefix,\n",
68+
" })"
69+
]
70+
},
4771
{
4872
"cell_type": "markdown",
4973
"id": "84b2c6ae-b8cd-47b8-af38-812f65032933",
@@ -450,7 +474,7 @@
450474
"formats": "ipynb,py_scripts//py"
451475
},
452476
"kernelspec": {
453-
"display_name": "Python 3.10.4 64-bit ('python3p10')",
477+
"display_name": "Python 3.9.12 ('ele')",
454478
"language": "python",
455479
"name": "python3"
456480
},
@@ -464,11 +488,11 @@
464488
"name": "python",
465489
"nbconvert_exporter": "python",
466490
"pygments_lexer": "ipython3",
467-
"version": "3.10.4"
491+
"version": "3.9.12"
468492
},
469493
"vscode": {
470494
"interpreter": {
471-
"hash": "ff52d424e56dd643d8b2ec122f40a2e279e94970100b4e6430cb9025a65ba4cf"
495+
"hash": "61456c693db5d9aa6731701ec9a9b08ab88a172bee0780139a3679beb166da16"
472496
}
473497
}
474498
},

notebooks/py_scripts/09-NWB-export.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# extension: .py
66
# format_name: light
77
# format_version: '1.5'
8-
# jupytext_version: 1.13.7
8+
# jupytext_version: 1.14.0
99
# kernelspec:
10-
# display_name: Python 3.10.4 64-bit ('python3p10')
10+
# display_name: Python 3.9.12 ('ele')
1111
# language: python
1212
# name: python3
1313
# ---
@@ -28,6 +28,16 @@
2828
import datajoint as dj
2929
dj.config['display.limit']=10
3030

31+
# CodeBook users should also set a couple additional config parameters.
32+
33+
username_as_prefix = dj.config["database.user"] + "_"
34+
if not dj.config['custom']:
35+
dj.config['custom'] = {}
36+
dj.config['custom'].update({
37+
"ephys_mode": "no-curation",
38+
"database.prefix": username_as_prefix,
39+
})
40+
3141
# If you haven't already populated the `lab`, `subject`, `session`, `probe`, and `ephys` schemas, please do so now with [04-automate](./04-automate-optional.ipynb). Note: exporting `ephys` data is currently only supported on the `no_curation` schema.
3242

3343
from workflow_array_ephys.pipeline import lab, subject, session, probe, ephys

0 commit comments

Comments
 (0)