Skip to content

Commit 0174478

Browse files
Merge pull request #176 from kushalbakshi/main
Update setup dependencies + tutorial setup + fix diagram
2 parents d24f936 + 1ea7c89 commit 0174478

File tree

7 files changed

+510
-1035
lines changed

7 files changed

+510
-1035
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ environment and notebooks to learn the pipeline.
2828
## Getting Started
2929

3030
+ Please fork this repository.
31+
3132
+ Clone the repository to your computer.
33+
3234
```bash
3335
git clone https://github.com/<enter_github_username>/element-array-ephys.git
3436
```
@@ -38,6 +40,7 @@ environment and notebooks to learn the pipeline.
3840
```bash
3941
pip install -e .
4042
```
43+
4144
+ [Interactive tutorial on GitHub
4245
Codespaces](https://github.com/datajoint/element-array-ephys#interactive-tutorial)
4346

element_array_ephys/__init__.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1 @@
1-
import os
2-
import datajoint as dj
3-
4-
if "custom" not in dj.config:
5-
dj.config["custom"] = {}
6-
7-
# overwrite dj.config['custom'] values with environment variables if available
8-
9-
dj.config["custom"]["database.prefix"] = os.getenv(
10-
"DATABASE_PREFIX", dj.config["custom"].get("database.prefix", "")
11-
)
12-
13-
dj.config["custom"]["ephys_root_data_dir"] = os.getenv(
14-
"EPHYS_ROOT_DATA_DIR", dj.config["custom"].get("ephys_root_data_dir", "")
15-
)
16-
17-
db_prefix = dj.config["custom"].get("database.prefix", "")
18-
191
from . import ephys_acute as ephys

images/diagram_flowchart.drawio

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<mxfile host="app.diagrams.net" modified="2023-10-30T21:18:19.029Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" etag="5NXZuFNRWHajsz3vhZ10" version="22.0.8" type="github">
1+
<mxfile host="app.diagrams.net" modified="2023-11-28T18:35:40.905Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" etag="XDqTBROUJpnBGVnVPucu" version="22.1.4" type="github">
22
<diagram id="4ApZs3ESX_rJ877tGElo" name="docs">
3-
<mxGraphModel dx="1221" dy="714" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1240" math="0" shadow="0">
3+
<mxGraphModel dx="1442" dy="1327" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1240" math="0" shadow="0">
44
<root>
55
<mxCell id="0" />
66
<mxCell id="1" parent="0" />

images/diagram_flowchart.svg

Lines changed: 1 addition & 1 deletion
Loading

notebooks/tutorial.ipynb

Lines changed: 480 additions & 1007 deletions
Large diffs are not rendered by default.

notebooks/tutorial_pipeline.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1+
import os
2+
import pathlib
13
import datajoint as dj
24
from element_animal import subject
35
from element_animal.subject import Subject
4-
from element_array_ephys import db_prefix, probe, ephys_acute as ephys
6+
from element_array_ephys import probe, ephys_acute as ephys
57
from element_lab import lab
68
from element_lab.lab import Lab, Location, Project, Protocol, Source, User
79
from element_lab.lab import Device as Equipment
810
from element_lab.lab import User as Experimenter
911
from element_session import session_with_datetime as session
1012
from element_session.session_with_datetime import Session
1113
import element_interface
12-
import pathlib
14+
15+
16+
if "custom" not in dj.config:
17+
dj.config["custom"] = {}
18+
19+
# overwrite dj.config['custom'] values with environment variables if available
20+
21+
dj.config["custom"]["database.prefix"] = os.getenv(
22+
"DATABASE_PREFIX", dj.config["custom"].get("database.prefix", "")
23+
)
24+
25+
dj.config["custom"]["ephys_root_data_dir"] = os.getenv(
26+
"EPHYS_ROOT_DATA_DIR", dj.config["custom"].get("ephys_root_data_dir", "")
27+
)
28+
29+
db_prefix = dj.config["custom"].get("database.prefix", "")
1330

1431

1532
# Declare functions for retrieving data

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
],
4242
extras_require={
4343
"elements": [
44-
"element-animal>=0.1.8",
45-
"element-event>=0.2.3",
46-
"element-interface>=0.4.0",
47-
"element-lab>=0.3.0",
48-
"element-session>=0.1.5",
44+
"element-animal @ git+https://github.com/datajoint/element-animal.git",
45+
"element-event @ git+https://github.com/datajoint/element-event.git",
46+
"element-interface @ git+https://github.com/datajoint/element-interface.git",
47+
"element-lab @ git+https://github.com/datajoint/element-lab.git",
48+
"element-session @ git+https://github.com/datajoint/element-session.git",
4949
],
5050
"nwb": ["dandi", "neuroconv[ecephys]", "pynwb"],
5151
"tests": ["pre-commit", "pytest", "pytest-cov"],

0 commit comments

Comments
 (0)