Skip to content

Commit b23c44c

Browse files
authored
Merge pull request #19 from kushalbakshi/codespace
Add DevContainer and tutorial + fix `Segmentation` make + update docs
2 parents 4f53b14 + 5df1a60 commit b23c44c

28 files changed

+1907
-181
lines changed

.cspell.json

Lines changed: 168 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,197 @@
1414
"flagWords": [],
1515
"allowCompoundWords": true,
1616
"ignorePaths": [
17-
"./element_zstack.egg-info/*",
17+
"./element_array_ephys.egg-info/*",
1818
"./images/*"
1919
],
2020
"words": [
21+
"acorr",
2122
"aggr",
22-
"ascontiguousarray",
23+
"Alessio",
24+
"Andreas",
25+
"apmeta",
26+
"arange",
27+
"arithmatex",
28+
"asarray",
2329
"astype",
24-
"Berens",
25-
"bossdb",
26-
"CICD",
27-
"connectome",
28-
"Connectome",
29-
"connectomics",
30-
"DBURLs",
30+
"autocorrelogram",
31+
"Axona",
32+
"bbins",
33+
"bdist",
34+
"Binarize",
35+
"bouton",
36+
"Brody",
37+
"Bruker",
38+
"bshift",
39+
"Buccino",
40+
"catgt",
41+
"cbar",
42+
"cbin",
43+
"cdat",
44+
"chans",
45+
"Chans",
46+
"chns",
47+
"Clust",
48+
"clusterings",
49+
"cmap",
50+
"cnmf",
51+
"correlogram",
52+
"correlograms",
53+
"curations",
54+
"DANDI",
55+
"decomp",
56+
"deconvolution",
57+
"DISTRO",
58+
"djbase",
3159
"dtype",
32-
"Ecker",
60+
"ecephys",
61+
"Eftychios",
62+
"electrophysiogical",
3363
"elif",
3464
"Ephys",
35-
"Hoenselaar",
36-
"IACUC",
65+
"fluo",
66+
"fneu",
67+
"Fneu",
68+
"gblcar",
69+
"gfix",
70+
"Giovannucci",
71+
"Hakan",
72+
"hdmf",
73+
"HHMI",
74+
"hstack",
75+
"ibllib",
76+
"ifnull",
77+
"imax",
78+
"Imax",
79+
"IMAX",
80+
"imec",
81+
"imread",
82+
"imro",
83+
"imrotbl",
84+
"imshow",
85+
"Inan",
3786
"inlinehilite",
38-
"ipdb",
87+
"iplane",
88+
"ipynb",
89+
"ipywidgets",
90+
"iscell",
91+
"Kavli",
92+
"kcoords",
93+
"Klusta",
94+
"Kwik",
95+
"lfmeta",
3996
"linenums",
97+
"masky",
98+
"mathjax",
99+
"mdict",
100+
"Mesoscale",
101+
"mesoscope",
40102
"mkdocs",
41103
"mkdocstrings",
42-
"ndarrays",
43-
"neuroglancer",
44-
"neuroimaging",
45-
"pngs",
104+
"Moser",
105+
"mtscomp",
106+
"nblocks",
107+
"nchan",
108+
"Nchan",
109+
"nchannels",
110+
"ndarray",
111+
"ndepths",
112+
"ndim",
113+
"ndimage",
114+
"Neuralynx",
115+
"NEURO",
116+
"neuroconv",
117+
"Neurodata",
118+
"Neurolabware",
119+
"neuropil",
120+
"Neuropil",
121+
"Neuropix",
122+
"neuropixel",
123+
"NeuroPixels",
124+
"nfields",
125+
"nframes",
126+
"npix",
127+
"nplanes",
128+
"nrois",
129+
"NTNU",
130+
"nwbfile",
131+
"NWBHDF",
132+
"oebin",
133+
"openephys",
134+
"openpyxl",
135+
"Pachitariu",
136+
"paramsets",
137+
"phylog",
138+
"plotly",
139+
"Pnevmatikakis",
140+
"PSTH",
141+
"pykilosort",
46142
"pymdownx",
143+
"pynwb",
144+
"pyopenephys",
145+
"pyplot",
146+
"pytest",
147+
"quantile",
47148
"Reimer",
149+
"repolarization",
48150
"Roboto",
151+
"roidetect",
152+
"rois",
153+
"ROIs",
49154
"RRID",
50155
"Rxiv",
51156
"Sasaki",
157+
"sbxreader",
158+
"scipy",
159+
"sdist",
160+
"sess",
161+
"SGLX",
52162
"Shen",
53-
"Siapas",
54-
"Sinz",
163+
"Siegle",
55164
"Sitonic",
165+
"spikeglx",
166+
"spkcount",
167+
"spks",
168+
"Stereotaxic",
169+
"Sutter",
170+
"tcat",
171+
"tickvals",
172+
"tofile",
56173
"Tolias",
57174
"tqdm",
175+
"usecs",
176+
"usedb",
177+
"Vidrio's",
178+
"vline",
179+
"vmax",
180+
"Vmax",
58181
"voxel",
182+
"xanchor",
183+
"xaxes",
184+
"xaxis",
185+
"xblock",
186+
"xcoords",
187+
"xcorr",
188+
"xlabel",
189+
"xlim",
190+
"xoff",
191+
"xpix",
192+
"XPOS",
193+
"xtick",
194+
"yanchor",
59195
"Yatsenko",
60-
"Zuckerman"
196+
"yaxes",
197+
"yaxis",
198+
"yblock",
199+
"ycoord",
200+
"ycoords",
201+
"ylabel",
202+
"ylim",
203+
"yoff",
204+
"ypix",
205+
"YPOS",
206+
"yref",
207+
"yticks",
208+
"zpix"
61209
]
62210
}

