Development

Contributing

We welcome everybody to help by reporting bugs or making suggestions via our issue tracker or contribute code via pull requests .

Code style

We use the `black <https://black.readthedocs.io/en/stable/index.html>`__code style.

Testing

Our tests are based on pytest. To run the tests locally with your current environment, run

python -m pytest

from the root directory.

We use tox run via Travis CI for testing for various python versions. New commits will automatically be tested and the results reported within github. If all tests are succesful, coverage will be checked via coveralls for the latest python version.

Documentation

For documentation, AISim uses numpydoc style docstrings which are rendered to html with Sphinx and the napoleon extension. Examples provided as Jupyter notebooks are rendered with the nbsphinx extension. The creation of the online documentation is done via readthedocs and hosted here.

Building docs locally

Install sphinx, sphinx_rtd_theme and nbsphinx for example using pip. Then run make html from the docs folder. The html documentation can then be found in docs/_build/html.

The API / Code Reference documentation is automatically generated with

sphinx-apidoc --force --no-toc --module-first -o docs aisim