-
Notifications
You must be signed in to change notification settings - Fork 7
/
dodo.py
45 lines (31 loc) · 1 KB
/
dodo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import glob
from doitpy.pyflakes import Pyflakes
from doitpy import docs
from doitpy.package import Package
DOIT_CONFIG = {'default_tasks': ['pyflakes',]}
def task_pyflakes():
flakes = Pyflakes()
yield flakes.tasks('*.py')
yield flakes.tasks('tests/*.py')
CODE_FILES = glob.glob("pytest_incremental.py")
TEST_FILES = glob.glob("tests/test_*.py")
def task_coverage():
"""show coverage for all modules including tests"""
all_files = " ".join(CODE_FILES + TEST_FILES)
return {
'actions': [
'coverage run `which py.test` {}'.format(all_files),
"coverage report --show-missing {}".format(all_files),
],
'verbosity': 2,
}
def task_docs():
doc_files = glob.glob('docs/*.rst') + ['README.rst', ]
yield docs.spell(doc_files, 'docs/dictionary.txt')
def task_package():
"""create/upload package to pypi"""
pkg = Package()
yield pkg.revision_git()
yield pkg.manifest_git()
yield pkg.sdist()
yield pkg.sdist_upload()