dmwm/DAS — pull request #4134 by vidma (2014-01-25 01:38:57+00:00)
Title: continuous integration with Travis CI

changes in short:
- Continuous integration builds with Travis: could automatically run unit tests, pylint, pep8
- setup.py test to be more informative about test import errors
- improved pip support

---

this will allow automatically obtaining results of unit tests (run on public data) and code quality (e.g. pylint/das_code_quality, pep8/flake8, test coverage, etc). Now automatic builds happen on every commit, but could be set to happen only on pull requests or on specific branches only. The build status can be seen on bottom of pull request, or next to each commit hash.

this also will brings in simpler installation/configuration via pip for ~free (see ```init_env.sh``` and requirments.txt). we can later use to update/cleanup the installation instructions (in doc). the only YUI is not yet being downloaded (and not needed for unit tests).

added a build status icon to README.md (renamed).

also I make ```setup.py test``` to report more details in case it was unable to load some test module (earlier it was giving a senseless message).

currently:
- all the unit tests are passing (with dbs3 disabled)
- das_code_quality is currently turned off for automatic builds so far, as some DAS files get very low scores -- this can impact the build success and thus help to keep the code in "good state", e.g. see nice and colorful output here: https://travis-ci.org/dmwm/DAS/jobs/17579702
- only py2.6 is enabled, but travis easily support multiple python versions (both 2.6 and 2.7 work)

P.S. I've noticed that sometimes nltk fails to download wordnet (10MB+)...

To keep in mind for future clean up:
- DAS tests are failing without grid-proxy-init (some modules are even not loading/importing), but simple ```touch /tmp/x509up_u$UID``` fixes the issue
- some DAS modules do not pass pylint >= 9; flake8 is even another static analysis tool which includes pep8, it is to be used in addition of pylint
- nosetests or some other newer testing framework could provide test coverage, e.g. via simple integration with coveralls
- TODO: in README.md to change build status indicator branch back into default.