Skip to content

Commit 662eb82

Browse files
authored
Merge pull request #23 from CBroz1/main
Add linters, update docs
2 parents d68a61c + 2d89282 commit 662eb82

23 files changed

+308
-69
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ temp*
7575
*nwb
7676

7777
#mkdocs documentation
78-
site
78+
site
79+
docs/src/tutorials/*ipynb

.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: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
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.
5+
6+
## [0.1.3] - Unreleased
7+
8+
+ Add - Notebook rendering in docs
9+
+ Add - Pre-commit, cspell, and markdown linters
410

511
## [0.1.2] - 2022-10-21
12+
613
+ Add - mkdocs deployment with workflow API docs
714

815
## [0.1.1] - 2022-10-11
9-
### Added
10-
+ CICD workflows for PyPI release
16+
17+
+ Add - CICD workflows for PyPI release
1118

1219
## [0.1.0] - 2022-05-10
13-
### Added
14-
+ Table architecture reflecting precursor projects
15-
+ Loaders for CCF atlas and channel locations json files
16-
+ Adopted black formatting into code base
1720

21+
+ Add - Table architecture reflecting precursor projects
22+
+ Add - Loaders for CCF atlas and channel locations json files
23+
+ Add - Adopted black formatting into code base
24+
25+
[0.1.3]: https://github.com/datajoint/element-electrode-localization/releases/tag/0.1.3
1826
[0.1.2]: https://github.com/datajoint/element-electrode-localization/releases/tag/0.1.2
1927
[0.1.1]: https://github.com/datajoint/element-electrode-localization/releases/tag/0.1.1
2028
[0.1.0]: https://github.com/datajoint/element-electrode-localization/releases/tag/0.1.0

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.org/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.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ RUN \
1212
cd /main && \
1313
pip install . && \
1414
rm -R /main/*
15-
WORKDIR /main
15+
WORKDIR /main

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 DataJoint
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
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

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

99
![diagram](https://raw.githubusercontent.com/datajoint/element-electrode-localization/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-electrode-localization).

cspell.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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",
8+
"yaml",
9+
"python"
10+
],
11+
// flagWords - list of words to be always considered incorrect
12+
// This is useful for offensive words and common spelling errors.
13+
// For example "hte" should be "the"
14+
"flagWords": [],
15+
"allowCompoundWords": true,
16+
"ignorePaths": [
17+
"./*.egg-info/*",
18+
"./images/*"
19+
],
20+
"words": [
21+
"amygdalar",
22+
"Andreas",
23+
"astype",
24+
"Axona",
25+
"Ayres",
26+
"Binarize",
27+
"Brody",
28+
"Buccino",
29+
"Chans",
30+
"cingulate",
31+
"DANDI",
32+
"DISTRO",
33+
"djtooltip",
34+
"djtooltiptext",
35+
"dtype",
36+
"elec",
37+
"eloc",
38+
"Ephys",
39+
"Feng",
40+
"Hawrylycz",
41+
"iblapps",
42+
"inlinehilite",
43+
"ipynb",
44+
"iterrows",
45+
"jupytext",
46+
"Lein",
47+
"Lesnar",
48+
"linenums",
49+
"Mesoscale",
50+
"mkdocstrings",
51+
"Moser",
52+
"nbconvert",
53+
"nbformat",
54+
"NEURO",
55+
"neuroanatomy",
56+
"neuroconv",
57+
"Neurodata",
58+
"neuroinformatics",
59+
"Neuropix",
60+
"NeuroPixels",
61+
"nrrd",
62+
"NWBHDF",
63+
"PSTH",
64+
"Purkinje",
65+
"pymdownx",
66+
"Reimer",
67+
"Roboto",
68+
"RRID",
69+
"Rxiv",
70+
"Sasaki",
71+
"Shen",
72+
"Siegle",
73+
"Sitonic",
74+
"Tolias",
75+
"tqdm",
76+
"Voxel",
77+
"xlink",
78+
"Yatsenko"
79+
]
80+
}

docker-compose-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ services:
2323
- |
2424
set -e
2525
rm -R build dist *.egg-info || echo "No prev build"
26-
python setup.py bdist_wheel sdist
26+
python setup.py bdist_wheel sdist

0 commit comments

Comments
 (0)