Developer Documentation

Development Workflow

  • Fork from github

  • Develop on your fork

  • Test locally

  • Make a pull request

Before making a pull request, make sure that your fork is up to date and that all the tests pass locally. This will make it less likely that your pull request will get rejected by making breaking changes or by failing the test requirements.

Running the tests

The tests require that you have cloned the repository, since the test code is not distributed in the package. It is recommended to use tox for this.

$ git clone https://github.com/BlueBrain/NeuroM.git
$ cd NeuroM
$ tox

This method takes care of installing all extra dependencies needed for tests, diagnosing results, etc. It runs documentation check, pylint and the tests in sequence. Also it can run them individually:

$ tox -e py38-lint       # runs only pylint
$ tox -e py38-docs       # run only documentation check
$ tox -e py38            # run only the tests

You can also run tests manually via pylint but you need to make sure that you have installed all required dependencies in your virtual environment:

(your virtual env name)$ pip install neurom[plotly] pytest

Then, run the tests manually. For example,

(your virtual env name)$ pytest tests

Building documentation locally

To build documentation, go into project’s doc folder.

$ cd doc  # assuming that you start from the project's root.

Make sure you have installed into your virtual environment libraries from docs extras: pip install neurom[docs]. Then run the command in the doc folder:

$ make html

This builds the documentation in doc/build. To view it, open doc/build/html/index.html in a browser.

Python compatibility

We test the code against Python 3.8, 3.9, 3.10, and 3.11.