.devcontainer/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM python:3.9-slim@sha256:5f0192a4f58a6ce99f732fe05e3b3d00f12ae62e183886bca3ebe3d202686c7f
2+
3+
ENV PATH /usr/local/bin:$PATH
4+
ENV PYTHON_VERSION 3.9.17
5+
6+
RUN \
7+
adduser --system --disabled-password --shell /bin/bash vscode && \
8+
# install docker
9+
apt-get update && \
10+
apt-get install ca-certificates curl gnupg lsb-release -y && \
11+
mkdir -m 0755 -p /etc/apt/keyrings && \
12+
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
13+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
14+
apt-get update && \
15+
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y && \
16+
usermod -aG docker vscode && \
17+
apt-get clean
18+
19+
RUN \
20+
# dev setup
21+
apt update && \
22+
apt-get install sudo git bash-completion graphviz default-mysql-client s3fs procps -y && \
23+
usermod -aG sudo vscode && \
24+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
25+
pip install --no-cache-dir --upgrade black pip nbconvert && \
26+
echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \
27+
echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \
28+
apt-get clean
29+
30+
COPY ./ /tmp/element-zstack/
31+
32+
RUN \
33+
# pipeline dependencies
34+
apt-get install gcc g++ ffmpeg libsm6 libxext6 -y && \
35+
pip install --no-cache-dir -e /tmp/element-zstack[elements,tests] && \
36+
# clean up
37+
rm -rf /tmp/element-zstack && \
38+
apt-get clean
39+
40+
ENV DJ_HOST fakeservices.datajoint.io
41+
ENV DJ_USER root
42+
ENV DJ_PASS simple
43+
44+
ENV VOLUME_ROOT_DATA_DIR /workspaces/element-zstack/example_data
45+
ENV DATABASE_PREFIX neuro_
46+
47+
USER vscode
48+
CMD bash -c "sudo rm /var/run/docker.pid; sudo dockerd"

.devcontainer/devcontainer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "Environment + Data",
3+
"dockerComposeFile": "docker-compose.yaml",
4+
"service": "app",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
"remoteEnv": {
7+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
8+
},
9+
"onCreateCommand": "mkdir -p ${VOLUME_ROOT_DATA_DIR} && pip install -e .",
10+
"postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${VOLUME_ROOT_DATA_DIR} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1",
11+
"hostRequirements": {
12+
"cpus": 4,
13+
"memory": "8gb",
14+
"storage": "32gb"
15+
},
16+
"forwardPorts": [
17+
3306
18+
],
19+
"customizations": {
20+
"settings": {
21+
"python.pythonPath": "/usr/local/bin/python"
22+
},
23+
"vscode": {
24+
"extensions": [
25+
"ms-python.python@2023.8.0",
26+
"ms-toolsai.jupyter@2023.3.1201040234"
27+
]
28+
}
29+
}
30+
}

.devcontainer/docker-compose.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: "3"
2+
services:
3+
app:
4+
cpus: 4
5+
mem_limit: 8g
6+
build:
7+
context: ..
8+
dockerfile: ./.devcontainer/Dockerfile
9+
# image: datajoint/element_array_ephys:latest
10+
extra_hosts:
11+
- fakeservices.datajoint.io:127.0.0.1
12+
environment:
13+
- DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-zstack-v1
14+
devices:
15+
- /dev/fuse
16+
cap_add:
17+
- SYS_ADMIN
18+
security_opt:
19+
- apparmor:unconfined
20+
volumes:
21+
- ..:/workspaces/element-zstack:cached
22+
- docker_data:/var/lib/docker # persist docker images
23+
privileged: true # only because of dind
24+
volumes:
25+
docker_data:

.github/workflows/release.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ on:
44
jobs:
55
make_github_release:
66
uses: datajoint/.github/.github/workflows/make_github_release.yaml@main
7-
pypi_release:
8-
needs: make_github_release
9-
uses: datajoint/.github/.github/workflows/pypi_release.yaml@main
10-
secrets:
11-
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
12-
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
13-
with:
14-
UPLOAD_URL: ${{needs.make_github_release.outputs.release_upload_url}}
157
mkdocs_release:
168
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
179
permissions:

0 commit comments

Comments
 (0)