Using Tox on TravisCI to enforce pep8 standards etc
Peter Cock <[email protected]>
| Newsgroups | gmane.comp.python.bio.devel |
|---|---|
| Message-ID | <CAKVJ-_681u+F1qu1d898bTn0htipi9OqFRc8RH3TkpvQ_cF_WA@mail.gmail.com> |
Hello all, Many of us are already using the git pre-commit hook setup by Christian Brueffer, but new contributors in particular are unlikely to have this installed - and I still don't know how to use this on Windows: https://github.com/biopython/biopython/issues/493 I think it would be sensible to include the pep8 checks as part of our Travis Continuous Integration checks, which would then automatically be applied to pull requests as well. Ideally I would like the pre-commit hook to be strict but optional (you can override this when committing), while the TravisCI/Tox configuration should be more lenient but strictly enforced: https://github.com/biopython/biopython/issues/840 The PEP8 standards are guidelines, and as you will see from the proposed TravisCI/Tox configuration and the existing pre-commit hook, there are many that we do not follow. There is more than one way to add this to TravisCI. Having looked at this I think using Tox under TravisCI is a workable plan: https://github.com/biopython/biopython/pull/877 This pull request restructures our existing TravisCI configuration to install and use Tox. The motivation is to add extra test targets which would have be more complicated otherwise. The main new target is to run the pep8 tool to enforce coding standards. Two other new TravisCI test targets are to run the "python setup.py sdist" commands we use when building a release, and also check "python setup.py bdist_wheel" to build a binary wheel which I would like to include in future release processes. What do people think? We already try to point out style issues when doing pull request reviews, so having this partly automated via pep8 on TravisCI should help. Comments please, Peter