aind-behavior-services 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aind_behavior_services-0.8.0/.config/dotnet-tools.json +12 -0
- aind_behavior_services-0.8.0/.editorconfig +27 -0
- aind_behavior_services-0.8.0/.flake8 +8 -0
- aind_behavior_services-0.8.0/.gitattributes +4 -0
- aind_behavior_services-0.8.0/.github/workflows/ci.yml +57 -0
- aind_behavior_services-0.8.0/.github/workflows/docs.yml +24 -0
- aind_behavior_services-0.8.0/.github/workflows/tag_and_publish.yml +64 -0
- aind_behavior_services-0.8.0/.gitignore +84 -0
- aind_behavior_services-0.8.0/LICENSE +21 -0
- aind_behavior_services-0.8.0/PKG-INFO +95 -0
- aind_behavior_services-0.8.0/README.md +61 -0
- aind_behavior_services-0.8.0/assets/dependency_tree.drawio +236 -0
- aind_behavior_services-0.8.0/assets/dependency_tree.drawio.svg +4 -0
- aind_behavior_services-0.8.0/bonsai/Bonsai.config +222 -0
- aind_behavior_services-0.8.0/bonsai/NuGet.config +9 -0
- aind_behavior_services-0.8.0/bonsai/setup.cmd +1 -0
- aind_behavior_services-0.8.0/bonsai/setup.ps1 +9 -0
- aind_behavior_services-0.8.0/docs/Makefile +20 -0
- aind_behavior_services-0.8.0/docs/_static/AindBehaviorSessionModel.svg +79 -0
- aind_behavior_services-0.8.0/docs/_static/dark-logo.svg +129 -0
- aind_behavior_services-0.8.0/docs/_static/favicon.ico +0 -0
- aind_behavior_services-0.8.0/docs/_static/light-logo.svg +128 -0
- aind_behavior_services-0.8.0/docs/api.base/rig.rst +7 -0
- aind_behavior_services-0.8.0/docs/api.base/session.rst +10 -0
- aind_behavior_services-0.8.0/docs/api.base/task_logic.rst +7 -0
- aind_behavior_services-0.8.0/docs/api.base.rst +15 -0
- aind_behavior_services-0.8.0/docs/api.calibration/aind_manipulator.rst +13 -0
- aind_behavior_services-0.8.0/docs/api.calibration/load_cells.rst +13 -0
- aind_behavior_services-0.8.0/docs/api.calibration/olfactometer.rst +13 -0
- aind_behavior_services-0.8.0/docs/api.calibration/treadmill.rst +15 -0
- aind_behavior_services-0.8.0/docs/api.calibration/water_valve.rst +13 -0
- aind_behavior_services-0.8.0/docs/api.calibration.rst +124 -0
- aind_behavior_services-0.8.0/docs/api.data_types.rst +7 -0
- aind_behavior_services-0.8.0/docs/api.rst +10 -0
- aind_behavior_services-0.8.0/docs/api.utils.rst +8 -0
- aind_behavior_services-0.8.0/docs/articles/core/conventions.rst +85 -0
- aind_behavior_services-0.8.0/docs/articles/core/dataset_structure.rst +46 -0
- aind_behavior_services-0.8.0/docs/articles/data_formats/harp.rst +166 -0
- aind_behavior_services-0.8.0/docs/articles/data_formats/software_events.rst +68 -0
- aind_behavior_services-0.8.0/docs/articles/data_formats/video.rst +125 -0
- aind_behavior_services-0.8.0/docs/articles/data_formats.rst +10 -0
- aind_behavior_services-0.8.0/docs/conf.py +116 -0
- aind_behavior_services-0.8.0/docs/index.rst +26 -0
- aind_behavior_services-0.8.0/docs/json_schemas/aind_behavior_data_types.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/aind_behavior_session.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/aind_behavior_subject_database.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/aind_manipulator_calibration_logic.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/aind_manipulator_calibration_rig.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/load_cells_calibration_logic.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/load_cells_calibration_rig.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/olfactometer_calibration_logic.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/olfactometer_calibration_rig.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/treadmill_calibration_logic.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/treadmill_calibration_rig.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/water_valve_calibration_logic.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas/water_valve_calibration_rig.rst +10 -0
- aind_behavior_services-0.8.0/docs/json_schemas.rst +8 -0
- aind_behavior_services-0.8.0/docs/make.bat +35 -0
- aind_behavior_services-0.8.0/examples/aind_manipulator.py +50 -0
- aind_behavior_services-0.8.0/examples/load_cells.py +61 -0
- aind_behavior_services-0.8.0/examples/olfactometer.py +75 -0
- aind_behavior_services-0.8.0/examples/treadmill.py +47 -0
- aind_behavior_services-0.8.0/examples/water_valve.py +65 -0
- aind_behavior_services-0.8.0/pyproject.toml +74 -0
- aind_behavior_services-0.8.0/scripts/deploy.ps1 +12 -0
- aind_behavior_services-0.8.0/scripts/install_dependencies.ps1 +38 -0
- aind_behavior_services-0.8.0/scripts/regenerate.ps1 +4 -0
- aind_behavior_services-0.8.0/scripts/regenerate.py +61 -0
- aind_behavior_services-0.8.0/setup.cfg +4 -0
- aind_behavior_services-0.8.0/setup.py +4 -0
- aind_behavior_services-0.8.0/src/.gitignore +6 -0
- aind_behavior_services-0.8.0/src/Extensions/AindBehaviorSession.cs +379 -0
- aind_behavior_services-0.8.0/src/Extensions/AindManipulatorCalibrationLogic.cs +295 -0
- aind_behavior_services-0.8.0/src/Extensions/AindManipulatorCalibrationRig.cs +1130 -0
- aind_behavior_services-0.8.0/src/Extensions/ConfigureMotor.bonsai +326 -0
- aind_behavior_services-0.8.0/src/Extensions/HomeAxis.bonsai +577 -0
- aind_behavior_services-0.8.0/src/Extensions/IsNotNull.bonsai +39 -0
- aind_behavior_services-0.8.0/src/Extensions/LoadCellsCalibrationLogic.cs +343 -0
- aind_behavior_services-0.8.0/src/Extensions/LoadCellsCalibrationRig.cs +1137 -0
- aind_behavior_services-0.8.0/src/Extensions/LoadSchemas.bonsai +77 -0
- aind_behavior_services-0.8.0/src/Extensions/LogRawSchema.bonsai +63 -0
- aind_behavior_services-0.8.0/src/Extensions/ModifyMaskMotorRegister.bonsai +87 -0
- aind_behavior_services-0.8.0/src/Extensions/OffsetMotorRegister.bonsai +111 -0
- aind_behavior_services-0.8.0/src/Extensions/OlfactometerCalibrationLogic.cs +589 -0
- aind_behavior_services-0.8.0/src/Extensions/OlfactometerCalibrationRig.cs +1266 -0
- aind_behavior_services-0.8.0/src/Extensions/ParseScaleDataFrame.cs +106 -0
- aind_behavior_services-0.8.0/src/Extensions/TreadmillCalibrationLogic.cs +300 -0
- aind_behavior_services-0.8.0/src/Extensions/TreadmillCalibrationRig.cs +771 -0
- aind_behavior_services-0.8.0/src/Extensions/WaterCalibrationModel.cs +32 -0
- aind_behavior_services-0.8.0/src/Extensions/WaterValveCalibrationLogic.cs +364 -0
- aind_behavior_services-0.8.0/src/Extensions/WaterValveCalibrationRig.cs +188 -0
- aind_behavior_services-0.8.0/src/Extensions.csproj +22 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/__init__.py +5 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/base.py +98 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/__init__.py +17 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/aind_manipulator.py +125 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/load_cells.py +111 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/olfactometer.py +93 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/treadmill.py +79 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/calibration/water_valve.py +142 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/data_types.py +55 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/db_utils/__init__.py +39 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/py.typed +0 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/rig/__init__.py +282 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/session/__init__.py +40 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/task_logic/__init__.py +29 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/task_logic/distributions.py +227 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services/utils.py +428 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services.egg-info/PKG-INFO +95 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services.egg-info/SOURCES.txt +134 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services.egg-info/dependency_links.txt +1 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services.egg-info/requires.txt +19 -0
- aind_behavior_services-0.8.0/src/aind_behavior_services.egg-info/top_level.txt +3 -0
- aind_behavior_services-0.8.0/src/aind_manipulator_calibration.bonsai +61 -0
- aind_behavior_services-0.8.0/src/olfactometer_calibration.bonsai +2722 -0
- aind_behavior_services-0.8.0/src/schemas/aind_behavior_data_types.json +190 -0
- aind_behavior_services-0.8.0/src/schemas/aind_behavior_session.json +110 -0
- aind_behavior_services-0.8.0/src/schemas/aind_behavior_subject_database.json +49 -0
- aind_behavior_services-0.8.0/src/schemas/aind_manipulator_calibration_logic.json +72 -0
- aind_behavior_services-0.8.0/src/schemas/aind_manipulator_calibration_rig.json +386 -0
- aind_behavior_services-0.8.0/src/schemas/load_cells_calibration_logic.json +101 -0
- aind_behavior_services-0.8.0/src/schemas/load_cells_calibration_rig.json +315 -0
- aind_behavior_services-0.8.0/src/schemas/olfactometer_calibration_logic.json +177 -0
- aind_behavior_services-0.8.0/src/schemas/olfactometer_calibration_rig.json +384 -0
- aind_behavior_services-0.8.0/src/schemas/treadmill_calibration_logic.json +74 -0
- aind_behavior_services-0.8.0/src/schemas/treadmill_calibration_rig.json +210 -0
- aind_behavior_services-0.8.0/src/schemas/water_valve_calibration_logic.json +100 -0
- aind_behavior_services-0.8.0/src/schemas/water_valve_calibration_rig.json +31 -0
- aind_behavior_services-0.8.0/src/unit_tests.bonsai +432 -0
- aind_behavior_services-0.8.0/src/water_valve_calibration.bonsai +1259 -0
- aind_behavior_services-0.8.0/tests/__init__.py +28 -0
- aind_behavior_services-0.8.0/tests/test_bonsai.py +47 -0
- aind_behavior_services-0.8.0/tests/test_examples.py +22 -0
- aind_behavior_services-0.8.0/tests/test_schema_version_coercion.py +84 -0
- aind_behavior_services-0.8.0/tests/test_utils.py +22 -0
- aind_behavior_services-0.8.0/tests/test_water_valve.py +80 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
|
|
2
|
+
###############################
|
|
3
|
+
# Core EditorConfig Options #
|
|
4
|
+
###############################
|
|
5
|
+
# All files
|
|
6
|
+
[*]
|
|
7
|
+
indent_style = space
|
|
8
|
+
|
|
9
|
+
# XML project files
|
|
10
|
+
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,bonsai}]
|
|
11
|
+
indent_size = 2
|
|
12
|
+
|
|
13
|
+
# XML config files
|
|
14
|
+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
# Code files
|
|
18
|
+
[*.{cs,csx}]
|
|
19
|
+
indent_size = 4
|
|
20
|
+
insert_final_newline = true
|
|
21
|
+
charset = utf-8-bom
|
|
22
|
+
###############################
|
|
23
|
+
# .NET Coding Conventions #
|
|
24
|
+
###############################
|
|
25
|
+
[*.{cs}]
|
|
26
|
+
# Organize usings
|
|
27
|
+
dotnet_sort_system_directives_first = true
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
linters:
|
|
10
|
+
runs-on: windows-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
- name: Set up Python
|
|
14
|
+
uses: actions/setup-python@v3
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.11"
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
python -m pip install -e .[linters] --no-cache-dir
|
|
20
|
+
- name: Run ruff format
|
|
21
|
+
run: ruff format . --config .\pyproject.toml
|
|
22
|
+
- name: Run ruff check
|
|
23
|
+
run: ruff check . --config .\pyproject.toml
|
|
24
|
+
- name: Run codespell
|
|
25
|
+
run : codespell .
|
|
26
|
+
|
|
27
|
+
tests:
|
|
28
|
+
runs-on: windows-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v3
|
|
31
|
+
|
|
32
|
+
- name: Setup .NET Core SDK
|
|
33
|
+
uses: actions/setup-dotnet@v4.0.0
|
|
34
|
+
with:
|
|
35
|
+
dotnet-version: 7.x
|
|
36
|
+
- name: Restore dotnet tools
|
|
37
|
+
run: dotnet tool restore
|
|
38
|
+
- name: Setup Bonsai
|
|
39
|
+
working-directory: bonsai
|
|
40
|
+
run: .\Setup.ps1
|
|
41
|
+
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v3
|
|
44
|
+
with:
|
|
45
|
+
python-version: '3.11'
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install -e . --no-cache-dir
|
|
50
|
+
- name: Run tests
|
|
51
|
+
run: python -m unittest
|
|
52
|
+
- name: Regenerate schemas
|
|
53
|
+
run: python .\scripts\regenerate.py
|
|
54
|
+
- name: Check for uncommitted changes
|
|
55
|
+
run: |
|
|
56
|
+
git config --global core.safecrlf false
|
|
57
|
+
git diff --exit-code || (echo "Untracked changes found" && exit 1)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Deploy Sphinx documentation to Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pages:
|
|
10
|
+
runs-on: ubuntu-20.04
|
|
11
|
+
steps:
|
|
12
|
+
- name: Setup Graphviz
|
|
13
|
+
uses: ts-graphviz/setup-graphviz@v2.0.2
|
|
14
|
+
- id: deployment
|
|
15
|
+
uses: sphinx-notes/pages@v3
|
|
16
|
+
with:
|
|
17
|
+
publish: false
|
|
18
|
+
python_version: 3.11
|
|
19
|
+
checkout: true
|
|
20
|
+
- uses: peaceiris/actions-gh-pages@v3
|
|
21
|
+
with:
|
|
22
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
publish_dir: ${{ steps.deployment.outputs.artifact }}
|
|
24
|
+
force_orphan: true
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Tag and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: {}
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
tag:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Set up Python
|
|
11
|
+
uses: actions/setup-python@v4
|
|
12
|
+
with:
|
|
13
|
+
python-version: 3.11
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- name: Extract version from __init__.py and package name from pyproject.toml
|
|
16
|
+
id: get_version_and_name
|
|
17
|
+
run: |
|
|
18
|
+
package_name=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])")
|
|
19
|
+
package_name=${package_name//-/_}
|
|
20
|
+
version=$(python -c "import re;
|
|
21
|
+
with open(f'./src/${package_name}/__init__.py', 'r') as f:
|
|
22
|
+
content = f.read();
|
|
23
|
+
match = re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', content);
|
|
24
|
+
print(match.group(1)) if match else exit(1)")
|
|
25
|
+
echo "PACKAGE_NAME=$package_name" >> $GITHUB_ENV
|
|
26
|
+
echo "PACKAGE_VERSION=$version" >> $GITHUB_ENV
|
|
27
|
+
shell: bash
|
|
28
|
+
|
|
29
|
+
- name: Create Git tag
|
|
30
|
+
run: |
|
|
31
|
+
git config --global user.name "github-actions[bot]"
|
|
32
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
33
|
+
git tag -a v${{ env.PACKAGE_VERSION }} -m "v${{ env.PACKAGE_VERSION }}"
|
|
34
|
+
git push origin v${{ env.PACKAGE_VERSION }}
|
|
35
|
+
|
|
36
|
+
- name: Create GitHub Release
|
|
37
|
+
uses: softprops/action-gh-release@v2
|
|
38
|
+
with:
|
|
39
|
+
token: ${{ secrets.SERVICE_TOKEN }}
|
|
40
|
+
tag_name: v${{ env.PACKAGE_VERSION }}
|
|
41
|
+
name: Release v${{ env.PACKAGE_VERSION }}
|
|
42
|
+
generate_release_notes: true
|
|
43
|
+
|
|
44
|
+
publish:
|
|
45
|
+
needs: tag
|
|
46
|
+
if: always() # Enable publishing
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v3
|
|
50
|
+
- name: Pull latest changes
|
|
51
|
+
run: git pull origin ${{ env.DEFAULT_BRANCH }}
|
|
52
|
+
- name: Set up Python
|
|
53
|
+
uses: actions/setup-python@v4
|
|
54
|
+
with:
|
|
55
|
+
python-version: 3.11
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: |
|
|
58
|
+
pip install --upgrade setuptools wheel twine build
|
|
59
|
+
python -m build
|
|
60
|
+
twine check dist/*
|
|
61
|
+
- name: Publish on PyPI
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
+
with:
|
|
64
|
+
password: ${{ secrets.AIND_PYPI_TOKEN }}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Bonsai scripting files
|
|
2
|
+
.vs
|
|
3
|
+
.vscode
|
|
4
|
+
bin
|
|
5
|
+
obj
|
|
6
|
+
Packages
|
|
7
|
+
Bonsai.exe.WebView2
|
|
8
|
+
*.bin
|
|
9
|
+
*.avi
|
|
10
|
+
*.dll
|
|
11
|
+
*.exe
|
|
12
|
+
*.exe.settings
|
|
13
|
+
*.bonsai.layout
|
|
14
|
+
local
|
|
15
|
+
.venv
|
|
16
|
+
*.snl
|
|
17
|
+
|
|
18
|
+
# Byte-compiled / optimized / DLL files
|
|
19
|
+
__pycache__/
|
|
20
|
+
*.py[cod]
|
|
21
|
+
*$py.class
|
|
22
|
+
|
|
23
|
+
# C extensions
|
|
24
|
+
*.so
|
|
25
|
+
|
|
26
|
+
# Distribution / packaging
|
|
27
|
+
.Python
|
|
28
|
+
build/
|
|
29
|
+
develop-eggs/
|
|
30
|
+
dist/
|
|
31
|
+
downloads/
|
|
32
|
+
eggs/
|
|
33
|
+
.eggs/
|
|
34
|
+
lib/
|
|
35
|
+
lib64/
|
|
36
|
+
parts/
|
|
37
|
+
sdist/
|
|
38
|
+
var/
|
|
39
|
+
wheels/
|
|
40
|
+
share/python-wheels/
|
|
41
|
+
*.egg-info/
|
|
42
|
+
.installed.cfg
|
|
43
|
+
*.egg
|
|
44
|
+
MANIFEST
|
|
45
|
+
|
|
46
|
+
# PyInstaller
|
|
47
|
+
# Usually these files are written by a python script from a template
|
|
48
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
49
|
+
*.manifest
|
|
50
|
+
*.spec
|
|
51
|
+
|
|
52
|
+
# Installer logs
|
|
53
|
+
pip-log.txt
|
|
54
|
+
pip-delete-this-directory.txt
|
|
55
|
+
|
|
56
|
+
# Unit test / coverage reports
|
|
57
|
+
htmlcov/
|
|
58
|
+
.tox/
|
|
59
|
+
.nox/
|
|
60
|
+
.coverage
|
|
61
|
+
.coverage.*
|
|
62
|
+
.cache
|
|
63
|
+
nosetests.xml
|
|
64
|
+
coverage.xml
|
|
65
|
+
*.cover
|
|
66
|
+
*.py,cover
|
|
67
|
+
.hypothesis/
|
|
68
|
+
.pytest_cache/
|
|
69
|
+
cover/
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# Jupyter Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# IPython
|
|
78
|
+
profile_default/
|
|
79
|
+
ipython_config.py
|
|
80
|
+
|
|
81
|
+
# pyenv
|
|
82
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
83
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
84
|
+
# .python-version
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Allen Institute for Neural Dynamics
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aind-behavior-services
|
|
3
|
+
Version: 0.8.0
|
|
4
|
+
Summary: A library that defines AIND data schema and validates JSON files for behavior rig models.
|
|
5
|
+
Author-email: Bruno Cruz <bruno.cruz@alleninstitute.org>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Documentation, https://allenneuraldynamics.github.io/Aind.Behavior.Services/
|
|
8
|
+
Project-URL: Repository, https://github.com/AllenNeuralDynamics/Aind.Behavior.Services/
|
|
9
|
+
Project-URL: Issues, https://github.com/AllenNeuralDynamics/Aind.Behavior.Services/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/AllenNeuralDynamics/Aind.Behavior.Services/releases
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Description-Content-Type: text/x-rst
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: pydantic<3.0,>=2.7
|
|
18
|
+
Requires-Dist: harp-python>=0.2
|
|
19
|
+
Requires-Dist: aind-behavior-curriculum==0.0.27
|
|
20
|
+
Requires-Dist: gitpython<4.0,>=3.1
|
|
21
|
+
Requires-Dist: scikit-learn
|
|
22
|
+
Requires-Dist: semver
|
|
23
|
+
Provides-Extra: linters
|
|
24
|
+
Requires-Dist: ruff; extra == "linters"
|
|
25
|
+
Requires-Dist: codespell; extra == "linters"
|
|
26
|
+
Provides-Extra: docs
|
|
27
|
+
Requires-Dist: Sphinx<7.3; extra == "docs"
|
|
28
|
+
Requires-Dist: furo; extra == "docs"
|
|
29
|
+
Requires-Dist: sphinx-jinja; extra == "docs"
|
|
30
|
+
Requires-Dist: autodoc_pydantic[erdantic]; extra == "docs"
|
|
31
|
+
Requires-Dist: sphinx-jsonschema; extra == "docs"
|
|
32
|
+
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
33
|
+
Requires-Dist: sphinx_mdinclude; extra == "docs"
|
|
34
|
+
|
|
35
|
+
# aind-behavior-services
|
|
36
|
+
|
|
37
|
+
A repository containing code for data acquisition and processing for AIND behavior rigs.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Deployment
|
|
42
|
+
|
|
43
|
+
Install the [prerequisites](#prerequisites) mentioned below.
|
|
44
|
+
From the root of the repository, run `./scripts/deploy.ps1` to bootstrap both python and bonsai environments.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Prerequisites
|
|
49
|
+
|
|
50
|
+
These should only need to be installed once on a fresh new system, and are not required if simply refreshing the install or deploying to a new folder.
|
|
51
|
+
|
|
52
|
+
- Windows 10 or 11
|
|
53
|
+
- Run `./scripts/install_dependencies.ps1` to automatically install dependencies
|
|
54
|
+
- The following dependencies should be manually installed:
|
|
55
|
+
- [Spinnaker SDK 1.29.0.5](https://www.flir.co.uk/support/products/spinnaker-sdk/#Downloads) (device drivers for FLIR cameras)
|
|
56
|
+
|
|
57
|
+
- On FLIR website: `Download > archive > 1.29.0.5 > SpinnakerSDK_FULL_1.29.0.5_x64.exe`
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Generating valid JSON input files
|
|
62
|
+
|
|
63
|
+
One of the core principles of this repository is the strict adherence to [json-schemas](https://json-schema.org/). We use [Pydantic](https://pydantic.dev/) as a way to write and compile our schemas, but also to generate valid JSON input files. These files can be used by Bonsai (powered by [Bonsai.SGen](https://github.com/bonsai-rx/sgen) code generation tool) or to simply record metadata. Examples of how to interact with the library can be found in the `./examples` folder.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Regenerating schemas
|
|
68
|
+
|
|
69
|
+
Once a Pydantic model is updated, updates to all downstream dependencies must be made to ensure that the ground-truth data schemas (and all dependent interoperability tools) are also updated. This can be achieved by running the `./scripts/renegerate.ps1` script from the root of the repository.
|
|
70
|
+
This script will regenerate all `json-schemas` along with `C#` code (`./scr/Extensions`) used by the Bonsai environment.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Contributors
|
|
75
|
+
|
|
76
|
+
Contributions to this repository are welcome! However, please ensure that your code adheres to the recommended DevOps practices below:
|
|
77
|
+
|
|
78
|
+
### Linting
|
|
79
|
+
|
|
80
|
+
We use [ruff](https://docs.astral.sh/ruff/) as our primary linting tool.
|
|
81
|
+
|
|
82
|
+
### Testing
|
|
83
|
+
|
|
84
|
+
Attempt to add tests when new features are added.
|
|
85
|
+
To run the currently available tests, run `python -m unittest` from the root of the repository.
|
|
86
|
+
|
|
87
|
+
### Versioning
|
|
88
|
+
|
|
89
|
+
Where possible, adhere to [Semantic Versioning](https://semver.org/).
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Project dependency tree
|
|
94
|
+
|
|
95
|
+

|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# aind-behavior-services
|
|
2
|
+
|
|
3
|
+
A repository containing code for data acquisition and processing for AIND behavior rigs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Deployment
|
|
8
|
+
|
|
9
|
+
Install the [prerequisites](#prerequisites) mentioned below.
|
|
10
|
+
From the root of the repository, run `./scripts/deploy.ps1` to bootstrap both python and bonsai environments.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
These should only need to be installed once on a fresh new system, and are not required if simply refreshing the install or deploying to a new folder.
|
|
17
|
+
|
|
18
|
+
- Windows 10 or 11
|
|
19
|
+
- Run `./scripts/install_dependencies.ps1` to automatically install dependencies
|
|
20
|
+
- The following dependencies should be manually installed:
|
|
21
|
+
- [Spinnaker SDK 1.29.0.5](https://www.flir.co.uk/support/products/spinnaker-sdk/#Downloads) (device drivers for FLIR cameras)
|
|
22
|
+
|
|
23
|
+
- On FLIR website: `Download > archive > 1.29.0.5 > SpinnakerSDK_FULL_1.29.0.5_x64.exe`
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Generating valid JSON input files
|
|
28
|
+
|
|
29
|
+
One of the core principles of this repository is the strict adherence to [json-schemas](https://json-schema.org/). We use [Pydantic](https://pydantic.dev/) as a way to write and compile our schemas, but also to generate valid JSON input files. These files can be used by Bonsai (powered by [Bonsai.SGen](https://github.com/bonsai-rx/sgen) code generation tool) or to simply record metadata. Examples of how to interact with the library can be found in the `./examples` folder.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Regenerating schemas
|
|
34
|
+
|
|
35
|
+
Once a Pydantic model is updated, updates to all downstream dependencies must be made to ensure that the ground-truth data schemas (and all dependent interoperability tools) are also updated. This can be achieved by running the `./scripts/renegerate.ps1` script from the root of the repository.
|
|
36
|
+
This script will regenerate all `json-schemas` along with `C#` code (`./scr/Extensions`) used by the Bonsai environment.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Contributors
|
|
41
|
+
|
|
42
|
+
Contributions to this repository are welcome! However, please ensure that your code adheres to the recommended DevOps practices below:
|
|
43
|
+
|
|
44
|
+
### Linting
|
|
45
|
+
|
|
46
|
+
We use [ruff](https://docs.astral.sh/ruff/) as our primary linting tool.
|
|
47
|
+
|
|
48
|
+
### Testing
|
|
49
|
+
|
|
50
|
+
Attempt to add tests when new features are added.
|
|
51
|
+
To run the currently available tests, run `python -m unittest` from the root of the repository.
|
|
52
|
+
|
|
53
|
+
### Versioning
|
|
54
|
+
|
|
55
|
+
Where possible, adhere to [Semantic Versioning](https://semver.org/).
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Project dependency tree
|
|
60
|
+
|
|
61
|
+

|