Skip to main content

Python interface to coveralls.io API

Project description

https://api.travis-ci.org/z4r/python-coveralls.png?branch=master https://coveralls.io/repos/z4r/python-coveralls/badge.png?branch=master

This package provides a module to interface with the https://coveralls.io/ API.

INSTALLING THE PKG

Using pip:

$ pip install python-coveralls

or simply adding it to your requirements

CONFIGURATION

If you’re not using Travis, Coveralls for Python uses a .coveralls.yml file at the root level of your repository to configure options. The only required option is repo_token (found on your repository’s page on Coveralls) to specify which project on Coveralls your project maps to. Another important option is is service_name which allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but using travis-ci or travis-pro will allow Coveralls to fetch branch data, comment on pull requests, and more. A .coveralls.yml file configured for Travis Pro:

repo_token: abcdef1234569abdcef
service_name: travis-pro

TRAVIS.YML

You’ve to product a .coverage file and you can use coverage, py-cov or nose. The you can add in the _after_success_ step:

coveralls

It should like something like:

language: python
python:
  - "2.6"
  - "2.7"
install:
  - pip install -e . --use-mirrors
before_script:
  - pip install -r test_requirements.txt --use-mirrors
  - git clone https://github.com/z4r/python-coveralls-example.git
  - cd python-coveralls-example
  - git checkout -qf 17b8119796516195527dcb4f454a2ebd41d60244
  - py.test example/tests.py --cov=example
  - cd -
script:
  - py.test coveralls/tests.py --doctest-modules --pep8 coveralls -v --cov coveralls --cov-report term-missing
after_success:
  - coveralls

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-coveralls-1.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page