inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
2.94k stars 226 forks source link

Increase the code coverage and PEPs standards #242

Open discort opened 7 years ago

discort commented 7 years ago

Problem There are no tests, so developers can't make pull requests without breaking the code. The issue probably related with #40 Also, need to standardize the code as much as possible. At the moment these PEPs are ignored: E126,E127,E128,E123,E226,E241,E242,E265,W503,E402

Solution

  1. Increase the code coverage as much as possible.
  2. Integrate with CI, (i.e. CircleCI, TravisCI). Add a test runner for the each pull request.
  3. Step by step make a code refactoring and standardize simultaneously, later add a linter for PRs.
  4. Add/Clarify a documentation how to contribute.
asmeurer commented 7 years ago

I'm not too concerned with PEP 8 things. Most of the rules you cited are things I don't completely agree with, and definitely don't think should be enforced with tests. Many are so controversial that they aren't even enabled by default in pycodestyle (previously called pep8).

I do agree that we need tests (it's mostly an issue of figuring out how, see https://github.com/inducer/pudb/issues/40). Running pyflakes could be helpful too (unlike pycodestyle, pyflakes only flags logical errors, not style errors). It would need to be configured to ignore Python 3 compatibility stuff and some other false positives.

discort commented 7 years ago

The main issue is testing not PEP8 things (PEP 8 just helps different people to follow the similar code style).

I do agree that we need tests (it's mostly an issue of figuring out how, see #40).

Start from a testing of single functions and increase the code coverage, then do more complicated stuff