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

Update to permit multiple root dirs #33

Merged
merged 47 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
38d91e7
Mult root dirs. Using elem-data-loader.utils
CBroz1 Nov 12, 2021
a667f3a
mult root dirs, one test fail timeout
CBroz1 Nov 12, 2021
623e48b
removing troubleshooting alt files
CBroz1 Nov 12, 2021
060cb9c
revert to surpress_errs false
CBroz1 Nov 12, 2021
72f9947
Apply suggestions from code review, 2nd commit forthcoming
CBroz1 Jan 19, 2022
dfdac38
PEP 8 linelength. Consistency. See details. More soon
CBroz1 Jan 19, 2022
0f607c6
element-data-loader -> element-interface
CBroz1 Jan 19, 2022
6e45418
Move instructions to central location
kabilar Jan 9, 2022
940bb7d
Update for PEP8
kabilar Jan 9, 2022
ab27fd5
Rename element-interface
kabilar Jan 12, 2022
45c99e7
Version lock requirements
kabilar Jan 12, 2022
f1dd3b6
Revert package rename
kabilar Jan 14, 2022
30ccd44
Remove duplicate dependency
kabilar Jan 14, 2022
676689a
Update README.md
kabilar Jan 14, 2022
acded70
Update Dockerfile, new base image
kabilar Jan 17, 2022
df9e5f7
Update Docker image tag to match package version
kabilar Jan 17, 2022
df6c95b
Change service name
kabilar Jan 18, 2022
f8747e7
Add to Dockerfile
kabilar Jan 18, 2022
b54cd92
Update context to install local fork of element
kabilar Jan 18, 2022
12df9d9
Update version
kabilar Jan 18, 2022
4695ac2
Revert service name
kabilar Jan 18, 2022
f760ac5
Add options to install specific forks for tests
kabilar Jan 19, 2022
ba6b868
Update version
kabilar Jan 19, 2022
aa84856
PEP8 line length. docstring specificity. element-interface
CBroz1 Nov 12, 2021
78a0f5c
Apply code review suggestions, WIP
CBroz1 Jan 19, 2022
d38defe
PEP 8 linelength: Rebase 79->88. See details. More soon
CBroz1 Jan 19, 2022
f46d2f6
Merge branch 'main' into main
CBroz1 Jan 20, 2022
735063a
Docker integration tests for mult root dirs
CBroz1 Jan 21, 2022
c55e0ed
add verbosity options, add docker files
CBroz1 Feb 3, 2022
60ff2ac
Add Changelog
kabilar Jan 17, 2022
fce19bb
Add original version
kabilar Jan 17, 2022
f4c7362
Rebase from cbroz1/main
kabilar Jan 21, 2022
200e9dd
Fix minor bug
kabilar Jan 21, 2022
d79f296
Rebase. See Details.
kabilar Jan 21, 2022
17b1f1d
typo from rebasing
CBroz1 Feb 3, 2022
9a6ffd8
Apply suggestions from code review
CBroz1 Feb 28, 2022
cce6c48
Merge branch 'main' into main
CBroz1 Feb 28, 2022
f647307
Update README.md from code review suggestion
CBroz1 Mar 1, 2022
b292bd0
Code review, revert DJ_HOST name to db
CBroz1 Mar 1, 2022
8eec742
remove insert length logic where unnecessary
CBroz1 Mar 1, 2022
cf4a850
Apply suggestions from code review
CBroz1 Mar 1, 2022
c0d8064
hardcode djarchive workflow-array-ephys-benchmark/v2 in tests/__init
CBroz1 Mar 1, 2022
c53bbf5
Update install.md link
CBroz1 Mar 1, 2022
20cd400
Apply suggestions from code review
CBroz1 Mar 1, 2022
d14d087
pep8 linelength. hardcode test_find_valid_full_path
CBroz1 Mar 1, 2022
ba8d3e1
Refactor pipeline() verbose conditional
CBroz1 Mar 1, 2022
3f53fed
Apply suggestions from code review
CBroz1 Mar 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ ENV/
.mypy_cache/

# datajoint
dj_local_conf.json
dj_local_conf_old.json
dj_local_con*.json

