A Python API for the NeuronBridge neuron similarity search service.
This library is available on PyPI, so you can install it like this:
pip install neuronbridge-python
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.
Create a new virtual environment and install the dependencies:
uv venv --python 3.11
source .venv/bin/activate
uv pip sync requirements-universal.txt
uv pip install -e .
You can run validation multithreaded on a single machine like this:
./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
After updating the requirements.txt file, you can sync the requirements-universal.txt file like this:
uv pip compile requirements.txt --universal --output-file requirements-universal.txt
python neuronbridge/generate_schemas.py
pytest tests
- Update the version in setup.py
- Push all changes and tag a release in GitHub
- Build PyPI distribution:
python setup.py sdist bdist_wheel
- Upload to PyPI:
twine upload dist/*