Skip to content

JaneliaSciComp/neuronbridge-python

Repository files navigation

NeuronBridge Python API

DOI

A Python API for the NeuronBridge neuron similarity search service.

Data Model Diagram

Installation

This library is available on PyPI, so you can install it like this:

pip install neuronbridge-python

Usage

The client will automatically select the latest version of the data and fetch it from S3. Here's a simple example of how to get an EM image by id:

from neuronbridge import client
client = client.Client()
em_image = client.get_em_image(636798093) 

See this notebook for complete usage examples.

Development Notes

To build this code you will need to install Pixi. After cloning the repository just type:

pixi install

Running data validation using Ray

You can run validation multithreaded on a single machine like this:

pixi run python ./neuronbridge/validate_ray.py --dashboard --cores 60

To run the validation script in a distributed manner on the Janelia cluster, you must first install ray-janelia in a sister directory to where this code base is cloned. Then run a script to bsub the Ray cluster:

./scripts/launch_validation.sh

Regenerate the JSON schemas:

pixi run python neuronbridge/generate_schemas.py

Run the unit tests:

pixi run test

Publishing a new release

  1. Update the version in setup.py
  2. Push all changes and tag a release in GitHub
  3. Build PyPI distribution:
pixi run pypi-build
  1. Upload to PyPI:
pixi run pypi-upload

About

Python API for NeuronBridge

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages