Skip to content

Commit 03e2d5f

Browse files
author
Thinh Nguyen
authored
Merge pull request #97 from ttngu207/no-curation
pull from main - add QC
2 parents a738ee7 + 10d12a6 commit 03e2d5f

32 files changed

+2551
-38
lines changed

.github/workflows/development.yaml

Lines changed: 34 additions & 4 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
@@ -61,7 +69,8 @@ jobs:
6169
uses: actions/upload-artifact@v2
6270
with:
6371
name: image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-${{matrix.distro}}
64-
path: "image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-\
72+
path:
73+
"image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-\
6574
${{matrix.distro}}.tar.gz"
6675
retention-days: 1
6776
- if: matrix.py_ver == '3.8' && matrix.distro == 'alpine'
@@ -72,7 +81,9 @@ jobs:
7281
path: dist
7382
retention-days: 1
7483
publish-release:
75-
if: github.event_name == 'push'
84+
if: |
85+
github.event_name == 'push' &&
86+
startsWith(github.ref, 'refs/tags')
7687
needs: build
7788
runs-on: ubuntu-latest
7889
env:
@@ -145,3 +156,22 @@ jobs:
145156
asset_path: ${{env.PKG_SDIST_PATH}}
146157
asset_name: pip-${{env.SDIST_PKG_NAME}}-${{env.PKG_VERSION}}.tar.gz
147158
asset_content_type: application/gzip
159+
publish-docs:
160+
if: |
161+
github.event_name == 'push' &&
162+
startsWith(github.ref, 'refs/tags')
163+
needs: build
164+
runs-on: ubuntu-latest
165+
env:
166+
DOCKER_CLIENT_TIMEOUT: "120"
167+
COMPOSE_HTTP_TIMEOUT: "120"
168+
steps:
169+
- uses: actions/checkout@v2
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
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: u24_element_before_release
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
workflow_dispatch:
10+
jobs:
11+
call_context_check:
12+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
13+
call_u24_elements_build_alpine:
14+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
15+
with:
16+
py_ver: 3.9
17+
image: djbase
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: u24_element_release_call
2+
on:
3+
workflow_run:
4+
workflows: ["u24_element_tag_to_release"]
5+
types:
6+
- completed
7+
jobs:
8+
call_context_check:
9+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
10+
test_call_u24_elements_release_alpine:
11+
if: >-
12+
github.event.workflow_run.conclusion == 'success' && ( contains(github.event.workflow_run.head_branch, 'test') || (github.event.workflow_run.event == 'pull_request'))
13+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
14+
with:
15+
py_ver: 3.9
16+
twine_repo: testpypi
17+
secrets:
18+
TWINE_USERNAME: ${{secrets.TWINE_TEST_USERNAME}}
19+
TWINE_PASSWORD: ${{secrets.TWINE_TEST_PASSWORD}}
20+
call_u24_elements_release_alpine:
21+
if: >-
22+
github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'datajoint' && !contains(github.event.workflow_run.head_branch, 'test')
23+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
24+
with:
25+
py_ver: 3.9
26+
secrets:
27+
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
28+
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: u24_element_tag_to_release
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
- 'test*.*.*'
7+
jobs:
8+
call_context_check:
9+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
10+
call_u24_elements_build_alpine:
11+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
12+
with:
13+
py_ver: 3.9
14+
image: djbase

.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: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,57 @@
11
# Changelog
22

3-
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
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.
45

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+
10+
## [0.1.4] - 2022-07-11
11+
12+
+ Bugfix - Handle case where `spike_depths` data is present.
13+
14+
## [0.1.3] - 2022-06-16
15+
16+
+ Update - Allow for the `precluster_output_dir` attribute to be nullable when no pre-clustering is performed.
17+
18+
## [0.1.2] - 2022-06-09
19+
20+
+ Bugfix - Handle case where `pc_features.npy` does not exist.
21+
22+
## [0.1.1] - 2022-06-01
23+
24+
+ Add - Secondary attributes to `PreClusterParamSteps` table
25+
26+
## [0.1.0] - 2022-05-26
27+
28+
+ Update - Rename module for acute probe insertions from `ephys.py` to `ephys_acute.py`.
29+
+ Add - Module for pre-clustering steps (`ephys_precluster.py`), which is built off of `ephys_acute.py`.
30+
+ Add - Module for chronic probe insertions (`ephys_chronic.py`).
31+
+ Bugfix - Missing `fileTimeSecs` key in SpikeGLX meta file.
32+
+ Update - Move common functions to `element-interface` package.
33+
+ Add - NWB export function
534

635
## [0.1.0b4] - 2021-11-29
736
### Added
837
+ Processing with Kilosort and pyKilosort for Open Ephys and SpikeGLX
938

1039

1140
## [0.1.0b0] - 2021-05-07
12-
### Added
13-
+ First beta release
1441

42+
+ Update - First beta release
1543

1644
## [0.1.0a5] - 2021-05-05
17-
### Added
18-
+ Added GitHub Action release process
19-
+ `probe` and `ephys` elements
20-
+ Readers for: `SpikeGLX`, `Open Ephys`, `Kilosort`
21-
+ Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS, 2.0 - MS
2245

46+
+ Add - GitHub Action release process
47+
+ Add - `probe` and `ephys` elements
48+
+ Add - Readers for: `SpikeGLX`, `Open Ephys`, `Kilosort`
49+
+ Add - Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS, 2.0 - MS
2350

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
55+
[0.1.0]: https://github.com/datajoint/element-array-ephys/compare/0.1.0b0...0.1.0
2456
[0.1.0b0]: https://github.com/datajoint/element-array-ephys/compare/0.1.0a5...0.1.0b0
2557
[0.1.0a5]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.0a5

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,30 @@ ephys pipeline.
2222

2323
## Element architecture
2424

25-
![element-array-ephys diagram](images/attached_array_ephys_element.svg)
25+
`element-array-ephys` is comprised of two schemas, `probe` and `ephys`. To handle
26+
several use cases of this pipeline, we have designed several `ephys` schemas, including
27+
`ephys_acute`, `ephys_chronic`, and `ephys_precluster`.
28+
29+
+ `ephys_acute` - A probe(s) is inserted into a new location during each session.
30+
31+
+ `ephys_chronic` - A probe(s) is inserted once and used to record across multiple
32+
sessions.
33+
34+
+ `ephys_precluster` - A probe(s) is inserted into a new location during each session.
35+
And pre-clustering steps (e.g. CatGT) are performed on the data from each probe prior
36+
to Kilosort analysis.
37+
38+
### `ephys_acute` module
39+
![element-array-ephys acute diagram](images/attached_array_ephys_element_acute.svg)
40+
41+
42+
### `ephys_chronic` module
43+
![element-array-ephys chronic diagram](images/attached_array_ephys_element_chronic.svg)
44+
45+
### `ephys_precluster` module
46+
![element-array-ephys precluster diagram](
47+
images/attached_array_ephys_element_precluster.svg)
48+
2649

2750
As the diagram depicts, the array ephys element starts immediately downstream from `Session`,
2851
and also requires some notion of `Location` as a dependency for `InsertionLocation`. We

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

0 commit comments

Comments
 (0)