Skip to main content

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.

## Deployment

Install the [prerequisites](#prerequisites) mentioned below. From the root of the repository, run ./scripts/deploy.ps1 to bootstrap both python and bonsai environments.

## 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](https://www.flir.co.uk/support/products/spinnaker-sdk/#Downloads) (device drivers for FLIR cameras)

    • On FLIR website: Download > archive > 1.29.0.5 > SpinnakerSDK_FULL_1.29.0.5_x64.exe

## Generating valid JSON input files

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.

## 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](https://docs.astral.sh/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](https://semver.org/).

## Project dependency tree

![Dependency tree](https://github.com/AllenNeuralDynamics/Aind.Behavior.Services/raw/main/assets/dependency_tree.drawio.svg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aind_behavior_services-0.8.0.tar.gz (537.0 kB view details)

Uploaded Source

Built Distribution

aind_behavior_services-0.8.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file aind_behavior_services-0.8.0.tar.gz.

File metadata

File hashes

Hashes for aind_behavior_services-0.8.0.tar.gz
Algorithm Hash digest
SHA256 acd26882f85c0922bc6724ca84bc0238c3325714ecbec8b122562c954d2547fa
MD5 830e141c0b737eb13404d3212434a633
BLAKE2b-256 9c544261608e65214dc9bb442b5c8db7d6c2defc701cd430708b57d34400362c

See more details on using hashes here.

File details

Details for the file aind_behavior_services-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aind_behavior_services-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6ecb575ac7eb9a540661ecad7779a07079cb1af33db419226b9e6f31691e34
MD5 7ac78b2efbf9511adefbb5b579c1ee10
BLAKE2b-256 83196cfcd26a730fb40115ba8c49fcb456555afc81d79effb387d02bb5892988

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page