Skip to content

Commit 2be2468

Browse files
committed
added code cov
1 parent ecd6332 commit 2be2468

File tree

6 files changed

+59
-9
lines changed

6 files changed

+59
-9
lines changed

.coveragerc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# .coveragerc to control coverage.py
2+
[run]
3+
branch = True
4+
5+
[report]
6+
# Regexes for lines to exclude from consideration
7+
exclude_lines =
8+
# Don't complain about missing debug-only code:
9+
def __repr__
10+
if self\.debug
11+
12+
# Don't complain if tests don't hit defensive assertion code:
13+
raise AssertionError
14+
raise NotImplementedError
15+
16+
# Don't complain if tests don't hit abstract class
17+
abc.
18+
19+
# Don't complain if non-runnable code isn't run:
20+
if 0:
21+
if __name__ == .__main__.:
22+
23+
ignore_errors = True
24+
omit =
25+
*__init__.py
26+
*tests/test*
27+
28+
[html]
29+
directory = coverage_html_report

.editorconfig

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,23 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[*.py]
11-
indent_style = space
10+
[*.{js,yml,css,html}]
11+
indent_size = 2
12+
13+
[*.{py,pyx,pxd}]
1214
indent_size = 4
15+
max_line_length = 100
1316

14-
[*.md]
15-
trim_trailing_whitespace = false
17+
[*.json]
18+
indent_size = 2
19+
insert_final_newline = ignore
1620

1721
[Makefile]
1822
indent_style = tab
23+
24+
[*.md]
25+
indent_size = 4
26+
trim_trailing_whitespace = false
27+
28+
[*.{c,cpp}]
29+
indent_size = 4

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ script:
1717
- make lint
1818
- make test
1919

20+
after_success:
21+
- codecov
22+
2023
deploy:
2124
provider: pypi
2225
user: stegben

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ installself:
77

88
.PHONY: install
99
install:
10-
pip install -U pip wheel setuptools cython
10+
pip install -U pip wheel setuptools cython==0.29.1
1111
pip install -r requirements_dev.txt
1212
make installself
1313

@@ -17,11 +17,10 @@ lint:
1717

1818
.PHONY: test
1919
test:
20-
python -m unittest
20+
py.test --cov=uttut/ --cov-fail-under=90
2121

2222
.PHONY: all
23-
all: test lint
24-
23+
all: lint test
2524

2625
.PHONY: clean
2726
clean:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
[![travis][travis-image]][travis-url]
44
[![pypi][pypi-image]][pypi-url]
5+
[![codecov][codecov-image]][codecov-url]
56

67
[travis-image]: https://img.shields.io/travis/Yoctol/uttut.svg?style=flat
78
[travis-url]: https://travis-ci.org/Yoctol/uttut
89
[pypi-image]: https://img.shields.io/pypi/v/uttut.svg?style=flat
910
[pypi-url]: https://pypi.python.org/pypi/uttut
11+
[codecov-image]: https://codecov.io/gh/Yoctol/uttut/branch/master/graph/badge.svg
12+
[codecov-url]: https://codecov.io/gh/Yoctol/uttut
1013

1114
UTTerance UTilities for dialogue system. This package provides some general utils when processing chatbot utterance data.

requirements_dev.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
flake8-config-yoctol==0.0.11
21
pypandoc
2+
3+
# dev
4+
flake8-config-yoctol==0.0.11
5+
ipdb
6+
pytest
7+
pytest-cov

0 commit comments

Comments
 (0)