-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
126 lines (105 loc) · 2.58 KB
/
pyproject.toml
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
[build-system]
requires = [
"setuptools == 75.6.0; python_version >= '3.9'",
"setuptools == 75.3.0; python_version == '3.8'",
"setuptools == 68.0.0; python_version == '3.7'",
"setuptools == 59.6.0; python_version == '3.6'",
"setuptools == 44.0.0; python_version == '2.7'",
]
build-backend = "setuptools.build_meta"
# =======================================
# tox
# =======================================
[tool.tox]
legacy_tox_ini = """
[tox]
skip_missing_interpreters = True
skipsdist = True
envlist =
{py27,py36,py37,py38,py39,py310,py311,py312,py313}
cov-report
[testenv]
deps =
-rtests/requirements.txt
-e .
setenv =
COVERAGE_FILE = .coverage.{envname}
SETUP_CEXT_REQUIRED = 1
passenv =
CFLAGS
CPPFLAGS
LDFLAGS
PKG_CONFIG_PATH
commands =
py.test -vv -s \
--cov=rjsmin \
--cov-report= \
--no-cov-on-fail \
--doctest-modules --color=yes \
tests
[testenv:cov-report]
deps = -rtests/coverage.txt
setenv =
COVERAGE_FILE = .coverage
commands =
coverage erase
coverage combine
coverage report
coverage html
- python -c 'import sys, os; os.mkdir(sys.argv[1])' "docs/gcov"
- gcovr --print-summary --html-details --output docs/gcov/index.html
"""
# =======================================
# Pytest
# =======================================
[tool.pytest.ini_options]
doctest_optionflags = "IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES ELLIPSIS"
filterwarnings = [
"error",
]
# =======================================
# Coverage
# =======================================
[tool.coverage.run]
branch = true
[tools.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]
# Special part-branch exclusion
partial_branches = [
# Re-enable standard pragma
"pragma: no branch",
]
# Source files to exclude
omit = []
ignore_errors = true
[tool.coverage.html]
directory = "docs/coverage"
# =======================================
# Black
# =======================================
[tool.black]
skip-string-normalization = true
# skip-magic-trailing-comma = true
line-length = 78
# target-version = ['py312']
include='''
(
tests/.*\.py
| tasks/.*\.py
)$
'''
extend-exclude='''
tasks/_shell.py
'''
# vim: nowrap