-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from CBroz1/dev
Add pre-commit & utilities for pytests
- Loading branch information
Showing
23 changed files
with
230 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Markdown Linter configuration for docs | ||
# https://github.com/DavidAnson/markdownlint | ||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
MD009: false # permit trailing spaces | ||
MD007: false # List indenting - permit 4 spaces | ||
MD013: | ||
line_length: "88" # Line length limits | ||
tables: false # disable for tables | ||
headings: false # disable for headings | ||
MD030: false # Number of spaces after a list | ||
MD033: # HTML elements allowed | ||
allowed_elements: | ||
- "br" | ||
MD034: false # Permit bare URLs | ||
MD031: false # Spacing w/code blocks. Conflicts with `??? Note` and code tab styling | ||
MD046: false # Spacing w/code blocks. Conflicts with `??? Note` and code tab styling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
default_stages: [commit, push] | ||
exclude: (^.github/|^docs/|^images/) | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files # prevent giant files from being committed | ||
- id: requirements-txt-fixer | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
description: Forces to replace line ending by the UNIX 'lf' character. | ||
|
||
# black | ||
- repo: https://github.com/psf/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
- id: black-jupyter | ||
args: | ||
- --line-length=88 | ||
|
||
# isort | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.11.2 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
description: Sorts imports in an alphabetical order | ||
|
||
# flake8 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
args: # arguments to configure flake8 | ||
# making isort line length compatible with black | ||
- "--max-line-length=88" | ||
- "--max-complexity=18" | ||
- "--select=B,C,E,F,W,T4,B9" | ||
|
||
# these are errors that will be ignored by flake8 | ||
# https://www.flake8rules.com/rules/{code}.html | ||
- "--ignore=E203,E501,W503,W605" | ||
# E203 - Colons should not have any space before them. | ||
# Needed for list indexing | ||
# E501 - Line lengths are recommended to be no greater than 79 characters. | ||
# Needed as we conform to 88 | ||
# W503 - Line breaks should occur after the binary operator. | ||
# Needed because not compatible with black | ||
# W605 - a backslash-character pair that is not a valid escape sequence now | ||
# generates a DeprecationWarning. This will eventually become a SyntaxError. | ||
# Needed because we use \d as an escape sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Contribution Guidelines | ||
|
||
This project follows the [DataJoint Contribution Guidelines](https://docs.datajoint.io/python/community/02-Contribute.html). Please reference the link for more full details. | ||
This project follows the | ||
[DataJoint Contribution Guidelines](https://datajoint.com/docs/community/contribute/). | ||
Please reference the link for more full details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// cSpell Settings | ||
//https://github.com/streetsidesoftware/vscode-spell-checker | ||
{ | ||
"version": "0.2", // Version of the setting file. Always 0.2 | ||
"language": "en", // language - current active spelling language | ||
"enabledLanguageIds": [ | ||
"markdown", | ||
"yaml" | ||
], | ||
// flagWords - list of words to be always considered incorrect | ||
// This is useful for offensive words and common spelling errors. | ||
// For example "hte" should be "the" | ||
"flagWords": [], | ||
"allowCompoundWords": true, | ||
"ignorePaths": [ | ||
], | ||
"words": [ | ||
"isort", | ||
"Bruker", | ||
"Neurodata", | ||
"Prairie", | ||
"CNMF", | ||
"deconvolution" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import os | ||
import subprocess | ||
|
||
from dandi.download import download | ||
from dandi.upload import upload | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.