Repository: ibis-project/ibis

Issue:
Add prospector run to jenkins job
flake8/pylint violations will fail the jenkins build.



Discussion:
@wesm Here are the results from a prospector run with "medium" strictness.  Let me know if you'd like me to get cracking these.  It's also possible to disable the pylint messages at many levels of granularity.

https://gist.github.com/laserson/72b3f62464d4166be3d6

Oof, I would prefer to turn off the pylint and focus on flake8 violations mostly. It's helpful to occasionally look at, though. 

Much more tractable.  Only two mccabe violations, but I can turn that off too.

```
$ prospector
Messages
========

dev/merge-pr.py
  Line: 263
    pyflakes: F821 / undefined name 'maybe_cherry_pick' (col 5)
  Line: 283
    pyflakes: F821 / undefined name 'latest_branch' (col 46)

ibis/impala/client.py
  Line: 1316
    mccabe: MC0001 / pandas_col_to_ibis_type is too complex (17)

ibis/impala/tests/test_pandas_interop.py
  Line: 138
    pyflakes: F841 / local variable 'inferred' is assigned to but never used (col 13)
  Line: 222
    pyflakes: F841 / local variable 'df' is assigned to but never used (col 9)

ibis/sql/compiler.py
  Line: 729
    mccabe: MC0001 / _adapt_expr is too complex (22)



Check Information
=================
         Started: 2015-09-03 18:33:30.808577
        Finished: 2015-09-03 18:33:37.452793
      Time Taken: 6.64 seconds
       Formatter: grouped
        Profiles: .landscape.yaml, no_doc_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
      Strictness: from profile
  Libraries Used: 
       Tools Run: dodgy, mccabe, pep8, profile-validator, pyflakes
  Messages Found: 6
```

Are we maintaining `merge-pr.py`?  Or should I add it to an ignore list?

Leave that one, I like it. Thanks!

yeah ignore `merge-pr.py`

Only issue with leaving it on is that prospector returns with non-zero status if there are any messages output.

okay, let's disable it for now, and re-enable it after fixing those issues (which aren't that urgent)


Resolving patch:
diff --git a/ibis/impala/compiler.py b/ibis/impala/compiler.py
--- a/ibis/impala/compiler.py
+++ b/ibis/impala/compiler.py
@@ -17,7 +17,6 @@
 
 import ibis
 import ibis.expr.analysis as L
-import ibis.expr.analytics as analytics
 import ibis.expr.datatypes as dt
 import ibis.expr.types as ir
 import ibis.expr.operations as ops


Test patch:
diff --git a/ibis/impala/tests/test_pandas_interop.py b/ibis/impala/tests/test_pandas_interop.py
--- a/ibis/impala/tests/test_pandas_interop.py
+++ b/ibis/impala/tests/test_pandas_interop.py
@@ -135,7 +135,7 @@ def test_dtype_uint32(self):
     def test_dtype_uint64(self):
         df = pd.DataFrame({'col': np.uint64([666, 2, 3])})
         with self.assertRaises(IbisTypeError):
-            inferred = pandas_to_ibis_schema(df)
+            inferred = pandas_to_ibis_schema(df)  # noqa
 
     def test_dtype_datetime64(self):
         df = pd.DataFrame({
@@ -219,6 +219,6 @@ def test_round_trip_missing_type_promotion(self):
         self.con.con.cursor.execute(insert_query)
 
         table = self.con.table('missing_ints', database=self.tmp_db)
-        df = table.execute()
+        df = table.execute()  # noqa  # REMOVE LATER
 
         # WHAT NOW?