-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtox.ini
More file actions
117 lines (108 loc) · 2.58 KB
/
Copy pathtox.ini
File metadata and controls
117 lines (108 loc) · 2.58 KB
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
[tox]
minversion = 3.16.1
envlist =
linters
docs
packaging
py
cs
py313
py312
py311
py310
py39
py38
isolated_build = true
requires =
setuptools >= 41.4.0
pip >= 19.3.0
skip_missing_interpreters = False
# toxworkdir = /data1/DATA/tox/ruamel.yaml
[testenv]
description = Unittest using {basepython}
install_command = pip install --disable-pip-version-check {opts} {packages}
commands =
sh -c 'pytest {posargs} _test/test_*.py'
deps =
pytest
setuptools
allowlist_externals =
make
sh
[testenv:cs]
basepython = python3.11
deps =
flake8
flake8-bugbear;python_version>="3.11"
flake8-2020==1.8.1
flake8-commas==2.1.0
flake8-comprehensions==3.14.0
flake8-length==0.3.1
flake8-logging-format==0.9.0
commands =
make singlehtml
changedir = {toxinidir}/_doc
[testenv:pep8]
basepython = python3.11
deps =
pre-commit>=2.8.2
flake8
flake8-bugbear;python_version>="3.11"
flake8-2020==1.8.1
flake8-commas==2.1.0
flake8-comprehensions==3.14.0
flake8-length==0.3.1
flake8-logging-format==0.9.0
commands =
pre-commit run -a
[testenv:docs]
description = Build docs
basepython = python3.8
deps =
--editable .[docs]
commands =
make singlehtml
changedir = {toxinidir}/_doc
[testenv:linters]
description = Linting
basepython = python3.8
deps =
pre-commit>=2.8.2
flake8
flake8-bugbear
commands =
pre-commit run -a
[testenv:packaging]
description =
Do packaging/distribution
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false
# don't install package itself in this env
skip_install = true
deps =
build >= 0.7.0
twine >= 3.7.0
setenv =
commands =
# build wheel and sdist using PEP-517
{envpython} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{toxinidir}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
{envpython} -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# Validate metadata using twine
twine check --strict {toxinidir}/dist/*
# Install the wheel
sh -c "python3 -m pip install --force-reinstall {toxinidir}/dist/*.whl"
[flake8]
show-source = True
max-line-length = 95
ignore = W503,F405,E203,C408,E124
exclude = _test/lib,branch_default,split,jabsy,cmd,bytes,jinja2,clib,pytypes,string,data,base,convert,.hg,.git,.tox,dist,.cache,__pycache__,ruamel.zip2tar.egg-info
[pytest]
filterwarnings =
error::DeprecationWarning
error::PendingDeprecationWarning