Skip to content

Commit

Permalink
Run flake8 as part of the build
Browse files Browse the repository at this point in the history
For files in the python_bindings folder, run flake8 to detect style
issues and errors automatically.
  • Loading branch information
Ben Frederickson committed Sep 2, 2017
1 parent bd33311 commit ff6ddc8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ before_install:
source venv/bin/activate
install:
- cmake similarity_search && make -j 4
- travis_wait travis_retry pip install -r python_bindings/requirements.txt scipy six
- travis_wait travis_retry pip install -r python_bindings/requirements.txt scipy six flake8
- travis_retry cd python_bindings && python setup.py build install && cd ..

script:
Expand All @@ -40,6 +40,7 @@ script:
fi
cd python_bindings
python setup.py test
flake8
cd ..
cache:
- apt
Expand Down
9 changes: 6 additions & 3 deletions python_bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,12 @@ def build_extensions(self):
description='Non-Metric Space Library (NMSLIB)',
author='Leonid Boytsov',
url='https://github.com/searchivarius/nmslib',
long_description="""Non-Metric Space Library (NMSLIB) is an efficient cross-platform similarity search library and a toolkit for evaluation of similarity search methods.
The goal of the project is to create an effective and comprehensive toolkit for searching in generic non-metric spaces. Being comprehensive is important, because no single method
is likely to be sufficient in all cases. Also note that exact solutions are hardly efficient in high dimensions and/or non-metric spaces. Hence, the main focus is on approximate me thods.""",
long_description="""Non-Metric Space Library (NMSLIB) is an efficient cross-platform
similarity search library and a toolkit for evaluation of similarity search methods. The
goal of the project is to create an effective and comprehensive toolkit for searching in
generic non-metric spaces. Being comprehensive is important, because no single method is
likely to be sufficient in all cases. Also note that exact solutions are hardly efficient in
high dimensions and/or non-metric spaces. Hence, the main focus is on approximate methods.""",
ext_modules=ext_modules,
install_requires=['pybind11>=2.0', 'numpy'],
cmdclass={'build_ext': BuildExt},
Expand Down
1 change: 1 addition & 0 deletions python_bindings/tests/legacy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import nmslib


class DenseTests(unittest.TestCase):

def setUp(self):
Expand Down
11 changes: 11 additions & 0 deletions python_bindings/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@ envlist = py27, py35, py36
commands = {envpython} setup.py test
deps =
-rrequirements.txt

[testenv:style]
deps =
-rrequirements.txt
flake8

commands =
flake8

[flake8]
max-line-length = 100

0 comments on commit ff6ddc8

Please sign in to comment.