Skip to content

AllenNeuralDynamics/Aind.Behavior.Services

Repository files navigation

aind-behavior-services

A repository containing code for data acquisition and processing for AIND behavior rigs.


Deployment

Install the 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:

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 flake8, black, and isort as our linting tools.

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

Dependency tree