add python checkstyle tool to science

code lives in {src,tests}/python/twitter/checkstyle
checkstyle plugins live in src/python/twitter/checkstyle/plugins and are dynamically loaded (but can be toggled with the -p option)

there are four binary targets provided:
  src/python/twitter/checkstyle:check => checker with all checks linked in
  src/python/twitter/checkstyle:check_pep8 => checker with only pep8 checks linked in
  src/python/twitter/checkstyle:check_pyflakes => checker with only pyflakes checks linked in
  src/python/twitter/checkstyle:check_twitter => checker with only twitter styleguide-specific checks linked in

running:

dist/check.pex [-p PLUGIN1 [-p PLUGIN2] ...]
               [--diff=branch]
               [-s SEVERITY]
               [--strict]
               glob1 glob2 ...

  -p allows you to toggle individual auto-loaded plugins, e.g. ExceptStatements.  if -p unspecified, all are selected.
  if --diff=branch is supplied, only run checkstyle against a diff (e.g. i've been testing this code by running dist/check.pex --diff=master)  NOTE this disables glob checking.
  severity levels are COMMENT, WARNING, ERROR.  -s allows you to toggle the level at which we log nits.
  if --strict is supplied, it exits non-zero if you get any nit at WARNING or higher.
  if globs specified, zsh glob (you probably want to escape these if you're already in zsh)

RB_ID=151272

(sapling split of 73e80ba512c854135544624f2baa6d6fca4eaddf)
add more checkstyle test coverage, integrate issue taxonomy

RB_ID=152529

(sapling split of d5b887947f86a34d40c05616cb2816db64132b9d)
do not discourage single line exception classes in checkstyle

single line: pass and hierarchy checking coming in next diff

RB_ID=153609
NO-QUEUE=true

(sapling split of 088ee346232a2869e6bb698a2f75732be7f840d2)
Streamlines Python checkstyle output

RB_ID=156640
NO-QUEUE=true

(sapling split of 57a0c45cb78dd99691a903d0c9bcf648e06fa4d6)
Sets checkstyle diff branch to master if no args or branch are set

RB_ID=156749
NO-QUEUE=true

(sapling split of 71613a83c5dfcc7b2f405d69a221f3db655e51f5)
AWESOME-4695 Fix checkstyle when renaming python files

RB_ID=170611

(sapling split of 6c2832f74059eeed0313e9e9c184d4d16dfe8cb1)
rename src/python/twitter/mesos to src/python/twitter/aurora

rename src/python/twitter/mesos to src/python/twitter/aurora
 - change sandbox code
 - rename recipes
 - s/MesosClientAPI/AuroraClientAPI/
 - update thrift namespaces, straggling missed changes and entry_points
 - import reordering
 - search and replace for twitter/mesos to twitter/aurora
 - search and replace for twitter.mesos to twitter.aurora
 - rewrite BUILD files

RB_ID=175784

(sapling split of d882f27457be9f6918c4eda1d66c7e415af28eca)
Fix checkstyle errors for checkstyle.

RB_ID=195707

(sapling split of 19d8d682d5f4b6721aa26cc4fc592cc100d5f990)
Alphabetize target dependencies
This looks like a total yak shave, but it will make automating the moving of dependencies to 3rdparty/... easier.

RB_ID=285621
TBR=true

(sapling split of 3189674498304979ce21dbd2e5165593064f7984)
Expose the ttl and install_cache properties on CachingObtainer.

They're "public" anyway, in the sense that they're passed into
__init__(). But this allows the PantsObtainer subclass of CachingObtainer
 to access them in a natural way and use them to initialize the temporary
CachingObtainers it delegates to.

Reviewed at https://rbcommons.com/s/twitter/r/267/

Signed-off-by: John Sirois <jsirois@twitter.com>
Squash exceptions even if user sys.exits

Before, it was possible to short-circuit the exception squashing code in
pex.execute through a sys.exit.  This wraps the execute logic in a
try/finally and increments twitter.common.python to 0.5.2.
Actually print and reraise exceptions in PEX.execute.  Increment to 0.5.3

Reviewed at https://rbcommons.com/s/twitter/r/271/
Increment twitter.pants to 0.0.20.

Reviewed at https://rbcommons.com/s/twitter/r/275/
Do not re-raise SystemExit exceptions

Reviewed at https://rbcommons.com/s/twitter/r/276/
Fix site scrubbing to include site.getsitepackages if available.

Reviewed at https://rbcommons.com/s/twitter/r/289/
Don't follow rel links by default, mirroring pip default behavior.

We should probably make this configurable via PantsObtainer in pantsbuild,
but for now I'm disabling it hard, which mirrors pip 1.6.x series semantics.
This is primarily to fix https://issues.apache.org/jira/browse/AURORA-368.
There's really no good reason to pull rel links.  The only exception we have
in practice is elementtree but I would both 1) love to see that dependency
go away and 2) we can always cache it on raw.github.com if we continue to
rely upon its source as a dependency.

Reviewed at https://rbcommons.com/s/twitter/r/293/
Allow redirection of PEX's stdin/stdout/stderr.

Useful for capturing output, e.g., by Pants.
Add history migration script.
Fix a few twitter.checkstyle bugs.  Add setup.py project for OSS.

- Add setup.py project.  Add more docstrings + check --list
- Add noqa.  Skip camelCase names if derived from non-object superclass.
- Get CheckstylePlugin out of the business of line filtering

RB_ID=353163

(sapling split of ce4d81d9762b850ae60c82a9d933dbb803275692)
[PATCH 0018/7508] Metrics: Fix the size of the indices array.

RB_ID=145008

(sapling split of c3066d97fd1e1d551285947f73aa86aef1c3ca58)