anidata / palantiri

Web crawler to collect data on ht
MIT License
17 stars 8 forks source link

Running setup.py test #8

Closed kaushik316 closed 7 years ago

kaushik316 commented 7 years ago

When running python setup.py test I see the following error in terminal:

/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running test
E
======================================================================
ERROR: core.test_website (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: core.test_website
Traceback (most recent call last):
  File "/Users/kaushikvisvanathan/anaconda/lib/python2.7/unittest/loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "/Users/kaushikvisvanathan/anaconda/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "/Users/kaushikvisvanathan/Documents/PythonProjects/palantiri/tests/core/test_website.py", line 5, in <module>
    from palantiri.core.common import Website
ImportError: No module named palantiri.core.common

I think we might have made some progress in narrowing down a possible cause at Code for Atlanta today to a subprocess created but we didn't get a chance to finalize a solution.

coxjonc commented 7 years ago

You're running pip install -e before running the tests, right?

kaushik316 commented 7 years ago

Yes I am, we checked to see whether the required packages existed and they did but for some reason python was having trouble locating them at run time.

coxjonc commented 7 years ago

I actually ran into a similar problem when I was using anaconda. What type of virtual environment are you using?

On Mar 29, 2017 11:27 AM, "Kaushik Visvanathan" notifications@github.com wrote:

Yes I am, we checked to see whether the required packages existed and they did but for some reason python was having trouble locating them at run time.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/anidata/palantiri/issues/8#issuecomment-290126606, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFIOK458t_EX316aJ4NeTtOceAsLE4bks5rqnh0gaJpZM4MsbST .

bmenn commented 7 years ago

From the digging I did last night, I think there was a problem in the setup.py. I'll post more details once I'm on my home computer.

bmenn commented 7 years ago

@kaushik316,

I have made changes that should fix this error in another branch. Could you try them out on your computer and let me know if it works? You can download the new changes by running the following commands after you cd in the folder where the palantiri code is:

$ git fetch
$ git checkout setuptools

After you are done testing if it works with python setup.py test, you can switch the version back to the original by running

$ git checkout master

@geezhawk this might have fix the problem you had in #2?

kaushik316 commented 7 years ago

@bmenn I think that worked! Output after running python3 setup.py test below for confirmation:

running test
running egg_info
writing palantiri.egg-info/PKG-INFO
writing requirements to palantiri.egg-info/requires.txt
writing top-level names to palantiri.egg-info/top_level.txt
writing dependency_links to palantiri.egg-info/dependency_links.txt
reading manifest file 'palantiri.egg-info/SOURCES.txt'
writing manifest file 'palantiri.egg-info/SOURCES.txt'
running build_ext
building 'util' extension
creating build/temp.macosx-10.6-intel-3.5/palantiri
creating build/temp.macosx-10.6-intel-3.5/palantiri/ext
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c palantiri/ext/util.c -o build/temp.macosx-10.6-intel-3.5/palantiri/ext/util.o
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.5/palantiri/ext/util.o -o build/lib.macosx-10.6-intel-3.5/palantiri/util.cpython-35m-darwin.so
copying build/lib.macosx-10.6-intel-3.5/palantiri/util.cpython-35m-darwin.so -> palantiri
test_website (tests.core.test_website.TestStringMethods) ... ok
test_website (tests.core.test_website.TestStringMethods) ... ok
test_website (tests.core.test_website.TestStringMethods) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.001s

OK
bmenn commented 7 years ago

@kaushik316

Thanks for the test! I'll make a PR to have it merged back into master.

bmenn commented 7 years ago

Closing since #9 has been merged.