ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
120 stars 77 forks source link

Travis-ci testing broken #42

Closed cdeil closed 9 years ago

cdeil commented 9 years ago

Currently the Ginga travis-ci build is broken. I think what's needed is to merge in changes from package-template (use astropy-helpers for build, use conda for installation on travis-ci).

ejeschke commented 9 years ago

Hi Christoph,

Where are you seeing this? I'm seeing a different message from the travis-ci which ends like the excerpt below. It looks like my build_sphinx target in the setup.py doesn't work with this configuration.

I've started a test suite that should run instead of trying to simply start the reference viewer. That's not a particularly helpful test since the graphics environment on travis is kind of a fake one, and often crashed just starting the reference viewer, which I could not reproduce on any live system.

... Using /usr/lib/python2.7/dist-packages

Finished processing dependencies for ginga==2.0.20140702233050

The command "sudo python${P} setup.py install" exited with 0.

$ python${P} -c 'import ginga'

The command "python${P} -c 'import ginga'" exited with 0.

$ which ginga

/usr/local/bin/ginga

The command "which ginga" exited with 0.

$ sudo python${P} setup.py build

running build

running build_py

running build_scripts

The command "sudo python${P} setup.py build" exited with 0.

$ nosetests${P} build/lib*/ginga/tests

..........


Ran 10 tests in 14.770s

OK

The command "nosetests${P} build/lib*/ginga/tests" exited with 0.

$ python${P} setup.py build_sphinx

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

or: setup.py --help [cmd1 cmd2 ...]

or: setup.py --help-commands

or: setup.py cmd --help

error: invalid command 'build_sphinx'

The command "python${P} setup.py build_sphinx" exited with 1.

Done. Your build exited with 1.

cdeil commented 9 years ago

I'm not exactly sure what you mean ... here's some info that might help:

Your travis-ci build logs are here: https://travis-ci.org/ejeschke/ginga/builds (it's been broken for a while)

If you use the common Astropy setup others like me will be able to figure out an issue or contribute more easily. Above you mention nosetests ... can you change to use py.test like Astropy and all other affiliated packages? In the past there have been many issues with testing and sphinx build etc, so by updating to use astropy-helpers and conda in .travis.yml as is done in the package-template we make sure we don't re-debug all these old issues here.

I don't know anything about graphics environment on travis-ci, but your best bet of getting is to work is to check what other projects (e.g. wcsaxes) do or ask the travis-ci guys.

ejeschke commented 9 years ago

Yes, that's the same location I'm looking at. The most recent build is #161 and 3 of the 4 build results (161.1, 161.3 and 161.4) end in build_sphinx failing-- not any problem with 2to3. 161.2 build ends failing to install astropy.

ejeschke commented 9 years ago

I'll definitely take a look at the build tools for astropy. Ginga was developed from a time when astropy was very young and didn't have all the sort of infrastructure it has now. I'll have to see how much work is involved in moving over to using all that infrastructure. Maybe one thing at time, like switching from nose to py.test for a start.

At the moment I think all the builds would succeed if I could get it to simply remove the attempt to do a build_sphinx at the end, or fix the build_sphinx. I wonder if this is because it is using distribute instead of setuptools on travis?

ejeschke commented 9 years ago

@cdeil, thanks for filing this issue. Now that the codebase is migrated to 'six' for dual 2 and 3 support, I'd like to fix up the travis build. Wondering if you could advise since I think you contributed the initial travis config and I've sort of stumbled my way through fixing up the config a few times.

What I'd like to do is change it so that it uses python 2.7 and 3.4 (currently it is using 3.3) and test with astropy 0.4 (stable) and astropy ? (dev) --currently it is using older versions of astropy. We should also be able to change it to using py.test for the tests. I'm looking into the astropy-helpers for the future, but for now it should work just to pip install pytest for testing.

ejeschke commented 9 years ago

Ok, some progress. I've updated the travis config to use astropy 0.4.1 for stable and to test with python 2.7 and 3.4. As of build 167 the python3 versions are passing, but it is failing on the python2.7 versions. One is a fail to install Cpython with curl and the other is a failure to install astropy--with the latter I get the following traceback:

Traceback (most recent call last):

File "setup.py", line 112, in

**package_info

File "/usr/lib/python2.7/distutils/core.py", line 152, in setup

dist.run_commands()

File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

self.run_command(cmd)

File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 67, in run

File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 109, in do_egg_install

File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

self.distribution.run_command(command)

File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", line 152, in run

File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

self.distribution.run_command(command)

File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

cmd_obj.run()

File "build/bdist.linux-x86_64/egg/setuptools/command/egg_info.py", line 168, in run

File "build/bdist.linux-x86_64/egg/setuptools/command/egg_info.py", line 193, in find_sources

File "build/bdist.linux-x86_64/egg/setuptools/command/egg_info.py", line 277, in run

File "build/bdist.linux-x86_64/egg/setuptools/command/egg_info.py", line 309, in add_defaults

File "build/bdist.linux-x86_64/egg/setuptools/command/sdist.py", line 19, in walk_revctrl

File "build/bdist.linux-x86_64/egg/setuptools/command/sdist.py", line 67, in _default_revctrl

File "build/bdist.linux-x86_64/egg/setuptools/svn_utils.py", line 468, in svn_finder

File "build/bdist.linux-x86_64/egg/setuptools/svn_utils.py", line 264, in load

File "build/bdist.linux-x86_64/egg/setuptools/py31compat.py", line 30, in init

AttributeError: 'NoneType' object has no attribute 'mkdtemp'

cdeil commented 9 years ago

While working on #43 I noticed that these commands don't work for ginga at the moment ... they will if you switch to using the astropy-helpers and the setup.py from the package-template:

python setup.py test --coverage
python setup.py build_sphinx -w
python setup.py egg_info