This is a sample to help you with integrating services into your Python project !
Inspired by rust-everywhere.
Table of Contents
| Event | Support | |
|---|---|---|
| 1 | [Developers Do This] Use Git to push new commits to GitHub | |
| 2 | Invoke CI |
|
| 3 | Run testing code (including doctest) on CI |
|
| 4 | Check coding style |
|
| 5 | Check testing coverage |
|
| 6 | Check docstring style |
|
| 7 | Check type hinting |
|
| 8 | Update coverage status |
|
| 9 | Update documentation to GitHub Pages |
|
| API documentation generated by docstring |
|
|
| Other documentation |
|
|
| Coverage report | not implement |
| Event | Support | |
|---|---|---|
| 1 | [Developers Do This] Use Git to push new commits and tag to GitHub | |
| 2 | Invoke CI |
|
| 3 | Run testing code (including doctest) on CI |
|
| 4 | Check coding style |
|
| 5 | Check testing coverage |
|
| 6 | Check docstring style |
|
| 7 | Check type hinting |
|
| 8 | Update coverage status |
|
| 9 | Update documentation to GitHub Pages |
|
| API documentation generated by docstring |
|
|
| Other documentation |
|
|
| Coverage report | not implement | |
| 10 | Build packages |
|
| 11 | Upload packages to other places |
|
- Travis CI integration
- pytest integration for testing
- flake8 integration (invoke by pytest)
- pylint integration (invoke by pytest)
- coverage integration (invoke by pytest)
- pydocstyle integration
- mypy integration (optional static type checker)
- Publish to PyPI with Travis CI automatically (when tagging new release)
- Publish to GitHub with Travis CI automatically (when tagging new release)
python setup.py installWith pytest-runner,
we will have python setup.py pytest.
With addopts = --doctest-modules in pytest.ini,
we will also invoke doctest.
With alias in setup.cfg, we can just use python setup.py test.
run your test code :
python setup.py test
python setup.py test --addopts -v # verboseHere is the pytest's documetation about integrating with setuptools.
With coverage, we can generate testing coverage report.
With pytest-cov and
--cov-report html --cov-report term in the pytest.ini,
we can generate testing coverage report along with running testing code.
Please visit https://coveralls.io/ to create coveralls for your repo.
python setup.py flake8Here is the flake8's documetation about integrating with setuptools.
mypy everywherePlease visit https://travis-ci.org/profile/USERNAME
to open Travis CI support for your repo.
python build_doc.pyPlease visit https://gitter.im/USERNAME#createroom
to add chat room for your repo.
Please visit https://codeclimate.com/github/signup
to add automated code review for your repo.