Skip to content

Commit

Permalink
Merge pull request #234 from benfred/flake8
Browse files Browse the repository at this point in the history
Run flake8 as part of the build
  • Loading branch information
Leonid Boytsov authored and GitHub committed Sep 6, 2017
2 parents 8f065a9 + 5054568 commit 353b152
Show file tree
Hide file tree
Showing 5 changed files with 26 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
6 changes: 6 additions & 0 deletions python_bindings/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[metadata]
description-file = README.md

[flake8]
max-line-length = 100
exclude = build,.eggs,.tox,integration_tests,docs
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 353b152

Please sign in to comment.