A Python API for the NeuronBridge neuron similarity search service.
See this notebook for usage examples.
Create a conda env with all the dependencies including Jupyter:
conda env create -f environment.yml
conda activate neuronbridge-python
Then install it as a Jupyter kernel:
python -m ipykernel install --user --name=neuronbridge-python
You can install the module for development like this:
pip install -e .
To update conda_requirements.txt:
conda env export --from-history --file conda_requirements.txt
To update requirements.txt:
pipreqs --savepath=requirements.txt && pip-compile
Regenerate the JSON schemas:
python neuronbridge/generate_schemas.py
Run the unit tests:
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/*
You can run validation multithreaded on a single machine like this:
./neuronbridge/validate_ray.py
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