-
Notifications
You must be signed in to change notification settings - Fork 404
/
tox.ini
124 lines (107 loc) · 2.4 KB
/
tox.ini
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
[tox]
envlist = py{37,38,39,310,311,py39},black,flake8,doclint,commitlint,docstrings,mypy
minversion = 3.4.0
[testenv]
passenv = GH_*
pip_pre = False
deps =
requests{env:REQUESTS_VERSION:>=2.0}
pypy3: unittest2
extras = test
commands = pytest {posargs}
[testenv:flake8]
skip_install = true
deps =
flake8 >= 5.0.0
commands = flake8 {posargs} src/github3/ tests/unit/ tests/integration/
[testenv:build]
skip_install = true
basepython = python3.11
deps =
build
commands =
python -mbuild -s
[testenv:black]
pip_pre = true
skip_install = true
basepython = python3
deps =
black >= 22.6.0
commands = black src/github3/ tests/
[testenv:notebooks]
basepython = python3.10
deps =
ipython[notebook]
commands = python tests/nbtest.py
[testenv:py310-docstrings]
deps =
flake8 >= 5.0.0
commands = flake8 {posargs} src/github3/ tests/unit/ tests/integration/
[testenv:py310-mypy]
deps =
mypy
types-python-dateutil
types-requests
commands = mypy
[testenv:venv]
passenv = GH_*
deps =
.
ptpython
commands =
ptpython {posargs}
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:release]
usedevelop = false
skipdist = true
deps =
twine >= 3.4.2
{[testenv:build]deps}
commands =
{[testenv:build]commands}
twine check dist/*
twine upload {posargs:--skip-existing} dist/*
[testenv:doclint]
# We need pygments below for doc8
# rst-lint is really only valuable for non-Sphinx reStructuredText, see also:
# https://github.com/twolfson/restructuredtext-lint/blob/65ce9d6c7768ef9135c1d3ee4a1ae8c7bf89d92f/README.rst#sphinx
deps =
doc8 >= 0.10.1
proselint >= 0.13.0
pygments
restructuredtext_lint
commands =
doc8 docs/source/
rst-lint AUTHORS.rst CONTRIBUTING.rst README.rst
; {toxinidir}/docs/bin/lint
[testenv:py310-commitlint]
deps =
gitlint >= 0.8.1
commands =
gitlint
[testenv:docs]
deps =
-rdocs/source/requirements.txt
sphinx_rtd_theme
twine >= 3.4.2
build
.
commands =
sphinx-build -E -W -c docs/source/ -b html docs/source/ docs/build/html
python -mbuild -s
twine check --strict dist/*
[pytest]
addopts = -q -nauto
norecursedirs = *.egg .git .* _*
[doc8]
ignore-path-errors = docs/source/release-notes/1.0.0.rst;D001
[flake8]
extend-ignore = E203,W503
max-line-length = 80
exclude = src/github3/_version.py
[isort]
profile = black