Skip to content

Commit b937ab6

Browse files
committed
Merge branch 'main' of datajoint/element-interface
2 parents 78b031b + 51b9bdc commit b937ab6

25 files changed

+526
-111
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# User data
22
.DS_Store
33
temp*
4+
user_data/
45

56
# Byte-compiled / optimized / DLL files
67
__pycache__/
@@ -114,4 +115,3 @@ dj_local_conf_old.json
114115
**/*~
115116
**/#*#
116117
**/.#*
117-
docker-compose.y*ml

.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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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"
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

CHANGELOG.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,51 @@
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

5-
## [0.3.1] - Unreleased
6+
## [0.5.4] - 2023-05-14
7+
8+
+ Fix - DANDI URL for uploads where `staging=False`.
9+
10+
## [0.5.3] - 2023-05-11
11+
12+
+ Fix - `.ipynb` dark mode output for all notebooks.
13+
+ Fix - Remove `GOOGLE_ANALYTICS_KEY` from `u24_element_release_call.yml`.
14+
15+
## [0.5.2] - 2023-04-28
16+
17+
+ Fix - `.ipynb` output in tutorials is not visible in dark mode.
18+
19+
## [0.5.1] - 2023-03-15
20+
21+
+ Fix - ingestion routine for multiple Z devices in `prairieviewreader.py`.
22+
23+
## [0.5.0] - 2023-01-09
24+
25+
+ Remove - `recursive_search` function
26+
+ Add - pre-commit checks to the repo to observe flake8, black, isort
27+
+ Add - `value_to_bool` and `QuietStdOut` utilities
28+
29+
## [0.4.2] - 2022-12-16
30+
31+
+ Update - PrairieView loader checks for multi-plane vs single-plane scans.
32+
33+
## [0.4.1] - 2022-12-15
34+
35+
+ Update - PrairieView loader now reads recording start time from metadata file
36+
37+
## [0.4.0] - 2022-12-14
638

739
+ Add - mkdocs documentation
840
+ Add - improved docstrings for mkdocs
41+
+ Add - EXTRACT trigger and loader tools
942

1043
## [0.3.0] - 2022-10-7
1144

12-
+ Add - Function `prairieviewreader` to parse metadata from Bruker PrarieView acquisition system
45+
+ Add - Function `prairieviewreader` to parse metadata from Bruker PrarieView acquisition
46+
system
1347
+ Update - Changelog with tag links
1448

15-
1649
## [0.2.1] - 2022-07-13
1750

1851
+ Add - Adopt `black` formatting
@@ -25,7 +58,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
2558
+ Add - Function `run_caiman` to trigger CNMF algorithm.
2659
+ Add - Function `ingest_csv_to_table` to insert data from CSV files into tables.
2760
+ Add - Function `recursive_search` to search through nested dictionary for a key.
28-
+ Add - Function `upload_to_dandi` to upload Neurodata Without Borders file to the DANDI platform.
61+
+ Add - Function `upload_to_dandi` to upload Neurodata Without Borders file to the DANDI
62+
platform.
2963
+ Update - Remove `extras_require` feature to allow this package to be published to PyPI.
3064

3165
## [0.1.0a1] - 2022-01-12
@@ -36,6 +70,14 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
3670

3771
+ Add - Readers for: `ScanImage`, `Suite2p`, `CaImAn`.
3872

73+
[0.5.4]: https://github.com/datajoint/element-interface/releases/tag/0.5.4
74+
[0.5.3]: https://github.com/datajoint/element-interface/releases/tag/0.5.3
75+
[0.5.2]: https://github.com/datajoint/element-interface/releases/tag/0.5.2
76+
[0.5.1]: https://github.com/datajoint/element-interface/releases/tag/0.5.1
77+
[0.5.0]: https://github.com/datajoint/element-interface/releases/tag/0.5.0
78+
[0.4.2]: https://github.com/datajoint/element-interface/releases/tag/0.4.2
79+
[0.4.1]: https://github.com/datajoint/element-interface/releases/tag/0.4.1
80+
[0.4.0]: https://github.com/datajoint/element-interface/releases/tag/0.4.0
3981
[0.3.0]: https://github.com/datajoint/element-interface/releases/tag/0.3.0
4082
[0.2.1]: https://github.com/datajoint/element-interface/releases/tag/0.2.1
4183
[0.2.0]: https://github.com/datajoint/element-interface/releases/tag/0.2.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.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
@@ -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
@@ -7,5 +7,5 @@ corresponding database tables that can be combined with other Elements to assemb
77
fully functional pipeline. Element Interface is home to a number of utilities that make
88
this possible.
99

