simchuck: I'm not understanding how the CI process works, and what the build failure means.  How can I fix this?
deppen8: > I'm not understanding how the CI process works, and what the build failure means. How can I fix this?

If you click on the "Details" link next to the Travis message here on GitHub, it should open the Travis dashboard for this project. Below the main info, you should see two Build Jobs listed: one for Python 3.5 and one for 3.6. Click on either one of those bars and it will expand and show you the actual command line from that build attempt.

In your case, the errors are actually different for the different Python versions. 
- Python 3.5 raised an error because f'strings sadly didn't get implemented until 3.6. 
- Python 3.6 raised an error because `node.func.attr` is not behaving as expected. `node.func` is returning some kind of `Name` object.
diff --git a/pandas_vet/__init__.py b/pandas_vet/__init__.py
index 8c286e0..b675fd8 100644
--- a/pandas_vet/__init__.py
+++ b/pandas_vet/__init__.py
@@ -14,6 +14,9 @@ class Visitor(ast.NodeVisitor):
     ast.NodeVisitor will automatically call the appropriate method for a given node type
 
     i.e. calling self.visit on an Import node calls visit_import
+
+    The `check` functions should be called from the `visit_` method that
+    would produce a 'fail' condition.  
     """
     errors = attr.ib(default=attr.Factory(list))
 
@@ -28,6 +31,8 @@ class Visitor(ast.NodeVisitor):
         self.errors.extend(check_for_notnull(node))
         self.errors.extend(check_for_pivot(node))
         self.errors.extend(check_for_unstack(node))
+        self.errors.extend(check_for_arithmetic_methods(node))
+        self.errors.extend(check_for_comparison_methods(node))
 
     def visit_Subscript(self, node):
         self.generic_visit(node)  # continue checking children
@@ -86,6 +91,50 @@ def check_for_notnull(node: ast.Call) -> List:
         return [PD004(node.lineno, node.col_offset)]
     return []
 
+def check_for_arithmetic_methods(node: ast.Call) -> List:
+    """
+    Check AST for occurence of explicit arithmetic methods.  
+
+    Error/warning message to recommend use of binary arithmetic operators instead.
+    """
+    arithmetic_methods = [
+        'add',
+        'sub', 'subtract',
+        'mul', 'multiply',
+        'div', 'divide', 'truediv',
+        'pow',
+        'floordiv',
+        'mod',
+        ]
+    arithmetic_operators = [
+        '+',
+        '-',
+        '*',
+        '/',
+        '**',
+        '//',
+        '%',
+        ]
+
+    if isinstance(node.func, ast.Attribute) and node.func.attr in arithmetic_methods:
+        return [PD005(node.lineno, node.col_offset)]
+    return []
+
+
+def check_for_comparison_methods(node: ast.Call) -> List:
+    """
+    Check AST for occurence of explicit comparison methods.  
+
+    Error/warning message to recommend use of binary comparison operators instead.
+    """
+    comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne']
+    comparison_operators = ['>',  '<',  '>=', '<=', '==', '!=']
+
+    if isinstance(node.func, ast.Attribute) and node.func.attr in comparison_methods:
+        return [PD006(node.lineno, node.col_offset)]
+    return []
+
+
 def check_for_ix(node: ast.Subscript) -> List:
     if node.value.attr == "ix":
         return [PD007(node.lineno, node.col_offset)]

Arithmetic and comparison operators
We should implement checks for all of the text-based arithmetic and comparison operators. If found, recommend using the operator itself. Something like:

> Use <operator> instead of <text method>

| use | check for |
| --- | ---------- |
| `+` | `.add` |
| `-` | `.sub` and `.subtract` |
| `*` | `.mul` and `.multiply` |
| `/` | `.div`, `.divide` and `.truediv` |
| `**` | `.pow` |
| `//` | `.floordiv` |
| `%` | `.mod` |
| `>` | `.gt` |
| `<` | `.lt` |
| `>=` | `.ge` |
| `<=` | `.le` |
| `==` | `.eq` |
| `!=` | `.ne` |
diff --git a/tests/test_PD005.py b/tests/test_PD005.py
new file mode 100644
index 0000000..9c68e0e
--- /dev/null
+++ b/tests/test_PD005.py
@@ -0,0 +1,51 @@
+"""
+Test to check for use of explicit arithmetic methods.
+
+Recommend use of binary arithmetic operators instead.
+"""
+import ast
+
+from pandas_vet import VetPlugin
+from pandas_vet import PD005
+
+
+def test_PD005_pass_arithmetic_operator():
+    """
+    Test that using binary arithmetic operator explicitly does not result in an error.
+    """
+    arithmetic_operators = [
+        '+',
+        '-',
+        '*',
+        '/',
+        '**',
+        '//',
+        '%',
+        ]
+    for op in arithmetic_operators:
+        statement = 'C = A {0} B'.format(op)
+        tree = ast.parse(statement)
+        actual = list(VetPlugin(tree).run())
+        expected = []
+        assert actual == expected
+
+
+def test_PD005_fail_arithmetic_method():
+    """
+    Test that using arithmetic method results in an error.
+    """
+    arithmetic_methods = [
+        'add',
+        'sub', 'subtract',
+        'mul', 'multiply',
+        'div', 'divide', 'truediv',
+        'pow',
+        'floordiv',
+        'mod',
+        ]
+    for op in arithmetic_methods:
+        statement = 'C = A.{0}(B)'.format(op)
+        tree = ast.parse(statement)
+        actual = list(VetPlugin(tree).run())
+        expected = [PD005(1, 4)]
+        assert actual == expected
diff --git a/tests/test_PD006.py b/tests/test_PD006.py
new file mode 100644
index 0000000..cb30365
--- /dev/null
+++ b/tests/test_PD006.py
@@ -0,0 +1,35 @@
+"""
+Test to check for use of explicit comparison methods.
+
+Recommend use of binary comparison operators instead.
+"""
+import ast
+
+from pandas_vet import VetPlugin
+from pandas_vet import PD006
+
+
+def test_PD006_pass_comparison_operator():
+    """
+    Test that using binary comparison operator explicitly does not result in an error.
+    """
+    comparison_operators = ['>',  '<',  '>=', '<=', '==', '!=']
+    for op in comparison_operators:
+        statement = 'C = A {0} B'.format(op)
+        tree = ast.parse(statement)
+        actual = list(VetPlugin(tree).run())
+        expected = []
+        assert actual == expected
+
+
+def test_PD006_fail_comparison_method():
+    """
+    Test that using comparison method results in an error.
+    """
+    comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne']
+    for op in comparison_methods:
+        statement = 'C = A.{0}(B)'.format(op)
+        tree = ast.parse(statement)
+        actual = list(VetPlugin(tree).run())
+        expected = [PD006(1, 4)]
+        assert actual == expected

pip install -e .
parse_log_pytest
requirements.txt
pytest
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
exceptiongroup==1.2.2
flake8==7.2.0
iniconfig==2.1.0
mccabe==0.7.0
packaging==24.2
-e git+https://github.com/deppen8/pandas-vet.git@128232a43e8dd2819e77da5a03f494691e494da1#egg=pandas_vet
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.2
pytest==8.3.5
tomli==2.2.1

name: pandas-vet
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - exceptiongroup==1.2.2
      - flake8==7.2.0
      - iniconfig==2.1.0
      - mccabe==0.7.0
      - packaging==24.2
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.2
      - pytest==8.3.5
      - tomli==2.2.1
prefix: /opt/conda/envs/pandas-vet

tests/test_PD005.py::test_PD005_fail_arithmetic_method tests/test_PD006.py::test_PD006_fail_comparison_method
tests/test_PD005.py::test_PD005_pass_arithmetic_operator tests/test_PD006.py::test_PD006_pass_comparison_operator
pandas_vet/__init__.py
pandas_vet/__init__.py