-
Notifications
You must be signed in to change notification settings - Fork 10
/
dodo.py
127 lines (98 loc) · 2.36 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Doit task definitions."""
DOIT_CONFIG = {
'default_tasks': [
'check',
],
'continue': True,
'verbosity': 1,
'num_process': 8,
'par_type': 'thread',
}
def task_cleanup() -> dict:
"""Cleanup project."""
return {
'actions': ['make clean'],
}
def task_flake8() -> dict:
"""Run flake8 check."""
return {
'actions': ['flake8 setup.py wdom tests'],
}
def task_mypy() -> dict:
"""Run mypy check."""
return {
'actions': ['mypy -i wdom'],
}
def task_pydocstyle() -> dict:
"""Run docstyle check."""
return {
'actions': ['pydocstyle wdom'],
}
def task_docs() -> dict:
"""Build sphinx document."""
return {
'actions': ['sphinx-build -q -W -j 4 -b html docs docs/_build/html'],
}
def task_check() -> dict:
"""Run flake8/mypy/pydocstyle/docs tasks."""
return {
'actions': None,
'task_dep': ['flake8', 'mypy', 'pydocstyle', 'docs']
}
def task_test_fast() -> dict:
return {
'actions': [
'python -m unittest tests/test_*.py 2>&1',
],
}
def task_test_slow() -> dict:
return {
'actions': [
'python -m unittest tests/slow/test_*.py 2>&1',
],
}
def task_test_server() -> dict:
return {
'actions': [
'python -m unittest tests/server/test_*.py 2>&1',
],
}
def task_test_browser_local() -> dict:
return {
'actions': [
'python -m unittest tests/browser/local/test_*.py 2>&1',
],
}
def task_test_browser_remote() -> dict:
return {
'actions': [
'python -m unittest tests/browser/remote/test_*.py 2>&1',
],
}
def task_test_browser_server() -> dict:
return {
'actions': [
'python -m unittest tests/browser/server/test_*.py 2>&1',
],
}
def task_test_pyppeteer() -> dict:
return {
'actions': [
'python -m unittest tests/browser2/test_*.py 2>&1',
],
}
def task_test() -> dict:
return {
'actions': None,
'task_dep': [
'test_fast',
'test_slow',
'test_server',
'test_browser_local',
'test_browser_remote',
'test_browser_server',
'test_pyppeteer',
]
}