Skip to content

Commit d5b9586

Browse files
authored
Merge pull request #124 from CBroz1/main
Cleanup docstrings, add notebook render
2 parents eababbc + 4796056 commit d5b9586

31 files changed

+671
-392
lines changed

.gitignore

Lines changed: 1 addition & 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/

.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

CHANGELOG.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,34 @@
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.3] - Unreleased
7+
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+
614
## [0.2.2] - 2022-01-11
715

816
+ Bugfix - Revert import order in `__init__.py` to avoid circular import error.
9-
+ Update - `.pre-commit-config.yaml` to disable automatic positioning of import statement at the top.
17+
+ Update - `.pre-commit-config.yaml` to disable automatic positioning of import
18+
statement at the top.
1019
+ Bugfix - Update docstrings to render API for documentation website.
1120

1221
## [0.2.1] - 2022-01-06
1322

14-
+ Add - `build_electrode_layouts` function in `probe.py` to compute the electrode layout for all types of probes.
15-
+ Update - parameterize run_CatGT step from parameters retrieved from `ClusteringParamSet` table
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
1627
+ Update - clustering step, update duration for "median_subtraction" step
1728
+ Bugfix - handles single probe recording in "Neuropix-PXI" format
1829
+ Update - safeguard in creating/inserting probe types upon probe activation
1930
+ Add - quality control metric dashboard
2031
+ Update & fix docstrings
21-
+ Update - `ephys_report.UnitLevelReport` to add `ephys.ClusterQualityLabel` as a foreign key reference
32+
+ Update - `ephys_report.UnitLevelReport` to add `ephys.ClusterQualityLabel` as a
33+
foreign key reference
2234
+ Add - `.pre-commit-config.yaml`
2335

2436
## [0.2.0] - 2022-10-28
@@ -28,15 +40,17 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
2840
+ Add - Add `ephys_no_curation` and routines to trigger spike-sorting analysis
2941
using Kilosort (2.0, 2.5)
3042
+ Add - mkdocs for Element Documentation
31-
+ 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.
3245

3346
## [0.1.4] - 2022-07-11
3447

3548
+ Bugfix - Handle case where `spike_depths` data is present.
3649

3750
## [0.1.3] - 2022-06-16
3851

39-
+ 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.
4054

4155
## [0.1.2] - 2022-06-09
4256

@@ -49,7 +63,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
4963
## [0.1.0] - 2022-05-26
5064

5165
+ Update - Rename module for acute probe insertions from `ephys.py` to `ephys_acute.py`.
52-
+ Add - Module for pre-clustering steps (`ephys_precluster.py`), which is built off of `ephys_acute.py`.
66+
+ Add - Module for pre-clustering steps (`ephys_precluster.py`), which is built off of
67+
`ephys_acute.py`.
5368
+ Add - Module for chronic probe insertions (`ephys_chronic.py`).
5469
+ Bugfix - Missing `fileTimeSecs` key in SpikeGLX meta file.
5570
+ Update - Move common functions to `element-interface` package.
@@ -59,7 +74,6 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
5974

6075
+ Add - Processing with Kilosort and pyKilosort for Open Ephys and SpikeGLX
6176

62-
6377
## [0.1.0b0] - 2021-05-07
6478

6579
+ Update - First beta release
@@ -72,7 +86,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
7286
+ Add - Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS,
7387
2.0 - MS
7488

75-
89+
[0.2.3]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.3
7690
[0.2.2]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.2
7791
[0.2.1]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.1
7892
[0.2.0]: https://github.com/datajoint/element-array-ephys/releases/tag/0.2.0

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://datajoint.com/docs/community/contribute/). 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

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

docs/mkdocs.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,31 @@ repo_name: datajoint/element-array-ephys
77
nav:
88
- Element Array Ephys: index.md
99
- Concepts: concepts.md
10-
- Tutorials: tutorials.md
10+
- Tutorials:
11+
- Overview: tutorials/index.md
12+
- Data Download: tutorials/00-data-download-optional.ipynb
13+
- Configure: tutorials/01-configure.ipynb
14+
- Workflow Structure: tutorials/02-workflow-structure-optional.ipynb
15+
- Process: tutorials/03-process.ipynb
16+
- Automate: tutorials/04-automate-optional.ipynb
17+
- Explore: tutorials/05-explore.ipynb
18+
- Drop: tutorials/06-drop-optional.ipynb
19+
- Downstream Analysis: tutorials/07-downstream-analysis.ipynb
20+
- Visualizations: tutorials/10-data_visualization.ipynb
21+
- Electrode Localization: tutorials/08-electrode-localization.ipynb
22+
- NWB Export: tutorials/09-NWB-export.ipynb
1123
- Citation: citation.md
1224
- API: api/ # defer to gen-files + literate-nav
1325
- Changelog: changelog.md
1426

1527
# --------------------- NOTES TO CONTRIBUTORS -----------------------
1628
# Markdown in mkdocs
17-
# 01. Redering concatenates across single line breaks. This means...
29+
# 01. Rendering concatenates across single line breaks. This means...
1830
# A. We have to be careful to add extra line breaks around paragraphs,
19-
# including between the end of a pgf and the beginnign of bullets.
31+
# including between the end of a pgf and the beginning of bullets.
2032
# B. We can use hard wrapping to make github reviews easier to read.
2133
# VSCode Rewrap extension offers a keyboard shortcut for hard wrap
22-
# at the ruler, but don't add breaks in [multiword links](example.com)
34+
# at the ruler, but don't add breaks in [multi-word links](example.com)
2335
# 02. Instead of designating codeblocks with bash, use console. For example..
2436
# ```console
2537
# cd ../my_dir
@@ -43,9 +55,9 @@ nav:
4355
# HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
4456
# ```
4557
# 02. Site analytics depend on a local environment variable GOOGLE_ANALYTICS_KEY
46-
# You can find this in LastPass or declare with any string to suprress errors
58+
# You can find this in LastPass or declare with any string to suppress errors
4759
# 03. The API section will pull docstrings.
48-
# A. Follow google styleguide e.g.,
60+
# A. Follow google style guide e.g.,
4961
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
5062
# With typing suggestions: https://docs.python.org/3/library/typing.html
5163
# B. To pull a specific workflow fork, change ./docs/src/api/make_pages.py#L19
@@ -92,6 +104,12 @@ plugins:
92104
# "index.md": "getting_started.md"
93105
- mkdocstrings:
94106
default_handler: python
107+
handlers:
108+
python:
109+
options:
110+
members_order: source
111+
group_by_category: false
112+
line_length: 88
95113
- gen-files:
96114
scripts:
97115
- ./src/api/make_pages.py
@@ -100,6 +118,8 @@ plugins:
100118
- exclude-search:
101119
exclude:
102120
- "*/navigation.md"
121+
- mkdocs-jupyter:
122+
ignore_h1_titles: True
103123
markdown_extensions:
104124
- attr_list
105125
- toc:
@@ -120,6 +140,7 @@ markdown_extensions:
120140
linenums: true
121141
- pymdownx.inlinehilite
122142
- pymdownx.snippets
143+
- footnotes
123144

124145
extra:
125146
PATCH_VERSION: !ENV PATCH_VERSION

0 commit comments

Comments
 (0)