.. toctree::

===============
Developer Guide
===============


Setup Development Environment
=============================

Install ``pip3`` and ``tox``:

.. code-block:: sh

   wget https://bootstrap.pypa.io/get-pip.py
   sudo python3 get-pip.py
   sudo pip3 install tox

For documentation you also need to install ``graphviz``:

.. code-block:: sh

   sudo apt install graphviz


Running NodeStats
=================

Use the ``--help`` flag to check CLI options:

.. code-block:: sh

   tox -e run -- --help


Building Documentation
======================

.. code-block:: sh

   tox -e doc

Output will be available at ``.tox/env/tmp/html``. It is recommended to install
the ``webdev`` package:

.. code-block:: sh

   sudo pip3 install webdev

So a development web server can serve any location like this:

.. code-block:: sh

   webdev .tox/env/tmp/html


Running Test Suite and Coverage
===============================

.. code-block:: sh

   tox -e test

Output files will be available at ``.tox/env/tmp/``. There, three files will be
available:

- ``coverage.xml``: XML coverage report in Covertura format.
- ``tests.xml``: XML test report in a JUnit-like format.
- ``htmlcov``: HTML Coverage report. Can be viewed with ``webdev`` too.
