Closed jchodera closed 9 years ago
Do we need nose and docopt to run?
This is weird. I still can't even python setup.py install
on my system (outside of building a conda recipe) and import bhmm
successfully:
[LSKI1497:~] choderaj% python
Python 2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import bhmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/choderaj/anaconda/lib/python2.7/site-packages/bhmm-0.1.0-py2.7-macosx-10.5-x86_64.egg/bhmm/__init__.py", line 13, in <module>
from bhmm.api import *
File "/Users/choderaj/anaconda/lib/python2.7/site-packages/bhmm-0.1.0-py2.7-macosx-10.5-x86_64.egg/bhmm/api.py", line 6, in <module>
from bhmm.hmm.generic_hmm import HMM as _HMM
ImportError: No module named hmm.generic_hmm
nosetests bhmm
also fails on my system.
How is it that this is working for you?
Maybe I have an old version installed somewhere? Checking...
It looks like these might be a version problem, because all kinds of imports fail in the conda build that are definitely available. I have been using
python setup.py develop
Maybe we need to assign a new version number in order to update the installation? Sorry, when it comes to installation I don't know much...
I just updated the version number with a github release (0.2.0) in order to update the omnia conda recipe. That was probably premature---need to figure out what's going on with the conda dev package first.
Not sure why python setup.py develop
would work while python setup.py install
would not...
This page explains the difference between install
and develop
. Maybe that means I have some files partially installed and out of date somewhere? Searching for this now.
Develop just installs a link to the source directory, so you don't have to redo when changes are made unless you want to rebuild extensions. Install makes a copy and installs it in your local distribution. I did have issues in the past with setup install when there were multiple versions/copies are installed. Maybe a new version number helps here.
Am 05/05/15 um 22:48 schrieb John Chodera:
I just updated the version number with a github release (0.2.0) in order to update the omnia conda recipe. That was probably premature---need to figure out what's going on with the conda dev package first.
Not sure why |python setup.py develop| would work while |python setup.py install| would not...
— Reply to this email directly or view it on GitHub https://github.com/bhmm/bhmm/pull/23#issuecomment-99216779.
Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin
Phone: (+49) (0)30 838 75354 Web: research.franknoe.de
I can confirm that python setup.py develop
does allow me to import bhmm
and run nosetests bhmm
! I think this suggests we have an issue with our setup.py
. Trying to track that down next.
I think I've got it. You had added an hmm
subpackage but didn't add this to setup.py
.
It might be easier to always do python setup.py install
to make sure errors like this don't crop up again, but now that we have travis working, you can also just see if the PRs actually compile and pass the tests.
Ah, sorry. This might also affect other packages because I have not adapted setup.py when refactoring packages. Is it actually necessary to add each package in setup.py that should be installed, or can we simply tell it to install everything under pyemma?
I think for local development it is much more convenient to not do python setup.py develop instead of python setup.py install, but at least now I know where this sort of error comes from.
OK, this just means we need to wait for travis to test in order to check if there are errors.
I'm running into a few nosetests errors, likely due to test files that are not being installed in the right paths:
======================================================================
ERROR: test suite for <class 'bhmm.tests.test_bhmm.TestBHMM'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 209, in run
self.setUp()
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
self.setupContext(ancestor)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
try_run(context, names)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/test_bhmm.py", line 29, in setUpClass
obs = np.loadtxt(testfile, dtype=int)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/numpy/lib/npyio.py", line 738, in loadtxt
fh = iter(open(fname, 'U'))
IOError: [Errno 2] No such file or directory: '/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/data/2well_traj_100K.dat'
======================================================================
ERROR: test suite for <class 'bhmm.tests.test_mlhmm.TestMLHMM'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 209, in run
self.setUp()
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
self.setupContext(ancestor)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
try_run(context, names)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/test_mlhmm.py", line 30, in setUpClass
obs = np.loadtxt(testfile, dtype=int)
File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/numpy/lib/npyio.py", line 738, in loadtxt
fh = iter(open(fname, 'U'))
IOError: [Errno 2] No such file or directory: '/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/data/2well_traj_100K.dat'
----------------------------------------------------------------------
Ran 69 tests in 83.423s
FAILED (errors=2)
TESTS FAILED: bhmm-dev-0.0.0-np19py27_0
I believe bhmm/tests/data
needs to be added in some way to this line of setup.py
:
package_data={'bhmm': find_package_data('examples', 'bhmm')}, # NOTE: examples installs to bhmm.egg/examples/, NOT bhmm.egg/bhmm/examples/. You need to do utils.get_data_filename("../e\
xamples/*/setup/").
I think so. These are test data files.
Am 05/05/15 um 23:23 schrieb John Chodera:
OK, this just means we need to wait for travis to test in order to check if there are errors.
I'm running into a few nosetests errors, likely due to test files that are not being installed in the right paths:
ERROR: test suite for <class 'bhmm.tests.test_bhmm.TestBHMM'>
Traceback (most recent call last): File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 209, in run self.setUp() File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp self.setupContext(ancestor) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext try_run(context, names) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/test_bhmm.py", line 29, in setUpClass obs = np.loadtxt(testfile, dtype=int) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/numpy/lib/npyio.py", line 738, in loadtxt fh = iter(open(fname, 'U')) IOError: [Errno 2] No such file or directory: '/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/data/2well_traj_100K.dat'
ERROR: test suite for <class 'bhmm.tests.test_mlhmm.TestMLHMM'>
Traceback (most recent call last): File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 209, in run self.setUp() File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp self.setupContext(ancestor) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext try_run(context, names) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/nose/util.py", line 471, in try_run return func() File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/test_mlhmm.py", line 30, in setUpClass obs = np.loadtxt(testfile, dtype=int) File "/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/numpy/lib/npyio.py", line 738, in loadtxt fh = iter(open(fname, 'U')) IOError: [Errno 2] No such file or directory: '/Users/choderaj/anaconda/envs/_test/lib/python2.7/site-packages/bhmm-0.2.0-py2.7-macosx-10.5-x86_64.egg/bhmm/tests/data/2well_traj_100K.dat'
Ran 69 tests in 83.423s
FAILED (errors=2) TESTS FAILED: bhmm-dev-0.0.0-np19py27_0 |
— Reply to this email directly or view it on GitHub https://github.com/bhmm/bhmm/pull/23#issuecomment-99227155.
Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin
Phone: (+49) (0)30 838 75354 Web: research.franknoe.de
Here's how we did this in openmmtools
:
https://github.com/choderalab/openmmtools/blob/master/setup.py#L173
I don't think the examples are supposed to be installed using package_data
, but trying to figure this out now.
Whoops, plane is landing. Will be online again later tonight!
I'll probably be sleeping. Safe landing and talk to you tomorrow.
Am 05/05/15 um 23:26 schrieb John Chodera:
Whoops, plane is landing. Will be online again later tonight!
— Reply to this email directly or view it on GitHub https://github.com/bhmm/bhmm/pull/23#issuecomment-99227658.
Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin
Phone: (+49) (0)30 838 75354 Web: research.franknoe.de
Woohoo!
Great. Thanks John!
Am 06/05/15 um 04:47 schrieb John Chodera:
Woohoo!
— Reply to this email directly or view it on GitHub https://github.com/bhmm/bhmm/pull/23#issuecomment-99299736.
Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin
Phone: (+49) (0)30 838 75354 Web: research.franknoe.de
Working on fixing the
bhmm-dev
conda recipe.