Skip to content

Commit

Permalink
Update structure of source install doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Lestang authored and Thibault Lestang committed Aug 28, 2020
1 parent c447095 commit ab1fc4c
Showing 1 changed file with 36 additions and 32 deletions.
68 changes: 36 additions & 32 deletions docs/install/install-from-source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,58 @@ Is is often sufficient to run the unit tests only. To do so, use
#
python -m tox -e windows-quick # (Windows)
Using the test runner
~~~~~~~~~~~~~~~~~~~~~~

You can run unit tests for PyBaMM using

.. code:: bash
# in the PyBaMM/ directory
python run-tests.py --unit
The above starts a sub-process using the current python interpreter (i.e. using your current
python environment) and run the unit tests. This can take a few minutes.

You can also use the test runner to run the doctests:

.. code:: bash
python run-tests.py --doctests
There is more to the PyBaMM test runner. To see a list of all options, type

.. code:: bash
python run-tests.py --help
How to build the PyBaMM documentation
-------------------------------------

The documentation is built using

.. code:: bash
tox -e docs
This will build the documentation and serve it on the localhost (thanks to `sphinx-autobuild <https://github.com/GaretJax/sphinx-autobuild>`_) for preview.
This will build the documentation and serve it locally (thanks to `sphinx-autobuild <https://github.com/GaretJax/sphinx-autobuild>`_) for preview.
The preview will be updated automatically following changes.

In addition, the following tox commands are available:
Doctests, examples, style and coverage
--------------------------------------

- ``tox -e examples``: Run the example scripts in ``examples/scripts``.
- ``tox -e flake8``: Check for PEP8 compliance.
- ``tox -e doctests``: Run doctests.
- ``tox -e coverage``: Measure current test coverage.

Note for Windows users
^^^^^^^^^^^^^^^^^^^^^^
----------------------

If you are running Windows, the following tox commands must be prefixed by ``windows-``:

- ``tests``
- ``quick``
- ``examples``
Expand All @@ -214,32 +246,4 @@ For example, to run the full test suite on Windows you would type:

.. code:: bash
python -m tox -e windows-tests
Using the test runner
~~~~~~~~~~~~~~~~~~~~~~

You can run unit tests for PyBaMM using

.. code:: bash
# in the PyBaMM/ directory
python run-tests.py --unit
The above starts a sub-process using the current python interpreter (i.e. using your current
python environment) and run the unit tests. This can take a few minutes.

You can also use the test runner to run the doctests:
.. code:: bash
python run-tests.py --doctests
There is more to the PyBaMM test runner. To see a list of all options, type

.. code:: bash
python run-tests.py --help
python -m tox -e windows-tests

0 comments on commit ab1fc4c

Please sign in to comment.