-
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 6 commits
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
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Changelog | ||
|
|
||
| Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and | ||
| [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. | ||
|
|
||
| ## [0.1.0] - 2021-05-04 | ||
| ### Added | ||
| + Added version | ||
CBroz1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,49 @@ | ||
| FROM datajoint/djbase:py3.9-debian-8eb1715 | ||
|
|
||
| ARG GITHUB_USERNAME=cbroz1 | ||
CBroz1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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-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-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-interface | ||
| RUN pip install -e /main/element-miniscope | ||
| RUN rm -f /main/workflow-miniscope/dj_local_conf.json | ||
|
|
||
| # Install the workflow | ||
| RUN pip install /main/workflow-miniscope | ||
| RUN pip install -r /main/workflow-miniscope/requirements_test.txt | ||
|
|
||
| RUN pip uninstall datajoint | ||
| RUN pip install git+ | ||
| 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 |
|---|---|---|
|
|
@@ -5,4 +5,4 @@ ffmpeg | |
| libsm6 | ||
| libxext6 | ||
| libhdf5-dev | ||
| pkg-config | ||
| pkg-config | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,39 @@ | ||
| # 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 | ||
kabilar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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: | ||
| - DJ_HOST=db | ||
| - DJ_USER=root | ||
| - DJ_PASS=simple | ||
| - MINISCOPE_ROOT_DATA_DIR=/main/test_data | ||
| - MINISCOPE_ROOT_DATA_DIR=/main/test_data/ | ||
| - DATABASE_PREFIX=test_ | ||
| command: | ||
| - bash | ||
|
|
@@ -35,15 +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-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
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? 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 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.