A library that defines AIND data schema and validates JSON files for behavior rig models.
Project description
aind-behavior-services
A repository containing code for data acquisition and processing for AIND behavior rigs.
Installation
The python package can be installed from pypi using the following command:
pip install aind-behavior-services
However, to use all the tasks and hardware that this package supports, you should over over the prerequisites and deployment sections.
Prerequisites
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.
- Windows 10 or 11
- Run
./scripts/install_dependencies.ps1
to automatically install dependencies - The following dependencies should be manually installed:
-
Spinnaker SDK 1.29.0.5 (device drivers for FLIR cameras)
- On FLIR website:
Download > archive > 1.29.0.5 > SpinnakerSDK_FULL_1.29.0.5_x64.exe
- On FLIR website:
-
Deployment
Install the prerequisites mentioned below.
From the root of the repository, run ./scripts/deploy.ps1
to bootstrap both python and bonsai environments.
Generating valid JSON input files
One of the core principles of this repository is the strict adherence to json-schemas. We use Pydantic 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 code generation tool) or to simply record metadata. Examples of how to interact with the library can be found in the ./examples
folder.
Regenerating schemas
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.
This script will regenerate all json-schemas
along with C#
code (./scr/Extensions
) used by the Bonsai environment.
Contributors
Contributions to this repository are welcome! However, please ensure that your code adheres to the recommended DevOps practices below:
Linting
We use ruff as our primary linting tool.
Testing
Attempt to add tests when new features are added.
To run the currently available tests, run python -m unittest
from the root of the repository.
Versioning
Where possible, adhere to Semantic Versioning.
Project dependency tree
classDiagram
class aind_behavior_curriculum {
+Task
+Curriculum
}
class aind_behavior_services {
+Task (Subclasses)
+Rig (maintains hardware library)
+Session
+Calibration (maintains device/calibration library)
+Deployment instructions
+Ecosystem documentation
}
class aind_behavior_experiment_launcher {
+Launch experiment
+Interfaces with external applications (e.g. Bonsai)
+Interfaces with aind-services
}
class aind_behavior_some_task {
+Concrete implementation of a task
+Rig (Subclasses for some task)
+Session
+Task Logic (Subclasses for some task)
+Maintains a task data-schema
+Saves data in standard format
}
class aind_behavior_some_task_analysis {
+Analysis code for some task
}
class aind_behavior_core_analysis {
+Data ingestion
+Data contract definition
+Core analysis primitives
+QC
}
aind_behavior_curriculum --|> aind_behavior_services : Subclasses Task
aind_behavior_services --|> aind_behavior_some_task
aind_behavior_some_task --|> aind_behavior_some_task_analysis : Analysis
aind_behavior_core_analysis --|> aind_behavior_some_task_analysis : Imports core analysis methods
aind_behavior_some_task_analysis --|> aind_behavior_curriculum : Metrics[Task]
aind_behavior_experiment_launcher --|> aind_behavior_some_task : Launches
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aind_behavior_services-0.8.2.tar.gz
.
File metadata
- Download URL: aind_behavior_services-0.8.2.tar.gz
- Upload date:
- Size: 120.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 514731430b1a1905de7b9e862dcd068c19c175d8304c10fa2432f1ec17cfc84f |
|
MD5 | c0c6621a1a30d970100bfe3f3840560f |
|
BLAKE2b-256 | df75909dc847a60d5087e5c65c25e0e0871389a2a83fc3f5fab22c61dacf16b9 |
File details
Details for the file aind_behavior_services-0.8.2-py3-none-any.whl
.
File metadata
- Download URL: aind_behavior_services-0.8.2-py3-none-any.whl
- Upload date:
- Size: 80.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7eadbb928da919cab8b78da8f81acd391d3538b259495aae93968343680058 |
|
MD5 | ae5072d7bebfd206add31adfccba40ea |
|
BLAKE2b-256 | 70679e78ba22aa1fbde0a3ef5edb61f3e6a8670cc72f01159a1022b25a9e5e8f |