Skip to content

Commit 06568f4

Browse files
committed
2 parents e7f6060 + db75e4d commit 06568f4

40 files changed

+1152
-299
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
## Bug Report
11+
12+
### Description
13+
14+
A clear and concise description of what is the overall operation that is intended to be
15+
performed that resulted in an error.
16+
17+
### Reproducibility
18+
Include:
19+
- OS (WIN | MACOS | Linux)
20+
- DataJoint Element Version
21+
- MySQL Version
22+
- MySQL Deployment Strategy (local-native | local-docker | remote)
23+
- Minimum number of steps to reliably reproduce the issue
24+
- Complete error stack as a result of evaluating the above steps
25+
26+
### Expected Behavior
27+
A clear and concise description of what you expected to happen.
28+
29+
### Screenshots
30+
If applicable, add screenshots to help explain your problem.
31+
32+
### Additional Research and Context
33+
Add any additional research or context that was conducted in creating this report.
34+
35+
For example:
36+
- Related GitHub issues and PR's either within this repository or in other relevant
37+
repositories.
38+
- Specific links to specific lines or a focus within source code.
39+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: DataJoint Contribution Guideline
4+
url: https://docs.datajoint.org/python/community/02-Contribute.html
5+
about: Please make sure to review the DataJoint Contribution Guidelines
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for a new feature
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Request
11+
12+
### Problem
13+
14+
A clear and concise description how this idea has manifested and the context. Elaborate
15+
on the need for this feature and/or what could be improved. Ex. I'm always frustrated
16+
when [...]
17+
18+
### Requirements
19+
20+
A clear and concise description of the requirements to satisfy the new feature. Detail
21+
what you expect from a successful implementation of the feature. Ex. When using this
22+
feature, it should [...]
23+
24+
### Justification
25+
26+
Provide the key benefits in making this a supported feature. Ex. Adding support for this
27+
feature would ensure [...]
28+
29+
### Alternative Considerations
30+
31+
Do you currently have a work-around for this? Provide any alternative solutions or
32+
features you've considered.
33+
34+
### Related Errors
35+
Add any errors as a direct result of not exposing this feature.
36+
37+
Please include steps to reproduce provided errors as follows:
38+
- OS (WIN | MACOS | Linux)
39+
- DataJoint Element Version
40+
- MySQL Version
41+
- MySQL Deployment Strategy (local-native | local-docker | remote)
42+
- Minimum number of steps to reliably reproduce the issue
43+
- Complete error stack as a result of evaluating the above steps
44+
45+
### Screenshots
46+
If applicable, add screenshots to help explain your feature.
47+
48+
### Additional Research and Context
49+
Add any additional research or context that was conducted in creating this feature request.
50+
51+
For example:
52+
- Related GitHub issues and PR's either within this repository or in other relevant
53+
repositories.
54+
- Specific links to specific lines or a focus within source code.
55+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.
56+
- Any additional supplemental web references or links that would further justify this
57+
feature request.

.github/workflows/development.yaml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
name: Development
22
on:
3-
pull_request:
43
push:
4+
branches:
5+
- '**' # every branch
6+
- '!gh-pages' # exclude gh-pages branch
7+
- '!stage*' # exclude branches beginning with stage
58
tags:
6-
- "*.*.*"
9+
- '\d+\.\d+\.\d+' # only semver tags
10+
pull_request:
11+
branches:
12+
- '**' # every branch
13+
- '!gh-pages' # exclude gh-pages branch
14+
- '!stage*' # exclude branches beginning with stage
715
jobs:
816
test-changelog:
917
runs-on: ubuntu-latest
@@ -73,7 +81,9 @@ jobs:
7381
path: dist
7482
retention-days: 1
7583
publish-release:
76-
if: github.event_name == 'push'
84+
if: |
85+
github.event_name == 'push' &&
86+
startsWith(github.ref, 'refs/tags')
7787
needs: build
7888
runs-on: ubuntu-latest
7989
env:
@@ -146,15 +156,22 @@ jobs:
146156
asset_path: ${{env.PKG_SDIST_PATH}}
147157
asset_name: pip-${{env.SDIST_PKG_NAME}}-${{env.PKG_VERSION}}.tar.gz
148158
asset_content_type: application/gzip
149-
# Open Source documentation deploy workflow
150-
deploy-docs:
151-
if: github.event_name == 'push'
159+
publish-docs:
160+
if: |
161+
github.event_name == 'push' &&
162+
startsWith(github.ref, 'refs/tags')
152163
needs: build
153164
runs-on: ubuntu-latest
165+
env:
166+
DOCKER_CLIENT_TIMEOUT: "120"
167+
COMPOSE_HTTP_TIMEOUT: "120"
154168
steps:
155169
- uses: actions/checkout@v2
156-
- uses: actions/setup-python@v2
157-
with:
158-
python-version: 3.x
159-
- run: pip install mkdocs-material mkdocs-redirects mkdocstrings mkdocstrings-python
160-
- run: mkdocs gh-deploy --force --config-file ./docs/mkdocs.yml
170+
- name: Deploy docs
171+
run: |
172+
export MODE=BUILD
173+
export PACKAGE=element_array_ephys
174+
export UPSTREAM_REPO=https://github.com/${GITHUB_REPOSITORY}.git
175+
export HOST_UID=$(id -u)
176+
docker compose -f docs/docker-compose.yaml up --exit-code-from docs --build
177+
git push origin gh-pages

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ENV/
101101
.ropeproject
102102

103103
# mkdocs documentation
104-
/site
104+
docs/site
105105

106106
# mypy
107107
.mypy_cache/
@@ -115,4 +115,7 @@ dj_local_conf_old.json
115115
**/#*#
116116
**/.#*
117117