10-
Installation and usage instructions can be found at the
10+
Installation and usage instructions can be found at the
1111
[Element documentation](https://datajoint.com/docs/elements/element-interface).

cspell.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
],
10+
// flagWords - list of words to be always considered incorrect
11+
// This is useful for offensive words and common spelling errors.
12+
// For example "hte" should be "the"
13+
"flagWords": [],
14+
"allowCompoundWords": true,
15+
"ignorePaths": [
16+
],
17+
"words": [
18+
"isort",
19+
"Bruker",
20+
"Neurodata",
21+
"Prairie",
22+
"CNMF",
23+
"deconvolution"
24+
]
25+
}

docs/docker-compose.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# MODE="LIVE|QA|PUSH" PACKAGE=element_interface UPSTREAM_REPO=https://github.com/datajoint/element-interface.git HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
2+
#
3+
# navigate to http://localhost/
4+
version: "2.4"
5+
services:
6+
docs:
7+
build:
8+
dockerfile: docs/.docker/Dockerfile
9+
context: ../
10+
args:
11+
- PACKAGE
12+
image: ${PACKAGE}-docs
13+
environment:
14+
- PACKAGE
15+
- UPSTREAM_REPO
16+
- MODE
17+
- GOOGLE_ANALYTICS_KEY
18+
- PATCH_VERSION
19+
volumes:
20+
- ../docs:/main/docs
21+
- ../${PACKAGE}:/main/${PACKAGE}
22+
user: ${HOST_UID}:anaconda
23+
ports:
24+
- 80:80
25+
command:
26+
- sh
27+
- -c
28+
- |
29+
git config --global --add safe.directory /main
30+
set -e
31+
export PATCH_VERSION=$$(cat /main/$${PACKAGE}/version.py | grep -oE '\d+\.\d+\.[a-z0-9]+')
32+
if echo "$${MODE}" | grep -i live &>/dev/null; then
33+
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
34+
elif echo "$${MODE}" | grep -iE "qa|push" &>/dev/null; then
35+
echo "INFO::Delete gh-pages branch"
36+
git branch -D gh-pages || true
37+
echo "INFO::Fetch upstream gh-pages"
38+
git fetch $${UPSTREAM_REPO} gh-pages:gh-pages && git switch gh-pages || git switch --orphan gh-pages && git commit --allow-empty -m "init commit"
39+
echo "INFO::mike"
40+
mike deploy --config-file ./docs/mkdocs.yaml -u $$(grep -oE '\d+\.\d+' /main/$${PACKAGE}/version.py) latest
41+
mike set-default --config-file ./docs/mkdocs.yaml latest
42+
if echo "$${MODE}" | grep -i qa &>/dev/null; then
43+
mike serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
44+
elif echo "$${MODE}" | grep -i push &>/dev/null; then
45+
echo "INFO::Push gh-pages to upstream"
46+
git push $${UPSTREAM_REPO} gh-pages
47+
fi
48+
else
49+
echo "Unexpected mode..."
50+
exit 1
51+
fi

docs/src/.overrides/assets/stylesheets/extra.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,8 @@ html a[title="YouTube"].md-social__link svg {
9191
/* previous/next text */
9292
/* --md-footer-fg-color: var(--dj-white); */
9393
}
94+
95+
[data-md-color-scheme="slate"] td,
96+
th {
97+
color: var(--dj-black)
98+
}

0 commit comments

Comments
 (0)