Skip to content

Commit

Permalink
added code coverage and badges
Browse files Browse the repository at this point in the history
Also moved README -> README.rst so github parses correctly; .coverage
directory added to .gitignore - created when running coverage cmd.
  • Loading branch information
Chris Ward committed Apr 23, 2015
1 parent 2b237e8 commit 91c6b06
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -24,3 +24,6 @@ pip-log.txt

# Rope
.ropeproject/

# coveralls code coverage
.coverage
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -2,8 +2,10 @@ language: python
python:
- "2.7"
before_install:
- "pip install -U pip setuptools virtualenv"
- "pip install -U pip setuptools virtualenv coveralls"
install:
- "python source/setup.py install"
script:
- "py.test source/tests"
- "coverage run --source=status_report -m py.test source/tests"
after_success:
- coveralls
24 changes: 22 additions & 2 deletions README → README.rst
Expand Up @@ -3,6 +3,24 @@
status-report
======================

.. image:: https://badge.fury.io/py/status-report.svg
:target: http://badge.fury.io/py/status-report

.. image:: https://travis-ci.org/psss/status-report.svg?branch=master
:target: https://travis-ci.org/psss/status-report

.. image:: https://coveralls.io/repos/psss/status-report/badge.svg
:target: https://coveralls.io/r/psss/status-report

.. image:: https://pypip.in/download/status_report/badge.svg
:target: https://pypi.python.org/pypi/status_report/

.. image:: https://pypip.in/license/status_report/badge.svg
:target: https://pypi.python.org/pypi/status_report/
:alt: License



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Generate status report stats for selected date range
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -90,8 +108,10 @@ TESTS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To run tests using pytest::

pip install pytest (sudo required if not in a virtualenv)
py.test source/tests
# sudo required if not in a virtualenv
pip install pytest coveralls
coverage run --source=status_report -m py.test source/tests
coverage report


LINKS
Expand Down
2 changes: 1 addition & 1 deletion source/setup.py
Expand Up @@ -39,7 +39,7 @@
__deplinks__ = []

# README is in the parent directory
readme_pth = os.path.join(parent_pth, 'README')
readme_pth = os.path.join(parent_pth, 'README.rst')
with open(readme_pth) as _file:
readme = _file.read()

Expand Down

0 comments on commit 91c6b06

Please sign in to comment.