# emacs
**/*~
Expand All @@ -122,3 +121,6 @@ Diagram.ipynb

# vscode
.vscode/settings.json

# notes
temp*
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN pip install -e /main/element-session
RUN pip install -e /main/element-array-ephys
RUN pip install -e /main/workflow-array-ephys
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt

WORKDIR /main/workflow-array-ephys

ENTRYPOINT ["tail", "-f", "/dev/null"]
ENTRYPOINT ["tail", "-f", "/dev/null"]
27 changes: 19 additions & 8 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,31 @@ USER anaconda
WORKDIR /main/workflow-array-ephys

# Option 1 - Install DataJoint's remote fork of the workflow and elements
RUN git clone https://github.com/datajoint/workflow-array-ephys.git /main/workflow-array-ephys
# RUN git clone https://github.com/datajoint/workflow-array-ephys.git /main/

# Option 2 - Install user's remote fork of element and workflow
# Option 2 - Install user's remote fork of element and workflow
# or an unreleased version of the element
# RUN pip install git+https://github.com/<user>element-lab.git
# RUN pip install git+https://github.com/<user>/element-animal.git
# RUN pip install git+https://github.com/<user>/element-session.git
# RUN pip install git+https://github.com/<user>/element-array-ephys.git
# RUN git clone https://github.com/<user>/workflow-array-ephys.git /main/workflow-array-ephys
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved

# Option 3 - Install user's local fork of element and workflow
# RUN mkdir /main/element-array-ephys
# COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
# RUN pip install /main/element-array-ephys
# COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys
RUN mkdir /main/element-lab
COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
RUN pip install -e /main/element-lab
RUN mkdir /main/element-animal
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
RUN pip install -e /main/element-animal
RUN mkdir /main/element-session
COPY --chown=anaconda:anaconda ./element-session /main/element-session
RUN pip install -e /main/element-session
RUN mkdir /main/element-array-ephys
COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
RUN pip install -e /main/element-array-ephys
COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys
# RUN rm -f /main/workflow-array-ephys/dj_local_conf.json

# Install the workflow
RUN pip install /main/workflow-array-ephys
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DataJoint Workflow - Array Electrophysiology

Workflow for extracellular array electrophysiology data acquired with a polytrode probe (e.g.
Neuropixels, Neuralynx) using the `SpikeGLX` or `OpenEphys` acquisition software and processed
Workflow for extracellular array electrophysiology data acquired with a polytrode probe (e.g.
Neuropixels, Neuralynx) using the `SpikeGLX` or `OpenEphys` acquisition software and processed
with MATLAB- or python-based `Kilosort` spike sorting software.

A complete electrophysiology workflow can be built using the DataJoint Elements.
Expand All @@ -11,17 +11,17 @@ A complete electrophysiology workflow can be built using the DataJoint Elements.
+ [element-array-ephys](https://github.com/datajoint/element-array-ephys)

This repository provides demonstrations for:
1. Set up a workflow using DataJoint Elements (see
1. Set up a workflow using DataJoint Elements (see
[workflow_array_ephys/pipeline.py](workflow_array_ephys/pipeline.py))
2. Ingestion of data/metadata based on a predefined file structure, file naming
convention, and directory lookup methods (see
2. Ingestion of data/metadata based on a predefined file structure, file naming
convention, and directory lookup methods (see
[workflow_array_ephys/paths.py](workflow_array_ephys/paths.py)).
3. Ingestion of clustering results.

## Workflow architecture

The electrophysiology workflow presented here uses components from 4 DataJoint
Elements (`element-lab`, `element-animal`, `element-session`,
Elements (`element-lab`, `element-animal`, `element-session`,
`element-array-ephys`) assembled together to form a fully functional workflow.

### element-lab
Expand All @@ -46,6 +46,6 @@ https://github.com/datajoint/element-animal/blob/main/images/subject_diagram.svg
## Interacting with the DataJoint workflow

+ Please refer to the following workflow-specific
[Jupyter notebooks](/notebooks) for an in-depth explanation of how to run the
workflow ([03-process.ipynb](notebooks/03-process.ipynb)) and explore the data
([05-explore.ipynb](notebooks/05-explore.ipynb)).
[Jupyter notebooks](/notebooks) for an in-depth explanation of how to run the
workflow ([03-process.ipynb](notebooks/03-process.ipynb)) and explore the data
([05-explore.ipynb](notebooks/05-explore.ipynb)).
2 changes: 1 addition & 1 deletion docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ services:
db:
condition: service_healthy
networks:
main:
main:
11 changes: 8 additions & 3 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# export COMPOSE_DOCKER_CLI_BUILD=0 # some machines need for smooth --build
# .env file: TEST_DATA_DIR=<local parent directory of workflow_ephys_data{1,2}>
# docker-compose -f docker-compose-test.yaml up --build
# docker exec -it workflow-session_workflow_1 /bin/bash
# docker-compose -f docker-compose-test.yaml down

version: "2.4"
Expand All @@ -22,20 +25,22 @@ services:
- DJ_HOST=db
- DJ_USER=root
- DJ_PASS=simple
- EPHYS_ROOT_DATA_DIR=/main/test_data
- EPHYS_ROOT_DATA_DIR=/main/test_data/workflow_ephys_data1/,/main/test_data/workflow_ephys_data2/
- DATABASE_PREFIX=test_
command:
- bash
- -c
- |
echo "------ INTEGRATION TESTS ------"
pytest -sv --cov-report term-missing --cov=workflow-array-ephys -p no:warnings
pytest -sv --cov-report term-missing --cov=workflow_array_ephys -p no:warnings tests/
tail -f /dev/null
volumes:
- ${TEST_DATA_DIR}:/main/test_data
- ./apt_requirements.txt:/tmp/apt_requirements.txt
- ../element-array-ephys:/main/element-array-ephys
CBroz1 marked this conversation as resolved.
Show resolved Hide resolved
- .:/main/workflow-array-ephys
depends_on:
db:
condition: service_healthy
networks:
main:
main:
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
datajoint>=0.13.0
element-array-ephys==0.1.0b0
element-lab==0.1.0b0
element-lab>=0.1.0b0
element-animal==0.1.0b0
element-session==0.1.0b0
element-interface @ git+https://github.com/datajoint/element-interface.git
ipykernel==6.0.1
ipykernel==6.0.1
Loading