Continuous Integration with rpy2

Issue #168 resolved
Former user created an issue

Hi,

It would be great having the test suite automatically run for each commit and PR in a clean environment both with Python 2.7 and Python 3.3. I'm not familiar with CI servers that integrate with Bitbucket, but drone.io seems to do the job.

Is there any interest in creating a setup for rpy2? If yes, I can help with that.

Regards,

Pablo

Comments (8)

  1. Laurent Gautier

    I can't speak for other, but I would be very interested in having a continuous integration server for rpy2. I thought about it few times but never found the time to look at what are the options. Do not hesitate to let me know (here or by email) if you need any help.

  2. Pablo Oliveira

    Ok, I have a working CI server at https://drone.io/bitbucket.org/pablooliveira/rpy2/21. Right now it tests my fork or rpy2.

    It tests both Python 2.7 and Python 3.3. Python 2.7 passes all tests, but Python 3.3 still fails a test.

    Laurent, if you want to replicate the configuration to setup an official CI server for rpy2, the steps are simple. Create an account at drone.io (free for open source projects), setup a build for rpy2, and clone the following configuration https://drone.io/bitbucket.org/pablooliveira/rpy2/admin

    The script is a bit long because it has to setup the virtualenv so it can test different versions of Python. Also to make the tests run in a reasonable time, we use pip wheel packages (binary installations) because compiling numpy from source is very long. In this test script I'm using the astropy wheel mirrors.

    But, it may be better to commit the script inside rpy2/ci/test.sh, and configure drone.io to juste call ci/test.sh. (This is how pandas project is doing it) The advantage is that if a contributor wants to improve the script, she can submit a PR against the ci/test.sh instead of bothering you to change the config in drone.io.

    What do you think, should we go with the ci/test.sh approach ? In that case I can submit a PR with the script. Do you have any additional critics or suggested improvements?

    Thanks

    Pablo

  3. Laurent Gautier

    Awesome !

    I am fine with adding a script to facilitate continuous integration. If it is specific to drone, wouldn't make it sense to call the script test_drone.io.sh ?

    A comment/question about the settings (I am not familiar at all with drone.io, so this might well be a silly question): why apt-get install python-numpy to pip install numpy later ?

  4. Pablo Oliveira

    I am fine with adding a script to facilitate continuous integration. If it is specific to drone, wouldn't make it sense to call the script test_drone.io.sh ?

    Excellent, PR 20 adds the script scripts/test_drone.io.sh.

    why apt-get install python-numpy [...] ?

    You are completely right, python-numpy is unnecessary. I removed it in PR 20.

    Now the infamous ImportError: Start directory is not importable: 'ipython' remains to be fixed...

    This seems to be failing on the PR because a missing dependency to ggplot2. I added ggplot2 install in PR 20.

    Could you please try it out ?

    Thanks !

    Pablo

  5. Log in to comment