Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

wdv4758h/python-everywhere

Repository files navigation

python-everywhere

python version issues travis license coveralls pypi-v pypi-dm pypi-dd Join the chat at https://gitter.im/wdv4758h/python-everywhere code-climate

This is a sample to help you with integrating services into your Python project !

Inspired by rust-everywhere.

Table of Contents

Scenario

Pushing new commits

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

Making new release

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

Features

  • 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)

Installation

python setup.py install

Testing

pytest

With 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   # verbose

Here is the pytest's documetation about integrating with setuptools.

Coverage

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.

Coveralls

Please visit https://coveralls.io/ to create coveralls for your repo.

Linter

Flake8

python setup.py flake8

Here is the flake8's documetation about integrating with setuptools.

Type Checking

mypy

mypy everywhere

Native Extension

Continuous Integration

Travis CI

Please visit https://travis-ci.org/profile/USERNAME to open Travis CI support for your repo.

Documentation

python build_doc.py

Comunication

Gitter

Please visit https://gitter.im/USERNAME#createroom to add chat room for your repo.

Code Review

Code Climate

Please visit https://codeclimate.com/github/signup to add automated code review for your repo.