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

Commit 3711aec

Browse files
authored
Merge pull request #78 from CBroz1/main
Updates for codebook deployment
2 parents a0f0e27 + 5f3e8bd commit 3711aec

25 files changed

+984
-872
lines changed

.github/workflows/u24_workflow_before_release.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: u24_workflow_before_release
1+
name: u24_workflow_before_release_0.0.1
22
on:
33
pull_request:
44
push:
@@ -16,4 +16,3 @@ jobs:
1616
jhub_ver: 1.4.2
1717
py_ver: 3.9
1818
dist: debian
19-
codebook_base_hash: 561b765

.github/workflows/u24_workflow_release_call.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: u24_workflow_release_call
1+
name: u24_workflow_release_call_0.0.1
22
on:
33
workflow_run:
4-
workflows: ["u24_workflow_tag_to_release"]
4+
workflows: ["u24_workflow_tag_to_release_0.0.1"]
55
types:
66
- completed
77
jobs:
@@ -15,7 +15,6 @@ jobs:
1515
jhub_ver: 1.4.2
1616
py_ver: 3.9
1717
dist: debian
18-
codebook_base_hash: 561b765
1918
secrets:
2019
REGISTRY_USERNAME: ${{secrets.DOCKER_USERNAME}}
2120
REGISTRY_PASSWORD: ${{secrets.DOCKER_PASSWORD}}

.github/workflows/u24_workflow_tag_to_release.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: u24_workflow_tag_to_release
1+
name: u24_workflow_tag_to_release_0.0.1
22
on:
33
push:
44
tags:
@@ -13,4 +13,3 @@ jobs:
1313
jhub_ver: 1.4.2
1414
py_ver: 3.9
1515
dist: debian
16-
codebook_base_hash: 561b765

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.2.2] - 2022-09-18
7+
+ Update - config ephys roots in notebooks for codebook deployment
8+
+ Update - requirements.txt to add element electrode localization
9+
+ Update - add lab.User insert to ingest.py for users with empty element-lab schemas
10+
611
## [0.2.1] - 2022-07-22
712
+ Add - Mention CodeBook data directory in notebooks
813
+ Add - Mention of config items in notebook 09
@@ -55,4 +60,4 @@ specific forks for tests.
5560

5661
[0.2.1]: https://github.com/datajoint/workflow-array-ephys/compare/0.2.1...0.2.0
5762
[0.2.0]: https://github.com/datajoint/workflow-array-ephys/compare/0.2.0...0.1.0
58-
[0.1.0]: https://github.com/datajoint/workflow-array-ephys/releases/tag/0.1.0
63+
[0.1.0]: https://github.com/datajoint/workflow-array-ephys/releases/tag/0.1.0

notebooks/01-configure.ipynb

