Continuous Integration

Tox can automate every step you are doing when you change something in your project: running tests on various Python interpreters, verifying coverage and PEP 8 conformance, building documentation, and so on.

But running all the checks on every change can be time and resource consuming, in particular, if you support several interpreters.

A Continuous Integration (CI) system solves this issue by taking care of this work every time something changes in your project.

Pushing your project in a shared repository under a Distributed Version Control System (DVCS) like Git or Mercurial, on a server will let you trigger a CI every time someone pushes a change on the server.

If you work on an open source software, and don't want to maintain your code server, GitHub (http://github.com), GitLab (http://gitlab.com), and Bitbucket (https://bitbucket.org/) are the most popular services. They will host your project for free if it's public, and offer social features, which will make it very easy for anyone to contribute to your project. They all provide integration points to run whatever needs to run when some changes are made in the project.

For example, on GitHub, if you see a typo in a reST document, you can change it directly from your browser, preview the result, and send a Pull Request (PR) to the project maintainer with a few clicks. The project will automatically get rebuilt, and a build status might even be displayed directly on your PR once it's done.

A lot of open source projects use these services to create a prosperous community of contributors. Mozilla uses GitHub for its Rust project (https://github.com/rust-lang), and there's no doubt that it helped lower the bar for attracting contributors.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset