Python Projects Continuous Integration

Discussion in 'Python' started by Harry George, Jul 28, 2006.

  1. Harry George

    Harry George Guest

    "Dave Potts" <> writes:

    > Hi,
    >
    > I'm just starting a development project in Python having spent time in
    > the Java world. I was wondering what tool advice you could give me
    > about setting up a continuous integration environment for the python
    > code: get the latest source, run all the tests, package up, produce the
    > docs, tag the code repository. I'm used to things like Maven and
    > CruiseControl in the Java world.
    >
    > Cheers,
    >
    > Dave.
    >


    First, sorry to hear you have had to use Java. You should recover
    after a few months in Python. Second, welcome to Python. Third, some
    of us emacs as our IDE.

    I presume you often have several packages open at once, each with its
    own regression tests, own documentation, and own CVS or SVN "module".
    You may also have multiple coding languages going at once (e.g.,
    Python, C, C++, FORTRAN, Lisp, PROLOG). Doing this in emacs:

    1. Make a separate instance for each package being edited. In the
    instance make separate frames for a) code buffers, b) test case
    buffers, c) doc buffers. In the test frame, make a shell window
    where you can run go_test, thus running your testsuite for that
    package. In the doc frame, make a shell window where you can run
    go_doc. (Must of couse have written those go_ scripts, also done
    in emacs of course.).

    If there are too many things happening for one desktop, run each
    package in a separate desktop (you are working in an OS which has
    virtual screens, right?).

    2. Do CVS checkin/checkout in tool of your choice. Emacs can do it. I
    prefer tkcvs, with editor set to emacs and diff set to emacs's'
    ediff. Personal preference.

    3. Do documentation in the tool of your choice. Emacs can support
    pretty much any natural language, and has markups for just about
    any markup mechanism (SGML, XHTML, etc.). I use my own Pdx, edited
    in emacs, and thus autogenerate HTML, PDF, LaTeX, etc. Again,
    personal preference. At a minimum, use some mechanism which allow
    autogeneration of documentation, auto inclusion of code snippets,
    and hyperlinking. Since the go_doc is run in an emacs shell, use
    alt-P-return to rerun the line. Redocumenting is thus a 2
    keystroke effort.

    4. Do testing using a batch go_test script, running a suite built from
    unittest. As needed, write debug statements to another buffer in
    that frame, where you can use full emacs functionallity to search
    it. Since the go_test is run in an emacs shell, use alt-P-return
    to rerun the line. Retesting is thus a 2 keystroke effort.

    5. Oh, yes, coding. Emacs's python-mode.el works fine. Colorize or
    not as you see fit. There are ways to set up code-completion, but
    personally I never do it. You can setup etags but I never do --
    emacs search and grep-find do what I need. Personal preference.

    6. Use exactly the same setup for language after language, decade
    after decade, platform after platform. Use your brain cells form
    something useful, like learning new technologies and new
    algorithms.


    --
    Harry George
    PLM Engineering Architecture
     
    Harry George, Jul 28, 2006
    #1
    1. Advertising

  2. Harry George

    Dave Potts Guest

    Hi,

    I'm just starting a development project in Python having spent time in
    the Java world. I was wondering what tool advice you could give me
    about setting up a continuous integration environment for the python
    code: get the latest source, run all the tests, package up, produce the
    docs, tag the code repository. I'm used to things like Maven and
    CruiseControl in the Java world.

    Cheers,

    Dave.
     
    Dave Potts, Jul 28, 2006
    #2
    1. Advertising

  3. Harry George

    Guest

    Harry George wrote:
    > "Dave Potts" <> writes:
    >
    > > Hi,
    > >
    > > I'm just starting a development project in Python having spent time in
    > > the Java world. I was wondering what tool advice you could give me
    > > about setting up a continuous integration environment for the python
    > > code: get the latest source, run all the tests, package up, produce the
    > > docs, tag the code repository. I'm used to things like Maven and
    > > CruiseControl in the Java world.
    > >
    > > Cheers,
    > >
    > > Dave.
    > >

    >
    > First, sorry to hear you have had to use Java. You should recover
    > after a few months in Python. Second, welcome to Python.


    If you are serious about welcoming someone to Python, don't start by
    making snide comments about their primary computer language. There are
    trade-offs between Python and language X, for almost all X's.
     
    , Jul 28, 2006
    #3
  4. Harry George

    baalbek Guest

    Dave Potts wrote:
    > Hi,
    >
    > I'm just starting a development project in Python having spent time in
    > the Java world. I was wondering what tool advice you could give me
    > about setting up a continuous integration environment for the python
    > code: get the latest source, run all the tests, package up, produce the
    > docs, tag the code repository. I'm used to things like Maven and
    > CruiseControl in the Java world.


    Coming from the world of Java, you probably are familiar with Eclipse?
    Might even have it installed already?

    Eclipse comes with a very cool Python perspective, called Pydev.
    Installation instructions can be found at: http://pydev.sourceforge.net/

    Code completion, syntax coloring, etc etc, in my opinion Eclipse/Pydev
    is one of the most convenient/advanced environments in which to work
    with Python.

    baalbek
     
    baalbek, Aug 6, 2006
    #4
  5. Dave Potts wrote:
    > Hi,
    >
    > I'm just starting a development project in Python having spent time in
    > the Java world. I was wondering what tool advice you could give me
    > about setting up a continuous integration environment for the python
    > code: get the latest source, run all the tests, package up, produce the
    > docs, tag the code repository. I'm used to things like Maven and
    > CruiseControl in the Java world.
    >
    > Cheers,
    >
    > Dave.


    Buildbot might be what you are looking for:
    http://buildbot.sourceforge.net/

    Hope this helps,
    Ziga
     
    Ziga Seilnacht, Aug 7, 2006
    #5
  6. Harry George

    Ant Guest

    Harry George wrote:
    > [snip stuff about how to set emacs up as your IDE]


    Not sure which post you read, but the OP of this thread was asking
    about continuous integration, not integrated development environments.
    i.e. tools to *automatically* check out code when the repository has
    changed, build it if necessary (perhaps if there are C modules in the
    case of python) and run the unit tests.

    To the OP: you could of course simply continue to use cruise - it's
    only a tool after all, and won't require any additional learning if you
    are already having to learn a new language with all the associated
    libraries and idioms.
     
    Ant, Aug 7, 2006
    #6
  7. Harry George

    Fuzzyman Guest

    Dave Potts wrote:
    > Hi,
    >
    > I'm just starting a development project in Python having spent time in
    > the Java world. I was wondering what tool advice you could give me
    > about setting up a continuous integration environment for the python
    > code: get the latest source, run all the tests, package up, produce the
    > docs, tag the code repository. I'm used to things like Maven and
    > CruiseControl in the Java world.
    >


    Hello Dave,

    At Resolver Systems we use Cruise Control .NET along with IronPython
    and Subversion to provide Source Code Control and continuous
    integration. The combination is *great*.

    I've never had to configure it (I just poke it occassionally), but it
    *looks* like it should be usable with non .NET projects: we have it
    running all sorts of batch files and Python scripts as part of the
    built and test process.

    All the best,

    Fuzzyman
    http://www.voidspace.org.uk/python/index.shtml

    > Cheers,
    >
    > Dave.
     
    Fuzzyman, Aug 7, 2006
    #7
  8. Ziga Seilnacht wrote:
    > Dave Potts wrote:
    > > Hi,
    > >
    > > I'm just starting a development project in Python having spent time in
    > > the Java world. I was wondering what tool advice you could give me
    > > about setting up a continuous integration environment for the python
    > > code: get the latest source, run all the tests, package up, produce the
    > > docs, tag the code repository. I'm used to things like Maven and
    > > CruiseControl in the Java world.
    > >
    > > Cheers,
    > >
    > > Dave.

    >
    > Buildbot might be what you are looking for:
    > http://buildbot.sourceforge.net/
    >
    > Hope this helps,
    > Ziga


    +1 for buildbot. It is amazingly flexible and powerful, once you get
    past staring at the configuration file and trying to make sense of it.
    Here's a blog post I wrote that can help you get started:
    <http://agiletesting.blogspot.com/2006/02/continuous-integration-with-buildbot.html>.

    Hope this helps,

    Grig
     
    Grig Gheorghiu, Aug 7, 2006
    #8
  9. Harry George

    Miki Guest

    Hello Dave,

    > I'm just starting a development project in Python having spent time in
    > the Java world. I was wondering what tool advice you could give me
    > about setting up a continuous integration environment for the python
    > code: get the latest source, run all the tests, package up, produce the
    > docs, tag the code repository. I'm used to things like Maven and
    > CruiseControl in the Java world.

    If you are familiar with CruiseControl and Maven then it shouldn't be
    too complicated to write a Maven file that run the tests, package up,
    produce the docs. CruiseControl can take care of all the rest.

    I also found that writing a simple Continuous integration system myself
    was a very simple task in Python, it might be a good choice as well. (I
    resorted to this solution after giving up on trying to install Java on
    OpenBSD.)

    HTH,
    Miki
    http://pythonwise.blogspot.com/
     
    Miki, Aug 8, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noah Roberts

    free continuous integration service?

    Noah Roberts, Sep 28, 2006, in forum: C++
    Replies:
    1
    Views:
    358
    Jim Langston
    Sep 29, 2006
  2. Noah Roberts

    free continuous integration service?

    Noah Roberts, Sep 28, 2006, in forum: C++
    Replies:
    1
    Views:
    350
    Rolf Magnus
    Sep 28, 2006
  3. Hussein B
    Replies:
    6
    Views:
    541
    Leonid Shalupov
    Jul 31, 2008
  4. Replies:
    2
    Views:
    275
  5. S. Robert James

    Continuous Integration for Ruby projects

    S. Robert James, Nov 19, 2006, in forum: Ruby
    Replies:
    3
    Views:
    103
    S. Robert James
    Nov 22, 2006
Loading...

Share This Page