Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tutorial and codespace #91

Merged
merged 206 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
94546b1
Create README.md
yambottle Dec 17, 2021
cfac635
add gitignore
CBroz1 Dec 17, 2021
1f324c1
Initial structure
CBroz1 Dec 17, 2021
aa01866
delete notes file
CBroz1 Dec 17, 2021
4ddf02f
Delete .DS_Store
CBroz1 Dec 17, 2021
5550ed8
remove ds_stores
CBroz1 Dec 17, 2021
eb3ba17
repo standard items - changelog, contrib
CBroz1 Jan 6, 2022
8350d39
Example ingestion in notebook 01
CBroz1 Jan 13, 2022
a580a4c
minor: remove debug notebook cell
CBroz1 Jan 13, 2022
87a1f49
new dev branch
CBroz1 Jan 21, 2022
3494447
Refactor readme, remove images, add docker. See details
CBroz1 Jan 27, 2022
9b368cb
Cleanup: README, versioning, add ToDo notes
CBroz1 Jan 27, 2022
8e7ca78
README+CHANGELOG clarity
CBroz1 Feb 2, 2022
99859a6
Merge from CBroz1/dev
CBroz1 Feb 3, 2022
3a3ba77
draft ingest edits
CBroz1 Feb 21, 2022
598b0e2
new notebook for modeling use
CBroz1 Feb 22, 2022
4daf262
recordings.csv edit for new dev
CBroz1 Feb 28, 2022
365a090
See Details
CBroz1 Mar 4, 2022
4c9cae1
Draft notebooks. WIP Integration Tests
CBroz1 Mar 8, 2022
bbf2d5d
update NBs 0 - 3
CBroz1 Mar 9, 2022
21f7494
Split dlc schema
CBroz1 Mar 11, 2022
4bbdfc0
See details. Docker, Notebooks, JupyText, ingest.py
CBroz1 Mar 21, 2022
4338899
revise version info
CBroz1 Mar 21, 2022
d0d94b6
Update notebooks for separate video tables across schemas
CBroz1 Mar 22, 2022
ff7cf58
add `Session = session.Session` to pipeline.py, from code review
CBroz1 Mar 22, 2022
8095081
Merge pull request #2 from CBroz1/dev
CBroz1 Mar 22, 2022
981415c
Merge pull request #2 from CBroz1/main
Mar 22, 2022
2003826
minor README updates
CBroz1 Mar 22, 2022
20e0f06
Update README.md from code review suggestion
CBroz1 Mar 22, 2022
9a5a1d8
Merge pull request #5 from CBroz1/main
kabilar Mar 22, 2022
3c4fe47
Add issue templates
kabilar Mar 23, 2022
bcc4eb9
Merge pull request #6 from kabilar/main
CBroz1 Mar 24, 2022
4317fd7
Add citation section
kabilar Apr 15, 2022
886d3f4
Add links to elements.datajoint.org
kabilar Apr 15, 2022
0e19c7f
Remove upstream element images to shorten readme
kabilar Apr 15, 2022
2417a4b
Add links
kabilar Apr 15, 2022
11991b1
Fix format
kabilar Apr 15, 2022
e60d017
Update text
kabilar Apr 16, 2022
8584969
Add link to element.datajoint.org
kabilar Apr 17, 2022
0253e7e
Fix format
kabilar Apr 17, 2022
2259f3a
updates corresponding to element-deeplabcut PR #15
CBroz1 Apr 18, 2022
fdd12ac
Update format
kabilar Apr 18, 2022
1df9bf0
Merge pull request #7 from kabilar/main
CBroz1 Apr 18, 2022
a18fedf
Merge branch 'main' of https://github.com/datajoint/workflow-deeplabcut
CBroz1 Apr 22, 2022
c828244
Generalize equipment table
CBroz1 May 6, 2022
04bc842
Apply suggestion from code review
CBroz1 May 10, 2022
b414498
Merge from cbroz1:main
CBroz1 May 10, 2022
ac63549
Apply suggestions from code review
CBroz1 May 10, 2022
dd10089
Add element_interface.utils.ingest_csv_to_table
CBroz1 May 10, 2022
345dd98
Apply suggestion from code review
CBroz1 May 10, 2022
ddbd725
Update workflow_deeplabcut/process.py
CBroz1 May 10, 2022
089e5a4
Update workflow_deeplabcut/process.py
CBroz1 May 10, 2022
6eaf310
Update workflow_deeplabcut/process.py
CBroz1 May 10, 2022
4eeb86a
Merge pull request #8 from CBroz1/main
kabilar May 10, 2022
c692fc5
blackify
CBroz1 May 10, 2022
7f02a96
Bump version
CBroz1 May 10, 2022
0e76b79
Merge pull request #11 from CBroz1/dj
kabilar May 12, 2022
d2aa171
WIP. See details.
CBroz1 Jul 1, 2022
2226891
WIP: Remaining files from prev commit
CBroz1 Jul 1, 2022
c7ffd43
WIP: migrate fixtures to conftest.py
CBroz1 Jul 1, 2022
5425bcf
WIP: Integration tests. See details.
CBroz1 Jul 6, 2022
33e92b4
WIP: More integration tests. See details.
CBroz1 Jul 7, 2022
c1aa455
WIP: all tests pass locally
CBroz1 Jul 12, 2022
af90a61
WIP: minor cleanup
CBroz1 Jul 12, 2022
6b12b85
WIP: docker edits. notebook revamp. incomplete
CBroz1 Jul 15, 2022
295df7e
WIP: jupysync
CBroz1 Jul 15, 2022
7fa0ddb
WIP: revise notebooks for new dataset
CBroz1 Jul 18, 2022
698105e
WIP: add visualization notebook
CBroz1 Jul 19, 2022
a0a76e9
WIP: Fix docker
CBroz1 Jul 19, 2022
edbff23
Apply suggestion from code review
CBroz1 Jul 21, 2022
c6ff6d6
Merge pull request #12 from CBroz1/dev
tdincer Aug 9, 2022
d7ba7e8
Docstrings -> Google style for mkdocs render
CBroz1 Oct 14, 2022
a729432
Add typing info for mkdocs
CBroz1 Oct 17, 2022
60997af
Simplify README, direct to new docs site
CBroz1 Oct 19, 2022
b141b1e
Add class docstring for Device
CBroz1 Oct 20, 2022
6584958
Update changelog. Add attribs to Device
CBroz1 Oct 21, 2022
3eec272
Update CHANGELOG.md
kushalbakshi Oct 27, 2022
2913c86
Update README.md
kushalbakshi Oct 27, 2022
a836e0a
Update CHANGELOG.md
kushalbakshi Oct 27, 2022
ba2667e
Merge pull request #14 from CBroz1/main
kushalbakshi Oct 27, 2022
d1dee80
Add remaining suggestion from #14
CBroz1 Oct 27, 2022
872d9a0
Fix typo
CBroz1 Oct 27, 2022
5e7fedd
Merge pull request #15 from CBroz1/main
kushalbakshi Oct 27, 2022
5a3a1e5
Fixed typo in README
kushalbakshi Oct 27, 2022
9ce9aef
Merge pull request #16 from kushalbakshi/main
CBroz1 Oct 27, 2022
32511f9
Update README.md
tdincer Nov 29, 2022
9d015e5
Merge pull request #17 from tdincer/main
kushalbakshi Nov 29, 2022
43635d5
🐛 Debug mkdocs notebooks rendering
CBroz1 Dec 5, 2022
3a6a635
🐛 Debug mkdocs notebooks rendering 2
CBroz1 Dec 5, 2022
1f93e11
Merge pull request #18 from CBroz1/main
tdincer Dec 13, 2022
415145c
Update requirements
kabilar Mar 10, 2023
f9d56eb
Update changelog
kabilar Mar 10, 2023
836a4e2
Update command
kabilar Mar 14, 2023
e1d82b2
Remove element-interface installation from source
kabilar Mar 14, 2023
299eb37
Merge pull request #19 from kabilar/main
Apr 21, 2023
a6b2c9f
Add GitHub Actions workflows
kabilar Apr 24, 2023
11f6773
Update changelog
kabilar Apr 24, 2023
205b5aa
Merge pull request #20 from kabilar/main
Apr 24, 2023
b566184
paths,pipeline moved; train and dlc_reader modif
MilagrosMarin Aug 2, 2023
4afc063
[WIP] Update project path in pose config
MilagrosMarin Aug 3, 2023
048c707
Merge 'datajoint/workflow/main' into element
MilagrosMarin Aug 3, 2023
0135a38
Move workflow pipeline files
MilagrosMarin Aug 3, 2023
9c123b5
Remove jupytext scripts and workflow version
MilagrosMarin Aug 3, 2023
22cb379
Rename `03-process` -> `tutorial`
MilagrosMarin Aug 4, 2023
be51282
merge paths and pipeline files, move to notebooks
MilagrosMarin Aug 4, 2023
ca01071
Update requirements configuration
MilagrosMarin Aug 4, 2023
d6dad59
[WIP] Update notebook and mac requirements
MilagrosMarin Aug 4, 2023
97b676a
Merge 'main' of datajoint/element-deeplabcut
MilagrosMarin Aug 4, 2023
5f50b4b
Update name from `pipeline` to `tutorial_pipeline`
MilagrosMarin Aug 8, 2023
3a2eba8
Update intro tutorial notebook
MilagrosMarin Aug 12, 2023
4e2a7eb
Tutorial: major changes & network training tested
MilagrosMarin Aug 12, 2023
b0ea7d4
processed_dir can not exist - bug fixed
MilagrosMarin Aug 19, 2023
745f5d4
Fix:generate triggers getattribute with model_name
MilagrosMarin Aug 19, 2023
f774713
add skip_duplicates to generate function
MilagrosMarin Aug 19, 2023
18daef4
change name for clarity to get_trajectory function
MilagrosMarin Aug 19, 2023
1ef12f9
important change to install dlc[apple_mchips]
MilagrosMarin Aug 19, 2023
0973437
dockerfile and devcontainer files for element-dlc
MilagrosMarin Sep 6, 2023
4820f75
comment `image element_dlc` code line before merge
MilagrosMarin Sep 6, 2023
61aa180
comment 'S3 location' for DLC-v1 to test dev
MilagrosMarin Sep 6, 2023
d0088ed
comment `environment` line with previous commit
MilagrosMarin Sep 6, 2023
2957160
use build instead of image to test the dev cont
MilagrosMarin Sep 6, 2023
6133ca7
add `context` in docker yaml as well
MilagrosMarin Sep 6, 2023
8a8d704
uncomment volumes in docker config file
MilagrosMarin Sep 6, 2023
8901870
apt-utils and apt-get in dockerfile
MilagrosMarin Sep 7, 2023
2a394ae
test: from python short command in dockerfile
MilagrosMarin Sep 7, 2023
a5a13f9
setup.py: delete code line about requirements.txt
MilagrosMarin Sep 7, 2023
160a32e
test: Revert two minor comments in dockerfile
MilagrosMarin Sep 7, 2023
ebfea90
revert dockerfile
MilagrosMarin Sep 7, 2023
ed8c1cc
test: no volumes workspaces dlc
MilagrosMarin Sep 7, 2023
30c3dff
test dockerfile: imaging_root_data_dir not needed
MilagrosMarin Sep 7, 2023
42fa38c
use FROM with base image without digest
MilagrosMarin Sep 7, 2023
f9c8eaa
test: try with calcium imaging image
MilagrosMarin Sep 7, 2023
e15b32f
test: change CaImaging image to build
MilagrosMarin Sep 7, 2023
2480421
test: environments and volumes commented in yaml
MilagrosMarin Sep 7, 2023
da33b01
setup comments deleted
MilagrosMarin Sep 7, 2023
9551723
from IMAGING_ROOT_DATA_DIR to DLC_ROOT_DATA_DIR
MilagrosMarin Sep 7, 2023
9354ac1
uncomment env&volumes but changed to element-dlc
MilagrosMarin Sep 7, 2023
e0fb8d3
dockerfile new env for dlc folder
MilagrosMarin Sep 7, 2023
da33fd4
removed files from git
MilagrosMarin Sep 7, 2023
3166830
change DLC_ROOT_DATA_DIR to example_data directory
MilagrosMarin Sep 7, 2023
845974a
removed more files from git
MilagrosMarin Sep 7, 2023
276487b
Recover files from git rm
MilagrosMarin Sep 11, 2023
6001819
Merge remote-tracking branch 'origin/element-dlc-test' into element-d…
MilagrosMarin Sep 11, 2023
842561f
Major changes for PR codespace environment
MilagrosMarin Sep 11, 2023
0b17199
Delete `docs` directory from this PR
MilagrosMarin Sep 11, 2023
ead5b39
Delete `.github` directory from this PR
MilagrosMarin Sep 11, 2023
c79f3f3
minor change in dockerfile
MilagrosMarin Sep 11, 2023
0eb7c3a
update`.github` directory
MilagrosMarin Sep 11, 2023
421e49d
update code_conduct, contrib and license files
MilagrosMarin Sep 11, 2023
ef0099c
update `.gitignore`
MilagrosMarin Sep 11, 2023
5a01ace
update `.yaml` files
MilagrosMarin Sep 11, 2023
6359f06
update `dockerfile` and `setup`
MilagrosMarin Sep 11, 2023
bd8f57c
test `dlc_default` in `Dockerfile`
MilagrosMarin Sep 11, 2023
9f816fb
delete redundancy
MilagrosMarin Sep 11, 2023
f74a497
Test codespaces: #depend.reduced, lines commented
MilagrosMarin Sep 11, 2023
f5eaae4
test minor change in dependencies in dockerfile
MilagrosMarin Sep 11, 2023
ae8ce7d
Install deeplabcut
MilagrosMarin Sep 11, 2023
f040971
Update setup.py
MilagrosMarin Sep 11, 2023
3480270
updated libraries in mchips installation
MilagrosMarin Sep 13, 2023
48e73e4
Merge branch 'element-dlc-test' of https://github.com/MilagrosMarin/e…
MilagrosMarin Sep 13, 2023
84e09d9
Update setup.py for DLC in M2 MacOS
MilagrosMarin Sep 13, 2023
38587c8
Update .github/workflows/test.yaml
MilagrosMarin Sep 22, 2023
735a1cb
restore docs/ directory
MilagrosMarin Sep 27, 2023
722edc1
Merge branch 'element-dlc-test' of https://github.com/MilagrosMarin/e…
MilagrosMarin Sep 28, 2023
89fd674
fix bug using ' ' in extra_require in setup.py
MilagrosMarin Sep 28, 2023
80100db
Update .github/ISSUE_TEMPLATE/config.yml
MilagrosMarin Sep 28, 2023
895dbd2
Merge branch 'element-dlc-test' of https://github.com/MilagrosMarin/e…
MilagrosMarin Sep 28, 2023
60f1a81
update dj_public_s3_location in docker-compose
MilagrosMarin Sep 28, 2023
89df0f4
add s3fs postcommand in devcontainer
MilagrosMarin Sep 28, 2023
8511b4e
delete comments in dockerfile
MilagrosMarin Sep 29, 2023
f30425f
SCIOPS-59 & add two dependencies in setup
MilagrosMarin Sep 29, 2023
49f2b2f
revert removing files in `element-deeplabcut`
MilagrosMarin Sep 29, 2023
1969e59
Add `env` variables and prefix to dj database
MilagrosMarin Sep 29, 2023
1e6c27e
revert model.py and train.py to add in next PR
MilagrosMarin Sep 29, 2023
5b317a9
Images from workflow-don't match the `element`
MilagrosMarin Sep 29, 2023
0df510d
rename image names to mirror ca-imaging
MilagrosMarin Sep 29, 2023
07522a7
update flowchart URL
MilagrosMarin Sep 29, 2023
c0b6ed2
update current_project_folder->from_top_tracking
MilagrosMarin Oct 2, 2023
c94f336
Merge branch 'dev' into element-dlc-test
MilagrosMarin Oct 2, 2023
cbc6e27
update README based on ca-imaging element
MilagrosMarin Oct 2, 2023
7a0ea4a
Merge branch 'element-dlc-test' of https://github.com/MilagrosMarin/e…
MilagrosMarin Oct 2, 2023
7ce6007
solve readme conflict
MilagrosMarin Oct 2, 2023
7980338
add current_project_folder env variable to __init_
MilagrosMarin Oct 2, 2023
61fbfea
Update .devcontainer/Dockerfile
MilagrosMarin Oct 3, 2023
61e73bf
Update .devcontainer/devcontainer.json
MilagrosMarin Oct 3, 2023
1c7bec4
Update CONTRIBUTING.md
MilagrosMarin Oct 3, 2023
525924d
Update README.md
MilagrosMarin Oct 3, 2023
2e49708
Update setup.py
MilagrosMarin Oct 3, 2023
19dc567
Update setup.py
MilagrosMarin Oct 3, 2023
ed8de3a
Update setup.py
MilagrosMarin Oct 3, 2023
55adb0e
Merge pull request #89 from MilagrosMarin/element-dlc-test
kushalbakshi Oct 3, 2023
299c4c1
Merge pull request #4 from MilagrosMarin/element-dlc-test
Oct 6, 2023
930c619
use `v2` example data
Oct 12, 2023
f1fad23
Add a tutorial quick test
MilagrosMarin Oct 12, 2023
2f41aa3
Update model.py
Oct 12, 2023
477a355
update codespace and mounting strategy
Oct 12, 2023
94b2b17
add notebooks
Oct 12, 2023
a2b2fd2
Merge branch 'element-dlc-test' into element-dlc-test
MilagrosMarin Oct 12, 2023
04eb7eb
Merge pull request #1 from ttngu207/element-dlc-test
MilagrosMarin Oct 12, 2023
8ebd1f1
correct the name of the pipeline figure
MilagrosMarin Oct 12, 2023
828cd87
draft tutorial
MilagrosMarin Oct 14, 2023
6d5011e
update tutorial draft
MilagrosMarin Oct 14, 2023
5e942b6
final draft without output
MilagrosMarin Oct 17, 2023
bb25140
final draft with all outputs and minor changes
MilagrosMarin Oct 17, 2023
0fb7c05
change in visualization plots
MilagrosMarin Oct 17, 2023
4a74fe4
Merge pull request #90 from MilagrosMarin/element-dlc-test
Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM python:3.9-slim@sha256:5f0192a4f58a6ce99f732fe05e3b3d00f12ae62e183886bca3ebe3d202686c7f

ENV PATH /usr/local/bin:$PATH
ENV PYTHON_VERSION 3.9.17

RUN \
adduser --system --disabled-password --shell /bin/bash vscode && \
# install docker
apt-get update && \
apt-get install ca-certificates curl gnupg lsb-release -y && \
mkdir -m 0755 -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y && \
usermod -aG docker vscode && \
apt-get clean

RUN \
# dev setup
apt update && \
apt-get install sudo git bash-completion graphviz default-mysql-client s3fs procps -y && \
usermod -aG sudo vscode && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
pip install --no-cache-dir --upgrade black pip nbconvert && \
echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \
echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \
apt-get clean

COPY ./ /tmp/element-deeplabcut/

RUN \
# pipeline dependencies
apt-get update && \
apt-get install -y gcc ffmpeg graphviz && \
pip install --no-cache-dir -e /tmp/element-deeplabcut[elements,dlc_default] && \
# clean up
rm -rf /tmp/element-deeplabcut/ && \
apt-get clean

ENV DJ_HOST fakeservices.datajoint.io
ENV DJ_USER root
ENV DJ_PASS simple

ENV DATA_MOUNTPOINT /workspaces/element-deeplabcut/example_data
ENV DLC_ROOT_DATA_DIR $DATA_MOUNTPOINT/inbox
ENV DLC_PROCESSED_DATA_DIR $DATA_MOUNTPOINT/outbox
ENV DATABASE_PREFIX neuro_

