Python API for NeuronBridge
Project description
NeuronBridge Python API
A Python API for the NeuronBridge neuron similarity search service.
See this notebook for usage examples.
Development Notes
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
Install for development
You can install the module for development like this:
conda create --name neuronbridge-python python=3.8
conda activate neuronbridge-python
pip install -e .
Useful shell commands
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
Publishing a new release
-
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/*
Running validation using Ray
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for neuronbridge-python-3.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae5c0763d45097182785478ad1a6c5130b8efbd414066e3561f42cb49ee53493 |
|
MD5 | 3f4aa91138a188eddf7597b0b6441035 |
|
BLAKE2b-256 | dd9ad72b39aecd59969347d68da624f0f3b3f216e428a9ecf11b6c378868d0fc |
Hashes for neuronbridge_python-3.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa1f0a110be0df650e338de0631ae6aca65dc8d816d73772595736cf25950eb0 |
|
MD5 | dd3d34c5288b09858ccc95ea0895ac89 |
|
BLAKE2b-256 | 03e8bd3e53daeb2be16b7cd622e1a862b237bc98f1c87a15385fb736953f7ad8 |