summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrina Truong <i.chernyavska@gmail.com>2017-04-07 17:00:35 -0700
committerIrina Truong <i.chernyavska@gmail.com>2017-04-07 17:00:35 -0700
commitb3ade2db9dcb16df49c2a8574237b16e981f442e (patch)
treeb70049c5a8cdc8a8b94b55fa025f1978ab26dc33
parenteab935034e6b93cde75f273500d0361565aaa699 (diff)
Ported pep8radius addition from mycli.
-rw-r--r--.travis.yml3
-rw-r--r--DEVELOP.rst15
-rw-r--r--changelog.rst4
-rw-r--r--requirements-dev.txt3
4 files changed, 24 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index d57f18a7..a726abb7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,12 +8,15 @@ python:
install:
- pip install . pytest mock codecov==1.5.1 behave pexpect==3.3
+ - pip install git+https://github.com/hayd/pep8radius.git
script:
- coverage run --source pgcli -m py.test
- cd tests
- behave
- cd ..
+ # check for pep8 errors, only looking at branch vs master. If there are errors, show diff and return an error code.
+ - pep8radius master --docformatter --error-status || ( pep8radius master --docformatter --diff; false )
after_success:
- coverage combine
diff --git a/DEVELOP.rst b/DEVELOP.rst
index 0c4dedf3..dc9157f6 100644
--- a/DEVELOP.rst
+++ b/DEVELOP.rst
@@ -155,3 +155,18 @@ To see stdout/stderr, use the following command:
$ behave --no-capture
+
+PEP8 checks
+-----------
+
+When you submit a PR, the changeset is checked for pep8 compliance using
+`pep8radius <https://github.com/hayd/pep8radius>`_. If you see a build failing because
+of these checks, install pep8radius and apply style fixes:
+
+::
+
+ $ pip install pep8radius
+ $ pep8radius --docformatter --diff # view a diff of proposed fixes
+ $ pep8radius --docformatter --in-place # apply the fixes
+
+Then commit and push the fixes.
diff --git a/changelog.rst b/changelog.rst
index a50200d2..96d4893f 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -11,6 +11,10 @@ Bug fixes:
* Fixed external editor bug (issue #668). (Thanks: `Irina Truong`_).
* Standardize command line option names. (Thanks: `Russell Davies`_)
+Internal changes:
+-----------------
+* Run pep8 checks in travis (Thanks: `Irina Truong`_).
+
1.5.1
=====
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 672b309a..215b377a 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -3,4 +3,5 @@ mock>=1.0.1
tox>=1.9.2
behave>=1.2.4
pexpect==3.3
-coverage==4.3.4 \ No newline at end of file
+coverage==4.3.4
+pep8radius \ No newline at end of file