Skip to main content

NAVis core functions reimplemented in Rust.

Project description

docs

fastcore-rs

Rust re-implementation of navis core functions. Check out the documentation for details.

TO-DOs

  • geodesic distances
  • connected components
  • generation of linear segments
  • synapse flow centrality
  • Strahler index
  • classify nodes
  • flow centrality
  • CI tests
  • NBLAST (started a prototype)
  • shortest paths
  • cater for i32 node IDs which are currently cast up to i64
  • faster version of navis.connected_subgraph

Additional Notes

  • internally, we use i32 to represent node indices which means we can't process neurons with more than 2,147,483,647 nodes (should be fine though)

Install

We provide precompiled binaries for all major Python versions, CPU architectures and operating systems.

From PyPI:

pip install navis-fastcore

If that fails, try building from source (see below).

Usage

navis will automatically use fastcore if it is available. The integration is still work in progress, so for now you should install navis from Github to make sure you have the latest version.

Build

  1. Install rust
  2. Clone this repository
  3. cd into fastcore-rs directory
  4. Create a virtual environment: python3 -m venv .venv
  5. Activate virtual environment: source .venv/bin/activate
  6. Compile via either:
    • maturin develop --release which will compile the extension into the fastcore/ directory
    • maturin build --release to build wheel in /target/wheels
  7. To install the Python package either do:
  • pip install -e . to install in editable mode
  • pip install targets/wheels/navis_fastcore....whl

Note that unless you compiled with the --release flag, timings will be much slower (up to 10x) than in a release build!

Test

First make sure pytest is installed:

pip install pytest -U

Then run the test-suite like so:

pytest --verbose -s

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

navis_fastcore-0.0.3.tar.gz (31.6 kB view hashes)

Uploaded Source

Built Distributions

navis_fastcore-0.0.3-cp39-abi3-win_amd64.whl (346.6 kB view hashes)

Uploaded CPython 3.9+ Windows x86-64

navis_fastcore-0.0.3-cp39-abi3-win32.whl (330.1 kB view hashes)

Uploaded CPython 3.9+ Windows x86

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (517.8 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ x86-64

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (613.1 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ s390x

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (577.8 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ppc64le

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (542.7 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ i686

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (517.5 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARMv7l

navis_fastcore-0.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (524.1 kB view hashes)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARM64

navis_fastcore-0.0.3-cp39-abi3-macosx_11_0_arm64.whl (460.5 kB view hashes)

Uploaded CPython 3.9+ macOS 11.0+ ARM64

navis_fastcore-0.0.3-cp39-abi3-macosx_10_12_x86_64.whl (468.0 kB view hashes)

Uploaded CPython 3.9+ macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page