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 PEP8 as the code style convention. Please
check your contributions with flask8 and the
flake8-doscstring extension before submitting.
Configuration of flake8
is stored in the setup.cfg
.
Autopep8 is helpful and uses the same configuration as
flake8
.
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