pixelogik / NearPy

Python framework for fast (approximated) nearest neighbour search in large, high-dimensional data sets using different locality-sensitive hashes.
MIT License
759 stars 152 forks source link

Py3 compatibility fixes (Refs: #6) #39

Closed mikluko closed 8 years ago

mikluko commented 8 years ago

Fixes to make all tests pass on Python 3.3 and 3.4.

pixelogik commented 8 years ago

Thx mate! Did you check that this still works with Python 2.7.x?

mikluko commented 8 years ago

Sure. All tests pass on 2.7, 3.3 and 3.4. I added tox.ini to easily run tests on multiple python versions.

I can also try and set up TravisCI if you like.

pixelogik commented 8 years ago

Awesome.

I will check TravisCI for now, because I wanted to use it anyway at some point. I will ping you if I need help.

pixelogik commented 8 years ago

@akabos Hm, there seem to be some issues when running the tests.

For one I added mockredis, because that is needed.

On the other hand past.builtins is not available in Python 2.7? Running the tests failed on my machine saying that. Removing the imports however resulted in multiple fails during the tests.

If you wanna help with that and/or TravisCI, I would be glad.

mikluko commented 8 years ago

@pixelogik Can't reproduce. How exactly you run tests?

pixelogik commented 8 years ago

python run_tests.py

pixelogik commented 8 years ago

I get ImportError: No module named past.builtins

pixelogik commented 8 years ago

(I do not have Python3 installed, just using 2.7)

mikluko commented 8 years ago

That's very strange, because it works perfectly for me in newly created 2.7 venv. Let's ask Travis to run all that and se what he have to say.

mikluko commented 8 years ago

https://gist.github.com/akabos/b40ba19e51113ae51fc7

pixelogik commented 8 years ago

Ok weird. Maybe my OSX setup is broken :)

pixelogik commented 8 years ago

@akabos Could you help with TravisCI?

mikluko commented 8 years ago

Yup, doing that right now.

pixelogik commented 8 years ago

Awesome

mikluko commented 8 years ago

I'll create new pull request once Travis config is working.

mikluko commented 8 years ago

@pixelogik

Having some difficulties running that on Travis (https://travis-ci.org/akabos/NearPy). Installing NumPy and SciPy from sources takes very long time. I found some hints on installing them with conda, but it doesn't seem to work properly. I can't continue today, but I definitely don't give up. I'll keep you updated.

pixelogik commented 8 years ago

Ok. Thanks mate! Looking forward to it.

mikluko commented 8 years ago

See pull request https://github.com/pixelogik/NearPy/pull/40