-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
tox.ini
128 lines (111 loc) · 2.79 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
125
126
127
128
[tox]
basepython = python3.12
envlist =
check
py312
py311
py310
py39
py38
coverage
skip_missing_interpreters = true
[testenv]
# Pass environment vars
# passenv =
# LC_ALL
# LANG
# PYFTPSYNC_TOX_TEST_FOLDER
# PYFTPSYNC_TOX_TEST_FTP_URL
deps =
pysftp
pytest
pytest-cov
pytest-html
setenv =
COVERAGE_FILE = .coverage.{envname}
commands =
# py.test -rav -x --cov ftpsync tests
# pytest -ra -v -x --cov=ftpsync --cov-report=xml --html=build/pytest/report-{envname}.html --self-contained-html {posargs}
pytest -ra -v -x --cov=ftpsync --durations=10 --html=build/pytest/report-{envname}.html --self-contained-html {posargs}
[testenv:coverage]
skip_install = true
deps =
coverage
setenv =
COVERAGE_FILE = .coverage
commands =
coverage erase
coverage combine
coverage html
coverage report --fail-under=50.0
[testenv:lint]
skip_install = true
deps =
ruff
commands =
ruff -V
ruff check ftpsync tests setup.py
[testenv:check]
description = Check Black formatting, isort compliance, and ruff
; skip_install = true
deps =
black[jupyter] ~=24.4
isort
{[testenv:lint]deps}
changedir = {toxinidir}
commands =
isort --check-only --profile black ftpsync tests setup.py
black --check --diff ftpsync tests setup.py
{[testenv:lint]commands}
[testenv:format]
description = Reformat python code using Black and isort
; skip_install = true
deps =
{[testenv:check]deps}
changedir = {toxinidir}
commands =
isort --profile black ftpsync tests setup.py {posargs}
black ftpsync tests setup.py
{[testenv:lint]commands}
# [testenv:check]
# description = Check Black formatting compliance and isort rules
# # skip_install = true
# deps =
# black
# isort
# {[testenv:flake8]deps}
# changedir = {toxinidir}
# commands =
# {[testenv:flake8]commands}
# isort --check-only --profile black ftpsync tests setup.py
# black --check ftpsync tests
# [testenv:format]
# description = Reformat Python code using Black and isort
# deps =
# {[testenv:check]deps}
# changedir = {toxinidir}
# commands =
# isort --profile black ftpsync tests setup.py
# black ftpsync tests
# {[testenv:flake8]commands}
[testenv:docs]
description = Build Sphinx documentation (output directory: docs/sphinx-build)
#basepython = python3.7
changedir = docs
deps =
sphinx
sphinx_rtd_theme
myst_parser[linkify]
sphinxcontrib.mermaid
commands =
# https://www.sphinx-doc.org/en/master/man/sphinx-build.html
sphinx-build -b html sphinx sphinx-build
[testenv:bdist_msi]
description = Build MSI installer in dist/ (Windows only)
# basepython = python3.7
changedir = .
deps =
cx_Freeze
commands =
# http://www.sphinx-doc.org/en/master/man/sphinx-build.html
python setup_bdist_msi.py bdist_msi