Development#

python setup.py develop

Gives you an editable install for messing with Python code in the project. (Any underyling cpp changes require this command to be re-run).

Package Structure#

There are a few different moving parts that can be built in this project:

  • the cpp brush library (called cbrush)

  • the cpp tests, written google tests (an executable named tests)

    • depends on cbrush

  • the cpp-python bindings (a Python module written in cpp named _brush)

    • depends on cbrush

  • the brush Python module

    • depends on _brush

  • the docs (built with a combination of Sphinx and Doxygen)

    • depends on brush

Pip will install the brush module and call CMake to build the _brush extension.
It will not build the docs or cpp tests.

Tests#

Python#

The tests are run by calling pytest from the root directory.

pytest 

Cpp#

If you are developing the cpp code and want to build the cpp tests, run the following:

./configure
./install tests

Building the docs locally#

To build the documentation you will need some additional requirements. Before proceeding, make sure you have the python wrapper installed, as the documentation have some sample notebooks that will run the code.

First go to the docs folder:

cd docs/

Then, install additional python packages in the same environemnt as brush is intalled with:

conda activate brush
pip install -r requirements.txt

Now just run:

make html

The static website is located in -build/html