diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..450b639 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +omit = + */tests* diff --git a/.gitignore b/.gitignore index abac1ee..2d85f49 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ pip-log.txt # Unit test / coverage reports .coverage +.cache .tox nosetests.xml diff --git a/.travis.yml b/.travis.yml index 773ca27..fdf424c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -language: python +language: "python" python: - "2.6" - "2.7" @@ -7,4 +7,9 @@ python: install: - "pip install -r tests/requirements.txt" - "pip install -e ." -script: "py.test" +script: + - "py.test tests" +after_success: + - "coveralls" +notifications: + email: false diff --git a/README.rst b/README.rst index 400cf80..c5dab97 100644 --- a/README.rst +++ b/README.rst @@ -2,9 +2,6 @@ Tipi ==== -.. image:: https://travis-ci.org/honzajavorek/tipi.png - :target: https://travis-ci.org/honzajavorek/tipi - Tipi is for typographic replacements in HTML. Status: ACTIVE @@ -12,6 +9,15 @@ Status: ACTIVE Under active development and maintenance. +.. image:: https://travis-ci.org/honzajavorek/tipi.png?branch=master + :target: https://travis-ci.org/honzajavorek/tipi +.. image:: https://coveralls.io/repos/honzajavorek/tipi/badge.png?branch=master + :target: https://coveralls.io/r/honzajavorek/tipi?branch=master +.. image:: https://pypip.in/v/tipi/badge.png + :target: http://pypi.python.org/pypi/tipi/ +.. image:: https://pypip.in/d/tipi/badge.png + :target: http://pypi.python.org/pypi/tipi/ + Ideas behind this project ------------------------- @@ -35,10 +41,10 @@ Usage of tipi is very straightforward: .. code-block:: python >>> from tipi import tipi - >>> html = '

"Zavolej mi na číslo 765-876-888," řekla, a zmizela...

"' + >>> html = '

"Zavolej mi na číslo 765-876-888," řekla, a zmizela...

' >>> html = tipi(html, lang='cs') >>> html - u'

\u201eZavolej mi na \u010d\xed\xadslo 765\u2013876\u2013888,\u201c \u0159ekla, a\xa0zmizela\u2026

' + '

\u201eZavolej mi na \u010d\xed\xadslo 765\u2013876\u2013888,\u201c \u0159ekla, a\xa0zmizela\u2026

' >>> print html

„Zavolej mi na čí­slo 765–876–888,“ řekla, a zmizela…

diff --git a/setup.py b/setup.py index da99332..e5c5f03 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,7 @@ name=meta['title'], version=meta['version'], description='Typographic replacements in HTML', + long_description=open('README.rst').read(), author=meta['author'], author_email='mail@honzajavorek.cz', url='https://github.com/honzajavorek/tipi', diff --git a/tests/pytest.ini b/tests/pytest.ini new file mode 100644 index 0000000..35d5717 --- /dev/null +++ b/tests/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts = -v --pep8 --cov tipi --cov-report term-missing +pep8ignore = E265 diff --git a/tests/requirements.txt b/tests/requirements.txt index e079f8a..c818181 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1 +1,4 @@ pytest +pytest-pep8 +pytest-cov +coveralls