From 1575fd3c9ed933a44b7b89ab85908131bb8067a7 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 16 Jun 2016 10:08:22 +0200 Subject: update README with tox and flake8 info --- README.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'README.rst') diff --git a/README.rst b/README.rst index 4a665360..2861f44a 100644 --- a/README.rst +++ b/README.rst @@ -94,6 +94,18 @@ requirements installed, and you can simply run the test suite: Please ensure that all patches are accompanied by matching changes in the test suite. The project tries to maintain 100% test coverage. +You can also use `tox` to run a full suite of tests in Python 2.7 and 3.5, +including a quick test to check documentation and code linting. + +The following tox environments are relevant for local testing: + +.. code-block:: text + + tox -e py27 # runs all tests with Python 2.7 + tox -e py35 # runs all tests with Python 3.5 (partial support only) + tox -e docs # runs a does-it-compile check on the documentation + tox -e lint # runs the linter for coding style checks + Documentation ------------- @@ -120,6 +132,13 @@ contribute and collaborate. Please stick to the guidelines in `PEP8`_ and the `Google Style Guide`_ unless there's a very good reason not to. +This is automatically enforced on every PR. If we detect a linting error, the +PR checks will fail and block merging. We are using this command to check for style compliance: + +.. code-block:: text + + flake8 --jobs 8 --count mitmproxy netlib pathod examples test + .. |mitmproxy_site| image:: https://shields.mitmproxy.org/api/https%3A%2F%2F-mitmproxy.org-blue.svg :target: https://mitmproxy.org/ -- cgit v1.2.3