118-
docker-compose.y*ml
118+
docker-compose.y*ml
119+
120+
# include
121+
!docs/docker-compose.yaml

CHANGELOG.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.1.5] - 2022-07-11
7+
8+
+ Add - New `QualityMetrics` table to store clusters' and waveforms' metrics after the spike sorting analysis.
9+
610
## [0.1.4] - 2022-07-11
711

812
+ Bugfix - Handle case where `spike_depths` data is present.
@@ -44,10 +48,10 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
4448
+ Add - Readers for: `SpikeGLX`, `Open Ephys`, `Kilosort`
4549
+ Add - Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS, 2.0 - MS
4650

47-
[0.1.4]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.4
48-
[0.1.3]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.3
49-
[0.1.2]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.2
50-
[0.1.1]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.1
51+
[0.1.4]: https://github.com/datajoint/element-array-ephys/compare/0.1.3...0.1.4
52+
[0.1.3]: https://github.com/datajoint/element-array-ephys/compare/0.1.2...0.1.3
53+
[0.1.2]: https://github.com/datajoint/element-array-ephys/compare/0.1.1...0.1.2
54+
[0.1.1]: https://github.com/datajoint/element-array-ephys/compare/0.1.0...0.1.1
5155
[0.1.0]: https://github.com/datajoint/element-array-ephys/compare/0.1.0b0...0.1.0
52-
[0.1.0b0]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.0b0
56+
[0.1.0b0]: https://github.com/datajoint/element-array-ephys/compare/0.1.0a5...0.1.0b0
5357
[0.1.0a5]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.0a5

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
+ This repository features DataJoint pipeline design for extracellular array electrophysiology,
44
with Neuropixels probe and Kilosort spike sorting method.
55

6-
+ The pipeline presented here is not a complete pipeline by itself, but rather a modular
7-
design of tables and dependencies specific to the extracellular electrophysiology workflow.
6+
+ This module is designed to be integrated into a complete data pipeline and provides
7+
data tables and computational dependencies specific to extracellular electrophysiology
8+
processing and analysis.
89

910
+ This modular pipeline element can be flexibly attached downstream
1011
to any particular design of experiment session, thus assembling a fully functional
1112
ephys pipeline.
1213

14+
+ This Element provides three schema options, selected via the DataJoint config file, with `dj.config['custom']['ephys_mode']`
15+
+ `acute` probe insertion, with curated clustering
16+
+ `chronic` probe insertion, with curated clustering
17+
+ `no-curation`, with kilosort triggered clustering
18+
1319
+ See the [Element Array Electrophysiology documentation](https://elements.datajoint.org/description/array_ephys/) for the background information and development timeline.
1420

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

docs/.docker/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM datajoint/miniconda3:4.10.3-py3.9-alpine
2+
ARG PACKAGE
3+
WORKDIR /main
4+
COPY --chown=anaconda:anaconda ./docs/.docker/apk_requirements.txt ${APK_REQUIREMENTS}
5+
COPY --chown=anaconda:anaconda ./docs/.docker/pip_requirements.txt ${PIP_REQUIREMENTS}
6+
RUN \
7+
/entrypoint.sh echo "Dependencies installed" && \
8+
git config --global user.name "GitHub Action" && \
9+
git config --global user.email "action@github.com"&& \
10+
git config --global pull.rebase false && \
11+
git init
12+
COPY --chown=anaconda:anaconda ./${PACKAGE} /main/${PACKAGE}
13+
COPY --chown=anaconda:anaconda ./docs/mkdocs.yaml /main/docs/mkdocs.yaml
14+
COPY --chown=anaconda:anaconda ./docs/src /main/docs/src
15+
COPY --chown=anaconda:anaconda ./CHANGELOG.md /main/docs/src/about/changelog.md

docs/.docker/apk_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git

docs/.docker/pip_requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mkdocs-material
2+
mkdocs-redirects
3+
mkdocstrings
4+
mkdocstrings-python
5+
mike
6+
mdx-truly-sane-lists
7+
mkdocs-gen-files
8+
mkdocs-literate-nav
9+
mkdocs-exclude-search

docs/docker-compose-docs-serve.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/docker-compose.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# MODE="LIVE|QA|BUILD" PACKAGE=element_array_ephys UPSTREAM_REPO=https://github.com/datajoint/element-array-ephys.git HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
2+
#
3+
# navigate to http://localhost/
4+
version: "2.4"
5+
services:
6+
docs:
7+
build:
8+
dockerfile: docs/.docker/Dockerfile
9+
context: ../
10+
args:
11+
- PACKAGE
12+
image: ${PACKAGE}-docs
13+
environment:
14+
- PACKAGE
15+
- UPSTREAM_REPO
16+
- MODE
17+
volumes:
18+
- ..:/main
19+
user: ${HOST_UID}:anaconda
20+
ports:
21+
- 80:80
22+
command:
23+
- sh
24+
- -c
25+
- |
26+
set -e
27+
if echo "$${MODE}" | grep -i live &>/dev/null; then
28+
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
29+
elif echo "$${MODE}" | grep -iE "qa|build" &>/dev/null; then
30+
git branch -D gh-pages || true
31+
git fetch $${UPSTREAM_REPO} gh-pages:gh-pages || true
32+
mike deploy --config-file ./docs/mkdocs.yaml -u $$(grep -oE '\d+\.\d+' /main/$${PACKAGE}/version.py) latest
33+
mike set-default --config-file ./docs/mkdocs.yaml latest
34+
if echo "$${MODE}" | grep -i qa &>/dev/null; then
35+
mike serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
36+
fi
37+
else
38+
echo "Unexpected mode..."
39+
exit 1
40+
fi

docs/docs.dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)