+23-51
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,19 @@
1111
"\n",
1212
"## Setup - Working Directory\n",
1313
"\n",
14-
"To run the array ephys workflow, we need to properly set up the DataJoint configuration. The configuration will be saved in a file called `dj_local_conf.json` on each machine and this notebook walks you through the process.\n",
14+
"To run the array ephys workflow, we need to properly set up the DataJoint configuration. The configuration can be saved in a local directory as `dj_local_conf.json` or at your root directory as a hidden file. This notebook walks you through the setup process.\n",
1515
"\n",
16-
"**The configuration only needs to be set up once**, if you have gone through the configuration before, directly go to [02-workflow-structure](02-workflow-structure-optional.ipynb).\n",
17-
"\n",
18-
"As a convention, we set the configuration up in the root directory of the workflow package and always starts importing datajoint and pipeline modules from there."
16+
"**The configuration only needs to be set up once**, if you have gone through the configuration before, directly go to [02-workflow-structure](02-workflow-structure-optional.ipynb)."
1917
]
2018
},
2119
{
2220
"cell_type": "code",
23-
"execution_count": null,
21+
"execution_count": 1,
2422
"id": "dc2dc935",
2523
"metadata": {},
2624
"outputs": [],
2725
"source": [
28-
"import os"
29-
]
30-
},
31-
{
32-
"cell_type": "code",
33-
"execution_count": null,
34-
"metadata": {},
35-
"outputs": [],
36-
"source": [
37-
"# change to the upper level folder\n",
26+
"import os\n",
3827
"if os.path.basename(os.getcwd()) == \"notebooks\": os.chdir(\"..\")\n",
3928
"import datajoint as dj"
4029
]
@@ -119,7 +108,7 @@
119108
"The root path typically **do not** contain information of subjects or sessions, all data from subjects/sessions should be subdirectories in the root path.\n",
120109
"\n",
121110
"- In the example dataset downloaded with [these instructions](00-data-download-optional.ipynb), `/tmp/test_data` will be the root. \n",
122-
"- For CodeBook users, the root is `/home/inbox/`\n",
111+
"- For CodeBook users, the root is `/home/inbox/0.1.0a4/`\n",
123112
"\n",
124113
"```\n",
125114
"- subject6\n",
@@ -139,7 +128,14 @@
139128
"# If there is only one root path.\n",
140129
"dj.config[\"custom\"][\"ephys_root_data_dir\"] = \"/tmp/test_data\"\n",
141130
"# If there are multiple possible root paths:\n",
142-
"dj.config[\"custom\"][\"ephys_root_data_dir\"] = [\"/tmp/test_data\", \"/home/inbox/\"]"
131+
"dj.config[\"custom\"][\"ephys_root_data_dir\"] = [\n",
132+
" \"/tmp/test_data/workflow_ephys_data1/\",\n",
133+
" \"/tmp/test_data/workflow_ephys_data2/\",\n",
134+
" \"/tmp/test_data/workflow_localization/\", \n",
135+
" \"/home/inbox/0.1.0a4/workflow_ephys_data1/\",\n",
136+
" \"/home/inbox/0.1.0a4/workflow_ephys_data2/\",\n",
137+
" \"/home/inbox/0.1.0a4/workflow_localization/\"\n",
138+
"]"
143139
]
144140
},
145141
{
@@ -188,46 +184,22 @@
188184
"source": [
189185
"## Save configuration\n",
190186
"\n",
191-
"With the proper configurations, we could save this as a file, either as a local json file, or a global file."
192-
]
193-
},
194-
{
195-
"cell_type": "code",
196-
"execution_count": null,
197-
"id": "dcc8b17b",
198-
"metadata": {},
199-
"outputs": [],
200-
"source": [
201-
"dj.config.save_local()"
202-
]
203-
},
204-
{
205-
"cell_type": "code",
206-
"execution_count": null,
207-
"id": "9b95596f",
208-
"metadata": {},
209-
"outputs": [],
210-
"source": [
211-
"ls"
212-
]
213-
},
214-
{
215-
"cell_type": "markdown",
216-
"id": "d76904b4",
217-
"metadata": {},
218-
"source": [
219-
"Local configuration file is saved as `dj_local_conf.json` in the root directory of this package `workflow-array-ephys`. Next time if you change your directory to `workflow-array-ephys` before importing datajoint and the pipeline packages, the configurations will get properly loaded.\n",
187+
"With the proper configurations, we could save this as a file, either as a local json file, or a global file.\n",
220188
"\n",
221-
"If saved globally, there will be a hidden configuration file saved in your root directory. The configuration will be loaded no matter where the directory is."
189+
"Local configuration file is saved as `dj_local_conf.json` in current directory, which is great for project-specific settings.\n",
190+
"\n",
191+
"For first-time and CodeBook users, we recommend saving globally. This will create a hidden configuration file saved in your root directory, loaded whenever there is no local version to override it."
222192
]
223193
},
224194
{
225195
"cell_type": "code",
226196
"execution_count": null,
197+
"id": "dcc8b17b",
227198
"metadata": {},
228199
"outputs": [],
229200
"source": [
230-
"# dj.config.save_global()"
201+
"# dj.config.save_local()\n",
202+
"dj.config.save_global()"
231203
]
232204
},
233205
{
@@ -250,7 +222,7 @@
250222
"formats": "ipynb,py_scripts//py"
251223
},
252224
"kernelspec": {
253-
"display_name": "Python 3.9.12 ('ele')",
225+
"display_name": "Python 3.9.13 ('ele')",
254226
"language": "python",
255227
"name": "python3"
256228
},
@@ -264,11 +236,11 @@
264236
"name": "python",
265237
"nbconvert_exporter": "python",
266238
"pygments_lexer": "ipython3",
267-
"version": "3.9.12"
239+
"version": "3.9.13"
268240
},
269241
"vscode": {
270242
"interpreter": {
271-
"hash": "61456c693db5d9aa6731701ec9a9b08ab88a172bee0780139a3679beb166da16"
243+
"hash": "d00c4ad21a7027bf1726d6ae3a9a6ef39c8838928eca5a3d5f51f3eb68720410"
272244
}
273245
}
274246
},

notebooks/02-workflow-structure-optional.ipynb

+145-49
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)