Skip to content

Commit 152cc58

Browse files
committed
2 parents 2df6280 + d5b9586 commit 152cc58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1610
-605
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ ENV/
102102

103103
# mkdocs documentation
104104
docs/site
105+
docs/src/tutorials/*ipynb
105106

106107
# mypy
107108
.mypy_cache/
@@ -123,3 +124,6 @@ docker-compose.y*ml
123124
# vscode settings
124125
.vscode
125126
*.code-workspace
127+
128+
# exports/notes
129+
temp*

.markdownlint.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Markdown Linter configuration for docs
2+
# https://github.com/DavidAnson/markdownlint
3+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
4+
MD009: false # permit trailing spaces
5+
MD007: false # List indenting - permit 4 spaces
6+
MD013:
7+
line_length: "88" # Line length limits
8+
tables: false # disable for tables
9+
headings: false # disable for headings
10+
MD030: false # Number of spaces after a list
11+
MD033: # HTML elements allowed
12+
allowed_elements:
13+
- "br"
14+
MD034: false # Permit bare URLs
15+
MD031: false # Spacing w/code blocks. Conflicts with `??? Note` and code tab styling
16+
MD046: false # Spacing w/code blocks. Conflicts with `??? Note` and code tab styling

.pre-commit-config.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
default_stages: [commit, push]
2+
exclude: (^.github/|^docs/|^images/)
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.4.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
- id: check-yaml
11+
- id: check-added-large-files # prevent giant files from being committed
12+
- id: requirements-txt-fixer
13+
- id: mixed-line-ending
14+
args: ["--fix=lf"]
15+
description: Forces to replace line ending by the UNIX 'lf' character.
16+
17+
# black
18+
- repo: https://github.com/psf/black
19+
rev: 22.12.0
20+
hooks:
21+
- id: black
22+
- id: black-jupyter
23+
args:
24+
- --line-length=88
25+
26+
# isort
27+
- repo: https://github.com/pycqa/isort
28+
rev: 5.11.2
29+
hooks:
30+
- id: isort
31+
args: ["--profile", "black"]
32+
description: Sorts imports in an alphabetical order
33+
34+
# flake8
35+
- repo: https://github.com/pycqa/flake8
36+
rev: 4.0.1
37+
hooks:
38+
- id: flake8
39+
args: # arguments to configure flake8
40+
# making isort line length compatible with black
41+
- "--max-line-length=88"
42+
- "--max-complexity=18"
43+
- "--select=B,C,E,F,W,T4,B9"
44+
45+
# these are errors that will be ignored by flake8
46+
# https://www.flake8rules.com/rules/{code}.html
47+
- "--ignore=E203,E501,W503,W605,E402"
48+
# E203 - Colons should not have any space before them.
49+
# Needed for list indexing
50+
# E501 - Line lengths are recommended to be no greater than 79 characters.
51+
# Needed as we conform to 88
52+
# W503 - Line breaks should occur after the binary operator.
53+
# Needed because not compatible with black
54+
# W605 - a backslash-character pair that is not a valid escape sequence now
55+
# generates a DeprecationWarning. This will eventually become a SyntaxError.
56+
# Needed because we use \d as an escape sequence
57+
# E402 - Place module level import at the top.
58+
# Needed to prevent circular import error

CHANGELOG.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,35 @@
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.2.1] - Unreleased
6+
## [0.2.3] - Unreleased
77

8+
+ Add - extras_require install options for nwb and development requirement sets
9+
+ Add - mkdocs notebook rendering
10+
+ Add - markdown linting and spellcheck config files, with implementation edits
11+
+ Update - license for 2023
12+
+ Update - blackify previous updates
13+
14+
## [0.2.2] - 2022-01-11
15+
16+
+ Bugfix - Revert import order in `__init__.py` to avoid circular import error.
17+
+ Update - `.pre-commit-config.yaml` to disable automatic positioning of import
18+
statement at the top.
19+
+ Bugfix - Update docstrings to render API for documentation website.
20+
21+
## [0.2.1] - 2022-01-06
22+
23+
+ Add - `build_electrode_layouts` function in `probe.py` to compute the electrode layout
24+
for all types of probes.
25+
+ Update - parameterize run_CatGT step from parameters retrieved from
26+
`ClusteringParamSet` table
827
+ Update - clustering step, update duration for "median_subtraction" step
928
+ Bugfix - handles single probe recording in "Neuropix-PXI" format
1029
+ Update - safeguard in creating/inserting probe types upon probe activation
30+
+ Add - quality control metric dashboard
31+
+ Update & fix docstrings
32+
+ Update - `ephys_report.UnitLevelReport` to add `ephys.ClusterQualityLabel` as a
33+
foreign key reference
34+
+ Add - `.pre-commit-config.yaml`
1135

1236
## [0.2.0] - 2022-10-28
1337

@@ -16,15 +40,17 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
1640
+ Add - Add `ephys_no_curation` and routines to trigger spike-sorting analysis
1741
using Kilosort (2.0, 2.5)
1842
+ Add - mkdocs for Element Documentation
19-
+ Add - New `QualityMetrics` table to store clusters' and waveforms' metrics after the spike sorting analysis.
43+
+ Add - New `QualityMetrics` table to store clusters' and waveforms' metrics after the
44+
spike sorting analysis.
2045

2146
## [0.1.4] - 2022-07-11
2247

2348
+ Bugfix - Handle case where `spike_depths` data is present.
2449

2550
## [0.1.3] - 2022-06-16
2651

27-
+ Update - Allow for the `precluster_output_dir` attribute to be nullable when no pre-clustering is performed.
52+
+ Update - Allow for the `precluster_output_dir` attribute to be nullable when no
53+
pre-clustering is performed.
2854

2955
## [0.1.2] - 2022-06-09
3056

@@ -37,8 +63,9 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
3763
## [0.1.0] - 2022-05-26
3864

3965
+ Update - Rename module for acute probe insertions from `ephys.py` to `ephys_acute.py`.
40-
+ Add - Module for pre-clustering steps (`ephys_precluster.py`), which is built off of `ephys_acute.py`.
41-
+ Add - Module for chronic probe insertions (`ephys_chronic.py`).
66+
+ Add - Module for pre-clustering steps (`ephys_precluster.py`), which is built off of
67+
`ephys_acute.py`.
68+
+ Add - Module for chronic probe insertions (`ephys_chronic.py`).
4269
+ Bugfix - Missing `fileTimeSecs` key in SpikeGLX meta file.
4370
+ Update - Move common functions to `element-interface` package.
4471
+ Add - NWB export function
@@ -47,7 +74,6 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
4774

4875
+ Add - Processing with Kilosort and pyKilosort for Open Ephys and SpikeGLX
4976

50-
5177
## [0.1.0b0] - 2021-05-07
5278

5379
+ Update - First beta release
@@ -60,6 +86,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
6086
+ Add - Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS,
6187
2.0 - MS
6288

89+
[0.2.3]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.3
90+
[0.2.2]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.2
6391
[0.2.1]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.1
6492
[0.2.0]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.0
6593
[0.1.4]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.4

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Contribution Guidelines
22

3-
This project follows the [DataJoint Contribution Guidelines](https://docs.datajoint.io/python/community/02-Contribute.html). Please reference the link for more full details.
3+
This project follows the
4+
[DataJoint Contribution Guidelines](https://datajoint.com/docs/community/contribute/).
5+
Please reference the link for more full details.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 DataJoint NEURO
3+
Copyright (c) 2023 DataJoint
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ fully functional pipeline.
88

99
![diagram](https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/diagram_flowchart.svg)
1010

11-
Installation and usage instructions can be found at the
11+
Installation and usage instructions can be found at the
1212
[Element documentation](https://datajoint.com/docs/elements/element-array-ephys).

cspell.json

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
// cSpell Settings
2+
//https://github.com/streetsidesoftware/vscode-spell-checker
3+
{
4+
"version": "0.2", // Version of the setting file. Always 0.2
5+
"language": "en", // language - current active spelling language
6+
"enabledLanguageIds": [
7+
"markdown", "yaml", "python"
8+
],
9+
// flagWords - list of words to be always considered incorrect
10+
// This is useful for offensive words and common spelling errors.
11+
// For example "hte" should be "the"
12+
"flagWords": [],
13+
"allowCompoundWords": true,
14+
"ignorePaths": [
15+
"./element_array_ephys.egg-info/*",
16+
"./images/*"
17+
],
18+
"words": [
19+
"acorr",
20+
"aggr",
21+
"Alessio",
22+
"Andreas",
23+
"apmeta",
24+
"arange",
25+
"asarray",
26+
"astype",
27+
"autocorrelogram",
28+
"Axona",
29+
"bbins",
30+
"bdist",
31+
"Binarize",
32+
"Brody",
33+
"Buccino",
34+
"catgt",
35+
"cbar",
36+
"cbin",
37+
"cdat",
38+
"Chans",
39+
"chans",
40+
"chns",
41+
"Clust",
42+
"clusterings",
43+
"cmap",
44+
"correlogram",
45+
"correlograms",
46+
"curations",
47+
"DANDI",
48+
"decomp",
49+
"DISTRO",
50+
"djbase",
51+
"dtype",
52+
"ecephys",
53+
"electrophysiogical",
54+
"elif",
55+
"Ephys",
56+
"gblcar",
57+
"gfix",
58+
"hdmf",
59+
"HHMI",
60+
"hstack",
61+
"ibllib",
62+
"ifnull",
63+
"Imax",
64+
"IMAX",
65+
"imax",
66+
"imec",
67+
"imread",
68+
"imro",
69+
"imrotbl",
70+
"imshow",
71+
"inlinehilite",
72+
"ipynb",
73+
"ipywidgets",
74+
"kcoords",
75+
"Klusta",
76+
"Kwik",
77+
"lfmeta",
78+
"linenums",
79+
"mdict",
80+
"Mesoscale",
81+
"mkdocs",
82+
"mkdocstrings",
83+
"Moser",
84+
"mtscomp",
85+
"Nchan",
86+
"nchan",
87+
"ndarray",
88+
"ndim",
89+
"ndimage",
90+
"Neuralynx",
91+
"NEURO",
92+
"neuroconv",
93+
"Neurodata",
94+
"Neuropix",
95+
"neuropixel",
96+
"NeuroPixels",
97+
"nwbfile",
98+
"NWBHDF",
99+
"oebin",
100+
"openephys",
101+
"openephys",
102+
"openpyxl",
103+
"phylog",
104+
"plotly",
105+
"PSTH",
106+
"pykilosort",
107+
"pymdownx",
108+
"pynwb",
109+
"pyopenephys",
110+
"pyplot",
111+
"pytest",
112+
"Reimer",
113+
"repolarization",
114+
"Roboto",
115+
"RRID",
116+
"Rxiv",
117+
"Sasaki",
118+
"scipy",
119+
"sdist",
120+
"Siegle",
121+
"sess",
122+
"SGLX",
123+
"Shen",
124+
"Sitonic",
125+
"spikeglx",
126+
"spkcount",
127+
"Stereotaxic",
128+
"tcat",
129+
"tickvals",
130+
"tofile",
131+
"Tolias",
132+
"tqdm",
133+
"vline",
134+
"Vmax",
135+
"vmax",
136+
"xanchor",
137+
"xaxes",
138+
"xaxis",
139+
"xcoords",
140+
"xcorr",
141+
"xlabel",
142+
"xlim",
143+
"XPOS",
144+
"xtick",
145+
"Yatsenko",
146+
"yaxes",
147+
"yaxis",
148+
"ycoord",
149+
"ycoords",
150+
"ylabel",
151+
"ylim",
152+
"YPOS",
153+
"yref",
154+
"yticks"
155+
]
156+
}

docs/.docker/pip_requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ mdx-truly-sane-lists
77
mkdocs-gen-files
88
mkdocs-literate-nav
99
mkdocs-exclude-search
10-
mkdocs-markdownextradata-plugin
10+
mkdocs-markdownextradata-plugin
11+
mkdocs-jupyter

docs/docker-compose.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,17 @@ services:
2828
- |
2929
git config --global --add safe.directory /main
3030
set -e
31+
export ELEMENT_UNDERSCORE=$$(echo $${PACKAGE} | sed 's/element_//g')
32+
export ELEMENT_HYPHEN=$$(echo $${ELEMENT_UNDERSCORE} | sed 's/_/-/g')
3133
export PATCH_VERSION=$$(cat /main/$${PACKAGE}/version.py | grep -oE '\d+\.\d+\.[a-z0-9]+')
34+
git clone https://github.com/datajoint/workflow-$${ELEMENT_HYPHEN}.git /main/delete || true
35+
if [ -d /main/delete/ ]; then
36+
mv /main/delete/workflow_$${ELEMENT_UNDERSCORE} /main/
37+
mv /main/delete/notebooks/*ipynb /main/docs/src/tutorials/
38+
rm -fR /main/delete
39+
fi
3240
if echo "$${MODE}" | grep -i live &>/dev/null; then
33-
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
41+
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80 2>&1 | tee docs/temp_mkdocs.log
3442
elif echo "$${MODE}" | grep -iE "qa|push" &>/dev/null; then
3543
echo "INFO::Delete gh-pages branch"
3644
git branch -D gh-pages || true

0 commit comments

Comments
 (0)