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(+) 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 From daa31c0fe063369fa17db9e3ace7b6dcf95cbb81 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 16 Jun 2016 10:08:47 +0200 Subject: hide codecov.yml --- .codecov.yml | 1 + README.rst | 3 +++ codecov.yml | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .codecov.yml delete mode 100644 codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..db247200 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1 @@ +comment: off diff --git a/README.rst b/README.rst index 2861f44a..983f50fb 100644 --- a/README.rst +++ b/README.rst @@ -106,6 +106,9 @@ The following tox environments are relevant for local testing: tox -e docs # runs a does-it-compile check on the documentation tox -e lint # runs the linter for coding style checks +We are in the middle of transitioning to Python 3, so please make sure all tests +pass in Python 2.7 and 3.5. Running `tox` ensure all necessary tests are executed. + Documentation ------------- diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index db247200..00000000 --- a/codecov.yml +++ /dev/null @@ -1 +0,0 @@ -comment: off -- cgit v1.2.3