|python| |version| |issues| |travis| |license| |coveralls| |pypi-v| |pypi-dm| |pypi-dd| |gitter| |code-climate|
This is a sample to help you with integrating services into your Python project !
Inspired by rust-everywhere <https://github.com/japaric/rust-everywhere>
_.
.. contents:: Table of Contents
+---+--------------------------------------------+----------------------------+ | | Event | Support | +===+============================================+============================+ | 1 | [Developers Do This] | | | | Use Git to push new commits to GitHub | | +---+--------------------------------------------+----------------------------+ | 2 | Invoke CI | Travis CI | | | | Buildbot (not implement) | +---+--------------------------------------------+----------------------------+ | 3 | Run testing code (including doctest) on CI | pytest | | | | nose (not implement) | +---+--------------------------------------------+----------------------------+ | 4 | Check coding style | flake8 | | | | pylint | +---+--------------------------------------------+----------------------------+ | 5 | Check testing coverage | coverage | +---+--------------------------------------------+----------------------------+ | 6 | Check docstring style | pydocstyle | +---+--------------------------------------------+----------------------------+ | 7 | Check type hinting | mypy | +---+--------------------------------------------+----------------------------+ | 8 | Update coverage status | coveralls | +---+--------------------------------------------+----------------------------+ | 9 | Update documentation to GitHub Pages | Sphinx | +---+--------------------------------------------+----------------------------+ | | API documentation generated by docstring | .py | | | | .pyx (not implement) | +---+--------------------------------------------+----------------------------+ | | Other documentation | .rst | +---+--------------------------------------------+----------------------------+ | | Coverage report | not implement | +---+--------------------------------------------+----------------------------+
+----+---------------------------------------------------+----------------------------+ | | Event | Support | +====+===================================================+============================+ | 1 | [Developers Do This] | | | | Use Git to push new commits and tag to GitHub | | +----+---------------------------------------------------+----------------------------+ | 2 | Invoke CI | Travis CI | | | | Buildbot (not implement) | +----+---------------------------------------------------+----------------------------+ | 3 | Run testing code (including doctest) on CI | pytest | | | | nose (not implement) | +----+---------------------------------------------------+----------------------------+ | 4 | Check coding style | flake8 | | | | pylint | +----+---------------------------------------------------+----------------------------+ | 5 | Check testing coverage | coverage | +----+---------------------------------------------------+----------------------------+ | 6 | Check docstring style | pydocstyle | +----+---------------------------------------------------+----------------------------+ | 7 | Check type hinting | mypy | +----+---------------------------------------------------+----------------------------+ | 8 | Update coverage status | coveralls | +----+---------------------------------------------------+----------------------------+ | 9 | Update documentation to GitHub Pages | Sphinx | +----+---------------------------------------------------+----------------------------+ | | API documentation generated by docstring | .py | | | | .pyx (not implement) | +----+---------------------------------------------------+----------------------------+ | | Other documentation | .rst | +----+---------------------------------------------------+----------------------------+ | | Coverage report | not implement | +----+---------------------------------------------------+----------------------------+ | 10 | Build packages | source | | | | wheel | | | | rpm | | | | exe | +----+---------------------------------------------------+----------------------------+ | 11 | Upload packages to other places | GitHub | | | | PyPI | +----+---------------------------------------------------+----------------------------+
.. code-block:: sh
python setup.py install
With pytest-runner <https://github.com/pytest-dev/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 :
.. code-block:: sh
python setup.py test
python setup.py test --addopts -v # verbose
Here is the pytest's documetation <https://pytest.org/latest/goodpractices.html#integrating-with-setuptools-python-setup-py-test-pytest-runner>
_ 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.
.. code-block:: sh
python setup.py flake8
Here is the flake8's documetation <http://flake8.readthedocs.io/en/latest/setuptools.html>
_ about integrating with setuptools.
.. code-block:: sh
mypy everywhere
Extending and Embedding the Python Interpreter <https://docs.python.org/3/extending/>
_Cython <http://docs.cython.org>
_Please visit https://travis-ci.org/profile/USERNAME
to open Travis CI support for your repo.
.. code-block:: sh
python build_doc.py
Please 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.
.. |python| image:: https://img.shields.io/badge/language-python-blue.svg :target: https://www.python.org/
.. |version| image:: https://img.shields.io/pypi/pyversions/python-everywhere.svg :target: https://www.python.org/
.. |issues| image:: https://img.shields.io/github/issues/wdv4758h/python-everywhere.svg :target: https://github.com/wdv4758h/python-everywhere/issues
.. |travis| image:: https://img.shields.io/travis/wdv4758h/python-everywhere.svg :target: https://travis-ci.org/wdv4758h/python-everywhere
.. |gitter| image:: https://badges.gitter.im/Join%20Chat.svg :alt: Join the chat at https://gitter.im/wdv4758h/python-everywhere :target: https://gitter.im/wdv4758h/python-everywhere
.. |coveralls| image:: https://coveralls.io/repos/github/wdv4758h/python-everywhere/badge.svg :target: https://coveralls.io/github/wdv4758h/python-everywhere
.. |pypi-v| image:: https://img.shields.io/pypi/v/python-everywhere.svg :target: https://pypi.python.org/pypi/python-everywhere
.. |pypi-dm| image:: https://img.shields.io/pypi/dm/python-everywhere.svg :target: https://pypi.python.org/pypi/python-everywhere
.. |pypi-dd| image:: https://img.shields.io/pypi/dd/python-everywhere.svg :target: https://pypi.python.org/pypi/python-everywhere
.. |license| image:: https://img.shields.io/github/license/wdv4758h/python-everywhere.svg :target: https://github.com/wdv4758h/python-everywhere/blob/master/LICENSE
.. |code-climate| image:: https://img.shields.io/codeclimate/github/wdv4758h/python-everywhere.svg :target: https://codeclimate.com/github/wdv4758h/python-everywhere