USER vscode
CMD bash -c "sudo rm /var/run/docker.pid; sudo dockerd"

ENV LD_LIBRARY_PATH="/lib:/opt/conda/lib"
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Environment + Data",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},
"onCreateCommand": "mkdir -p ${DATA_MOUNTPOINT} && pip install -e .",
"postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${DATA_MOUNTPOINT} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1",
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
},
"forwardPorts": [
3306
],
"customizations": {
"settings": {
"python.pythonPath": "/usr/local/bin/python"
},
"vscode": {
"extensions": [
"[email protected]",
"[email protected]"
]
}
}
}
25 changes: 25 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3"
services:
app:
cpus: 4
mem_limit: 8g
build:
context: ..
dockerfile: ./.devcontainer/Dockerfile
#image: datajoint/element_deeplabcut:latest
extra_hosts:
- fakeservices.datajoint.io:127.0.0.1
environment:
- DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-dlc-data/v2
devices:
- /dev/fuse
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
volumes:
- ..:/workspaces/element-deeplabcut:cached
- docker_data:/var/lib/docker # persist docker images
privileged: true # only because of dind
volumes:
docker_data:
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: DataJoint Contribution Guideline
url: https://docs.datajoint.org/python/community/02-Contribute.html
url: https://datajoint.com/docs/about/contribute/
about: Please make sure to review the DataJoint Contribution Guidelines
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ jobs:
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
permissions:
contents: write
devcontainer-build:
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
devcontainer-publish:
needs:
- devcontainer-build
uses: datajoint/.github/.github/workflows/devcontainer-publish.yaml@main
secrets:
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN_FOR_ELEMENTS}}
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
schedule:
- cron: "0 8 * * 1"
jobs:
devcontainer-build:
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
tests:
runs-on: ubuntu-latest
strategy:
Expand All @@ -31,3 +33,4 @@ jobs:
run: |
python_version=${{matrix.py_ver}}
black element_deeplabcut --check --verbose --target-version py${python_version//.}
black notebooks --check --verbose --target-version py${python_version//.}
88 changes: 64 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# User data
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution, packaging, PyInstaller
# C extensions
*.so

# Distribution, packaging
.Python
env/
build/
Expand All @@ -21,11 +27,17 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
.idea/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete*.txt
.idea/

# Unit test / coverage reports
htmlcov/
Expand All @@ -39,54 +51,82 @@ coverage.xml
.hypothesis/
.pytest_cache/

# C extension, Translations
*.so
# Translations
*.mo
*.pot

# editors: vscode, emacs, Mac
.vscode
**/*~
**/#*#
**/.#*
.DS_Store

# Django, Flask, Scrapy, Sphinx, mkdocs:
# PyBuilder, Jupyter, SageMath, celery beat
# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy
scratchpaper.*

# Sphinx documentation
docs/_build/
/site

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv, virtualenv, pyenv, mypy
./.env
# dotenv
.env

# virtualenv
.venv
venv/
ENV/
.python-version
.mypy_cache/
./.env

# Spyder/Rope project settings
# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# datajoint, notes, nwb export
# mkdocs documentation
/site

# mypy
.mypy_cache/

# datajoint
dj_local_c*.json
dj_*.y*ml
temp*
temp/*
*nwb
workflow_deeplabcut/

# docs
/docs/site/
/docs/site
/docs/src/tutorials/*ipynb
/docs/mike-mkdocs*

# emacs
**/*~
**/#*#
**/.#*

example_data

#nwb export
*nwb

# vscode
*.code-workspace
.vscode
7 changes: 4 additions & 3 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
MD009: false # permit trailing spaces
MD007: false # List indenting - permit 4 spaces
MD013:
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"
allowed_elements:
- "figure"
- "figcaption"
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
59 changes: 59 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
default_stages: [commit, push]
exclude: (^.github/|^docs/|^images/|^notebooks/|^tests/)
# Current tests/__init__ violates many flake8. Excluding pending change to conftest

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.12.0
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,E402"
# 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
# E402 - Place module level import at the top.
# Needed to prevent circular import error
Loading
Loading