Installation instructions

Requirements

The commonnn package is developed and tested in Python >=3.6. At runtime the package has a few mandatory third party dependencies. We recommend to install the latest version of:

  • numpy

Optionally, additional functionality is available when the following packages are installed as well:

  • matplotlib

  • pandas

  • networkx

  • scipy

  • sklearn

PyPi

The commonnn package is available on the Python package index.

pip install commonnn-clustering

To install with optional dependencies use:

pip install commonnn-clustering[optional]

Other extras can be specified with [dev], [docs], and [test].

Developement installation

Clone the source repository https://github.com/bkellerlab/CommonNNClustering and use the package commonnn as you prefer it, e.g. install it via pip in editable mode.

$ git clone https://github.com/bkellerlab/CommonNNClustering
$ cd CommonNNClustering
$ pip install -e .

To recompile the Cython-extensions (requires cython installed) use:

$ python setup.py build_ext --inplace

Testing and documentation

Tests can be found under the test/ directory and can be run using pytest. Make sure you have all dependencies installed. To enable code coverage reports, the package needs to be compiled with TRACE_CYTHON=1. Note that this slows down the runtime of the package routines significantly and should be set to TRACE_CYTHON=0 in production. To run the tests, create a coverage report and a corresponding badge, one can use the script test.py.