-
Notifications
You must be signed in to change notification settings - Fork 9
Standard integration tests, PEP8, docker adjustments #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
dcb062a
2f842b2
bbfe140
c143548
7d4f879
0cfdcf3
90d0d74
c77ac0c
39d252d
6a66ec4
a875dca
a777f34
c34d325
7e41a3a
217a84d
d7165ac
8435df2
b1e45a2
68b04ed
6fc72ee
fd89eba
50fcc20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
tests/test_ingest.py::test_ingest_subjects PASSED tests/test_ingest.py::test_ingest_sessions PASSED tests/test_ingest.py::test_paramset_insert ERROR tests/test_pipeline_generation.py::test_generate_pipeline PASSED tests/test_populate.py::test_recording_info_populate PASSED tests/test_populate.py::test_processing_populate ERROR ERRORs because AttributeError: module 'collections' has no attribute 'Mapping'
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,49 @@ | ||
| FROM datajoint/djbase:py3.9-debian-8eb1715 | ||
|
|
||
| ARG GITHUB_USERNAME=cbroz1 | ||
| USER anaconda:anaconda | ||
|
|
||
| COPY ./workflow-miniscope/docker/apt_requirements.txt /tmp/ | ||
| COPY ./docker/apt_requirements.txt /tmp/ | ||
| RUN /entrypoint.sh echo "Installed dependencies." | ||
|
|
||
| # Install CaImAn | ||
| RUN git clone --branch master https://github.com/kabilar/CaImAn | ||
| WORKDIR /main | ||
| RUN git clone --branch master https://github.com/kabilar/CaImAn | ||
| WORKDIR /main/CaImAn | ||
| RUN conda install -n base -c conda-forge -y mamba | ||
| RUN /bin/bash -c 'mamba env update --n base --file environment.yml' | ||
| RUN /bin/bash -c 'mamba env update --n base --file environment.yml' | ||
| RUN pip install . | ||
| RUN python caimanmanager.py install --inplace | ||
|
|
||
| WORKDIR /main | ||
|
|
||
| # Option 1 - Install DataJoint's remote fork of the workflow and elements | ||
| # RUN git clone https://github.com/datajoint/workflow-miniscope.git /main/ | ||
|
|
||
| # 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 "element-interface@git+https://github.com/<user>/element-interface" | ||
| # RUN pip install git+https://github.com/<user>/element-miniscope.git | ||
| # RUN git clone https://github.com/<user>/workflow-miniscope.git /main/workflow-miniscope | ||
|
|
||
| # Option 3 - Install user's local fork of element and workflow | ||
| RUN mkdir /main/element-lab \ | ||
| /main/element-animal \ | ||
| /main/element-session \ | ||
| /main/element-event \ | ||
| /main/element-interface \ | ||
| /main/element-miniscope \ | ||
| /main/workflow-miniscope | ||
|
|
||
| COPY --chown=anaconda:anaconda ./element-lab /main/element-lab | ||
| COPY --chown=anaconda:anaconda ./element-animal /main/element-animal | ||
| COPY --chown=anaconda:anaconda ./element-session /main/element-session | ||
| COPY --chown=anaconda:anaconda ./element-event /main/element-event | ||
| COPY --chown=anaconda:anaconda ./element-interface /main/element-interface | ||
| COPY --chown=anaconda:anaconda ./element-miniscope /main/element-miniscope | ||
| COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope | ||
|
|
||
| RUN pip install -e /main/element-lab | ||
| RUN pip install -e /main/element-animal | ||
| RUN pip install -e /main/element-session | ||
| RUN pip install -e /main/element-event | ||
| RUN pip install -e /main/element-interface | ||
| RUN pip install -e /main/element-miniscope | ||
| RUN mv -f /main/workflow-miniscope/dj_local_conf.json /main/workflow-miniscope/unused_local_conf.json | ||
|
|
||
| # Install the workflow | ||
| RUN pip install /main/workflow-miniscope | ||
| RUN pip install -r /main/workflow-miniscope/requirements_test.txt | ||
|
|
||
| WORKDIR /main/workflow-miniscope | ||
|
|
||
| # 1. Install Elements from github user | ||
| RUN pip install --no-deps "element-interface@git+https://github.com/${GITHUB_USERNAME}/element-interface" | ||
| RUN pip install --no-deps "djarchive-client@git+https://github.com/${GITHUB_USERNAME}/djarchive-client" | ||
| RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-lab.git | ||
| RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-animal.git | ||
| RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-session.git | ||
| RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-event.git | ||
| RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-miniscope.git | ||
| # RUN pip install git+https://github.com/${GITHUB_USERNAME}/workflow-miniscope.git | ||
| # end 1 | ||
|
|
||
| # 2. Install local fork of element and workflow | ||
| # COPY --chown=anaconda:anaconda ../element-lab /main/ | ||
| # COPY --chown=anaconda:anaconda ../element-animal /main/ | ||
| # COPY --chown=anaconda:anaconda ../element-session /main/ | ||
| # COPY --chown=anaconda:anaconda ../element-event /main/ | ||
| # COPY --chown=anaconda:anaconda ../element-interface /main/ | ||
| # COPY --chown=anaconda:anaconda ../element-miniscope /main/ | ||
| COPY --chown=anaconda:anaconda . ./ | ||
| # RUN pip install -e /main/element-lab | ||
| # RUN pip install -e /main/element-animal | ||
| # RUN pip install -e /main/element-session | ||
| # RUN pip install -e /main/element-event | ||
| # RUN pip install -e /main/element-interface | ||
| # RUN pip install -e /main/element-miniscope | ||
| RUN pip install -e . | ||
| # end 2 | ||
|
|
||
| RUN rm -f ./dj_local_conf.json | ||
| RUN pip install -r ./requirements_test.txt | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,32 @@ | ||
| # export COMPOSE_DOCKER_CLI_BUILD=0 # some machines need for smooth --build | ||
| # .env file: TEST_DATA_DIR=<local parent directory of workflow_mini_data{1,2}> | ||
| # docker-compose -f ./docker/docker-compose-test.yaml up --build | ||
| # docker-compose -f ./docker/docker-compose-test.yaml down | ||
| # docker-compose -f ./docker/docker-compose-test.yaml up --build --force-recreate --detach | ||
| # docker-compose -f ./docker/docker-compose-test.yaml down --volumes | ||
|
|
||
| version: "2.4" | ||
| x-net: &net | ||
| networks: | ||
| - main | ||
|
|
||
| services: | ||
| db: | ||
| <<: *net | ||
| image: datajoint/mysql:5.7 | ||
| container_name: workflow-miniscope-test-db | ||
| networks: | ||
| miniscope: | ||
| image: mysql:5-debian | ||
CBroz1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| platform: linux/amd64 | ||
| command: --default-authentication-plugin=mysql_native_password | ||
| restart: always | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=simple | ||
| MYSQL_ROOT_PASSWORD: simple | ||
| MYSQL_USER: datajoint | ||
| MYSQL_PASSWORD: datajoint | ||
| volumes: | ||
| - mysql-miniscope:/var/lib/mysql | ||
| container_name: workflow-miniscope-test-db | ||
|
|
||
| workflow: | ||
| <<: *net | ||
| networks: | ||
| miniscope: | ||
| build: | ||
| context: ../../ | ||
| dockerfile: ./workflow-miniscope/docker/Dockerfile.test | ||
| env_file: .env # TEST_DATA_DIR | ||
| context: ../. | ||
| dockerfile: ./docker/Dockerfile.test | ||
| args: | ||
| - GITHUB_USERNAME=cbroz1 | ||
CBroz1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| image: workflow-miniscope-test:0.1.0 | ||
| container_name: workflow-miniscope-test | ||
| environment: | ||
|
|
@@ -37,16 +44,29 @@ services: | |
| tail -f /dev/null | ||
| volumes: | ||
| - ${TEST_DATA_DIR}:/main/test_data | ||
| - ./apt_requirements.txt:/tmp/apt_requirements.txt | ||
| - ../../element-lab:/main/element-lab | ||
| - ../../element-animal:/main/element-animal | ||
| - ../../element-session:/main/element-session | ||
| - ../../element-event:/main/element-event | ||
| - ../../element-interface:/main/element-interface | ||
| - ../../element-miniscope:/main/element-miniscope | ||
| # - ./apt_requirements.txt:/tmp/apt_requirements.txt | ||
| # - ../element-lab:/main/element-lab | ||
| # - ../element-animal:/main/element-animal | ||
| # - ../element-session:/main/element-session | ||
| # - ../element-event:/main/element-event | ||
| # - ../element-interface:/main/element-interface | ||
| # - ../element-miniscope:/main/element-miniscope | ||
| - ..:/main/workflow-miniscope | ||
| depends_on: | ||
| db: | ||
| condition: service_healthy | ||
| condition: service_started | ||
|
|
||
| adminer: | ||
| networks: | ||
| miniscope: | ||
| image: adminer | ||
| restart: always | ||
| ports: | ||
| - 8082:8080 | ||
|
|
||
| networks: | ||
| main: | ||
| miniscope: | ||
| name: workflow-miniscope-network | ||
|
|
||
| volumes: | ||
| mysql-miniscope: | ||
|
Comment on lines
+67
to
+68
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this required since the above code is commented out?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @iamamutt - Could you remind me why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CBroz1 That was there to map the data from the mysql database to a docker volume instead of bind mounting to the local filesystem. If you don't need access to the database data at all, you can delete the volumes section at the bottom, +72 to +73, and also it's mention at lines +19 to +20. If you want a bind mounted volume, change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense. Thanks @iamamutt! |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| datajoint>=0.13.0 | ||
| element-lab==0.1.0b0 | ||
| element-animal==0.1.0b0 | ||
| element-session==0.1.0b0 | ||
| element-miniscope==0.1.0 | ||
| element-lab>=0.1.0b0 | ||
| element-animal>=0.1.0b0 | ||
| element-session>=0.1.0b0 | ||
| element-miniscope>=0.1.0 | ||
CBroz1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| element-interface @ git+https://github.com/datajoint/element-interface.git | ||
| djarchive-client @ git+https://github.com/datajoint/djarchive-client.git | ||
| jupytext==1.13.7 | ||
| jupytext>=1.13.7 | ||
Uh oh!
There was an error while loading. Please reload this page.