A small Cython template project with Gitlab-CI or Travis CI, py.test, and sphinx integration.
Project pages, for Gitlab, with sphinx autodoc'ed API documentation are built and served from the Gitlab-CI service.
Build without Cython:
$ python setup.py build_ext develop
Build with Cython:
$ python setup.py build_ext develop --use-cython
Testing with tox and py.test:
$ pip install tox
$ python setup.py build_ext test
Continous integration is done using Gitlab-CI with the required .gitlab-ci.yml file.
The continous integration can also be done using Travis CI and the equivalent .travis.yml file.
The following is a summary of what works and what does not with CI:
- build: Yes (with and without cython)
- test:
- tox: Yes
- py.test: Yes
- doctest: Yes (with a hack)
- coverage: No
- coveralls: No
- deploy:
- sphinx docs: Yes
- sphinx autodoc'ed API: Yes
- serve Gitlab pages: Yes
- serve Github pages: No (Was too lazy to try)
Note: Example of serving Github pages discussed here
Take care to change the proj
name in the following files:
setup.py
tox.ini
docs/apidoc.sh
docs/source/conf.py
Also take care to update tests/*
and remove docs/source/proj.*