Enable python-eval for pants source code.

Review Request #1773 - Created Feb. 15, 2015 and submitted

Information
John Sirois
pants
jsirois/python/compile_ci
1108
1772
1725
d095af8...
Reviewers
pants-reviews
benjyw, stuhood, zundel
This installs the PythonEval task in the compile phase for pants and
engages the python "compile" checks for pants source code in ci.  As a
result there are many missing BUILD dep fixes as well flagged by
python-eval in ci.

The python-eval checks add ~2 minutes to each ci shard, so ci is
restructured to be more fine grained in order to keep ci times ~6
minutes per shard.

 .travis.yml                                                                          | 21 ++++++++------
 build-support/bin/ci-sync.sh                                                         |  2 +-
 build-support/bin/ci.sh                                                              | 75 +++++++++++++++++++++++++++++++++-----------------
 build-support/bin/isort.sh                                                           |  2 +-
 build-support/pants_venv                                                             |  3 +-
 examples/src/python/example/pants_publish_plugin/BUILD                               |  2 ++
 pants-plugins/src/python/internal_backend/optional/BUILD                             |  1 +
 pants-plugins/src/python/internal_backend/optional/register.py                       |  2 ++
 pants-plugins/src/python/internal_backend/repositories/BUILD                         |  1 +
 pants-plugins/src/python/internal_backend/sitegen/BUILD                              |  1 +
 src/python/pants/backend/codegen/tasks/BUILD                                         | 23 ++++++++++++----
 src/python/pants/backend/codegen/tasks/apache_thrift_gen.py                          |  1 +
 src/python/pants/backend/core/BUILD                                                  |  2 ++
 src/python/pants/backend/core/tasks/BUILD                                            | 16 +++++++----
 src/python/pants/backend/core/tasks/run_prep_command.py                              |  2 --
 src/python/pants/backend/jvm/BUILD                                                   |  6 ++--
 src/python/pants/backend/jvm/tasks/BUILD                                             | 40 ++++++++++++++-------------
 src/python/pants/backend/jvm/tasks/ensime_gen.py                                     |  2 +-
 src/python/pants/backend/jvm/tasks/jvm_compile/BUILD                                 | 18 +++++++-----
 src/python/pants/backend/jvm/tasks/jvm_compile/scala/bin/__init__.py                 |  0
 src/python/pants/backend/jvm/tasks/jvm_compile/scala/{ => bin}/anonymize_analysis.py |  0
 src/python/pants/backend/python/BUILD                                                | 11 ++++++--
 src/python/pants/backend/python/antlr_builder.py                                     |  1 -
 src/python/pants/base/BUILD                                                          |  6 ++++
 src/python/pants/engine/BUILD                                                        |  1 +
 src/python/pants/goal/BUILD                                                          |  8 +++---
 src/python/pants/goal/initialize_reporting.py                                        |  1 -
 src/python/pants/java/BUILD                                                          |  1 +
 src/python/pants/java/nailgun_executor.py                                            |  2 --
 src/python/pants/reporting/BUILD                                                     |  8 +++---
 src/python/pants/reporting/report.py                                                 |  1 +
 src/python/pants/reporting/reporting_server.py                                       |  2 +-
 tests/python/pants_test/backend/jvm/tasks/jvm_compile/BUILD                          |  1 -
 tests/python/pants_test/backend/jvm/tasks/jvm_compile/test_zinc_utils.py             |  2 --
 tests/python/pants_test/tasks/BUILD                                                  |  3 +-
 tests/python/pants_test/tasks/jvm_compile/java/BUILD                                 |  3 +-
 36 files changed, 169 insertions(+), 102 deletions(-)

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/50809395

Also ran the moved anonimizer tool:

$ PANTS_DEV=1 ./pants= run src/python/pants/backend/jvm/tasks/jvm_compile:anonymize_zinc_analysis
...
22:33:14 00:01   [run]
22:33:14 00:01     [py]
22:33:14 00:01       [run]
Traceback (most recent call last):
  File "/tmp/tmptqC4pT/.bootstrap/_pex/pex.py", line 272, in execute
    self.execute_entry(entry_point, args)
  File "/tmp/tmptqC4pT/.bootstrap/_pex/pex.py", line 320, in execute_entry
    runner(entry_point)
  File "/tmp/tmptqC4pT/.bootstrap/_pex/pex.py", line 337, in execute_module
    runpy.run_module(module_name, run_name='__main__')
  File "/home/jsirois/.pyenv/versions/2.7.8/lib/python2.7/runpy.py", line 180, in run_module
    fname, loader, pkg_name)
  File "/home/jsirois/.pyenv/versions/2.7.8/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/jsirois/dev/3rdparty/jsirois-pants/src/python/pants/backend/jvm/tasks/jvm_compile/scala/bin/anonymize_analysis.py", line 45, in <module>
    main()
  File "/home/jsirois/dev/3rdparty/jsirois-pants/src/python/pants/backend/jvm/tasks/jvm_compile/scala/bin/anonymize_analysis.py", line 28, in main
    word_file = sys.argv[1]
IndexError: list index out of range

FAILURE: python {args} ... exited non-zero ({code})


               FAILURE
John Sirois
Benjy Weinberger
Eric Ayers
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...