Skip to content

Commit 9975d8a

Browse files
authored
Merge pull request #23 from CBroz1/dev
Standard integration tests, PEP8, docker adjustments
2 parents faf285d + 50fcc20 commit 9975d8a

34 files changed

+2018
-371
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
4+
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
5+
6+
7+
## 0.2.0 - 2022-07-11
8+
+ Update - Docker and Compose files
9+
+ Update - Requirements for latest releases of Elements
10+
+ Update - Workflow pipeline, ingestion, and populate scripts
11+
+ Update - Pytests
12+
+ Add - Code of conduct
13+
14+
## 0.1.0 - 2022-04-30
15+
+ Add - Analysis schema and Jupyter notebook for event-aligned calcium activity
16+
+ Add - Data exploration Jupyter notebook
17+
+ Add - Docker and Compose files
18+
+ Update - Pytests
19+
+ Update - README
20+
21+
## 0.1.0a2 - 2021-10-18
22+
+ Update - Change version to reflect release phase
23+
24+
## 0.1.1 - 2021-04-01
25+
+ Add - Version

CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ convention, and directory lookup methods (see
1919
[workflow_miniscope/ingest.py](workflow_miniscope/ingest.py))
2020
3. Processing results.
2121

22-
See the [Element Miniscope documentation](https://elements.datajoint.org/description/miniscope/) for the background information and development timeline.
22+
See the
23+
[Element Miniscope documentation](https://elements.datajoint.org/description/miniscope/)
24+
for the background information and development timeline.
2325

24-
For more information on the DataJoint Elements project, please visit https://elements.datajoint.org. This work is supported by the National Institutes of Health.
26+
For more information on the DataJoint Elements project, please visit
27+
https://elements.datajoint.org. This work is supported by the National Institutes of
28+
Health.
2529

2630
## Workflow architecture
2731

@@ -41,21 +45,35 @@ DataJoint Elements ([element-lab](https://github.com/datajoint/element-lab),
4145

4246
## Interacting with the DataJoint workflow
4347

48+
+ Our [YouTube tutorial](https://www.youtube.com/watch?v=nWUcPFZOSVw) walks through all
49+
the key details of this workflow.
50+
4451
+ Please refer to the following workflow-specific
4552
[Jupyter notebooks](/notebooks) for an in-depth explanation of how to run the
4653
workflow ([03-process.ipynb](notebooks/03-process.ipynb)) and explore the data
4754
([05-explore.ipynb](notebooks/05-explore.ipynb)).
4855

56+
4957
## Citation
5058

51-
+ If your work uses DataJoint and DataJoint Elements, please cite the respective Research Resource Identifiers (RRIDs) and manuscripts.
59+
+ If your work uses DataJoint and DataJoint Elements, please cite the respective
60+
Research Resource Identifiers (RRIDs) and manuscripts.
5261

5362
+ DataJoint for Python or MATLAB
54-
+ Yatsenko D, Reimer J, Ecker AS, Walker EY, Sinz F, Berens P, Hoenselaar A, Cotton RJ, Siapas AS, Tolias AS. DataJoint: managing big scientific data using MATLAB or Python. bioRxiv. 2015 Jan 1:031658. doi: https://doi.org/10.1101/031658
63+
+ Yatsenko D, Reimer J, Ecker AS, Walker EY, Sinz F, Berens P, Hoenselaar A, Cotton
64+
RJ, Siapas AS, Tolias AS. DataJoint: managing big scientific data using MATLAB or
65+
Python. bioRxiv. 2015 Jan 1:031658. doi: https://doi.org/10.1101/031658
5566

56-
+ DataJoint ([RRID:SCR_014543](https://scicrunch.org/resolver/SCR_014543)) - DataJoint for `<Select Python or MATLAB>` (version `<Enter version number>`)
67+
+ DataJoint (
68+
[RRID:SCR_014543](https://scicrunch.org/resolver/SCR_014543)) - DataJoint for `<Select Python or MATLAB>` (version
69+
`<Enter version number>`)
5770

5871
+ DataJoint Elements
59-
+ Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D, Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for Neurophysiology. bioRxiv. 2021 Jan 1. doi: https://doi.org/10.1101/2021.03.30.437358
60-
61-
+ DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Miniscope (version `<Enter version number>`)
72+
+ Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D,
73+
Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for
74+
Neurophysiology. bioRxiv. 2021 Jan 1. doi:
75+
https://doi.org/10.1101/2021.03.30.437358
76+
77+
+ DataJoint Elements (
78+
[RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Miniscope
79+
(version `<Enter version number>`)

docker/Dockerfile.dev

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ RUN python caimanmanager.py install --inplace
1616
WORKDIR /main
1717

1818
RUN mkdir /main/element-lab \
19-
/main/element-animal \
20-
/main/element-session \
21-
/main/element-interface \
22-
/main/element-miniscope \
23-
/main/workflow-miniscope
19+
/main/element-animal \
20+
/main/element-session \
21+
/main/element-event \
22+
/main/element-interface \
23+
/main/element-miniscope \
24+
/main/workflow-miniscope
2425

2526
# Copy user's local fork of elements and workflow
2627
COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
2728
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
2829
COPY --chown=anaconda:anaconda ./element-session /main/element-session
30+
COPY --chown=anaconda:anaconda ./element-event /main/element-event
2931
COPY --chown=anaconda:anaconda ./element-interface /main/element-interface
3032
COPY --chown=anaconda:anaconda ./element-miniscope /main/element-miniscope
3133
COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope
@@ -34,11 +36,12 @@ COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope
3436
RUN pip install -e /main/element-lab
3537
RUN pip install -e /main/element-animal
3638
RUN pip install -e /main/element-session
39+
RUN pip install -e /main/element-event
3740
RUN pip install -e /main/element-interface
3841
RUN pip install -e /main/element-miniscope
3942
RUN pip install -e /main/workflow-miniscope
4043
RUN pip install -r /main/workflow-miniscope/requirements_test.txt
4144

4245
WORKDIR /main/workflow-miniscope
4346

44-
ENTRYPOINT ["tail", "-f", "/dev/null"]
47+
ENTRYPOINT ["tail", "-f", "/dev/null"]

docker/Dockerfile.test

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,50 @@
11
FROM datajoint/djbase:py3.9-debian-8eb1715
22

3+
ARG GITHUB_USERNAME=datajoint
34
USER anaconda:anaconda
45

5-
COPY ./workflow-miniscope/docker/apt_requirements.txt /tmp/
6+
COPY ./docker/apt_requirements.txt /tmp/
67
RUN /entrypoint.sh echo "Installed dependencies."
78

89
# Install CaImAn
9-
RUN git clone --branch master https://github.com/kabilar/CaImAn
10+
WORKDIR /main
11+
RUN git clone --branch master https://github.com/kabilar/CaImAn
1012
WORKDIR /main/CaImAn
1113
RUN conda install -n base -c conda-forge -y mamba
12-
RUN /bin/bash -c 'mamba env update --n base --file environment.yml'
14+
RUN /bin/bash -c 'mamba env update --n base --file environment-minimal.yml'
1315
RUN pip install .
1416
RUN python caimanmanager.py install --inplace
1517

16-
WORKDIR /main
17-
18-
# Option 1 - Install DataJoint's remote fork of the workflow and elements
19-
# RUN git clone https://github.com/datajoint/workflow-miniscope.git /main/
20-
21-
# Option 2 - Install user's remote fork of element and workflow
22-
# or an unreleased version of the element
23-
# RUN pip install git+https://github.com/<user>/element-lab.git
24-
# RUN pip install git+https://github.com/<user>/element-animal.git
25-
# RUN pip install git+https://github.com/<user>/element-session.git
26-
# RUN pip install "element-interface@git+https://github.com/<user>/element-interface"
27-
# RUN pip install git+https://github.com/<user>/element-miniscope.git
28-
# RUN git clone https://github.com/<user>/workflow-miniscope.git /main/workflow-miniscope
29-
30-
# Option 3 - Install user's local fork of element and workflow
31-
RUN mkdir /main/element-lab \
32-
/main/element-animal \
33-
/main/element-session \
34-
/main/element-interface \
35-
/main/element-miniscope \
36-
/main/workflow-miniscope
37-
38-
COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
39-
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
40-
COPY --chown=anaconda:anaconda ./element-session /main/element-session
41-
COPY --chown=anaconda:anaconda ./element-interface /main/element-interface
42-
COPY --chown=anaconda:anaconda ./element-miniscope /main/element-miniscope
43-
COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope
44-
45-
RUN pip install -e /main/element-lab
46-
RUN pip install -e /main/element-animal
47-
RUN pip install -e /main/element-session
48-
RUN pip install -e /main/element-interface
49-
RUN pip install -e /main/element-miniscope
50-
RUN rm -f /main/workflow-miniscope/dj_local_conf.json
51-
52-
# Install the workflow
53-
RUN pip install /main/workflow-miniscope
54-
RUN pip install -r /main/workflow-miniscope/requirements_test.txt
55-
56-
RUN pip uninstall datajoint
57-
RUN pip install git+
5818
WORKDIR /main/workflow-miniscope
19+
20+
# 1. Install Elements from github user
21+
RUN pip install --no-deps "element-interface@git+https://github.com/${GITHUB_USERNAME}/element-interface"
22+
RUN pip install --no-deps "djarchive-client@git+https://github.com/${GITHUB_USERNAME}/djarchive-client"
23+
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-lab.git
24+
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-animal.git
25+
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-session.git
26+
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-event.git
27+
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-miniscope.git
28+
# RUN pip install git+https://github.com/${GITHUB_USERNAME}/workflow-miniscope.git
29+
# end 1
30+
31+
# 2. Install local fork of element and workflow
32+
# COPY --chown=anaconda:anaconda ../element-lab /main/
33+
# COPY --chown=anaconda:anaconda ../element-animal /main/
34+
# COPY --chown=anaconda:anaconda ../element-session /main/
35+
# COPY --chown=anaconda:anaconda ../element-event /main/
36+
# COPY --chown=anaconda:anaconda ../element-interface /main/
37+
# COPY --chown=anaconda:anaconda ../element-miniscope /main/
38+
COPY --chown=anaconda:anaconda . ./
39+
# RUN pip install -e /main/element-lab
40+
# RUN pip install -e /main/element-animal
41+
# RUN pip install -e /main/element-session
42+
# RUN pip install -e /main/element-event
43+
# RUN pip install -e /main/element-interface
44+
# RUN pip install -e /main/element-miniscope
45+
RUN pip install -e .
46+
# end 2
47+
48+
# Permission denied on rm
49+
RUN mv ./dj_local_conf.json ./dj_local_conf-Unused.json
50+
RUN pip install -r ./requirements_test.txt

docker/apt_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ffmpeg
55
libsm6
66
libxext6
77
libhdf5-dev
8-
pkg-config
8+
pkg-config

docker/docker-compose-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ services:
3535
db:
3636
condition: service_healthy
3737
networks:
38-
main:
38+
main:

0 commit comments

Comments
 (0)