forked from mar10/pyftpsync
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
144 lines (127 loc) · 4.37 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[tox]
basepython = python3.10
envlist =
check,
py310 # EOL 2026-10-04
py39 # EOL 2025-10-05
py38 # EOL 2024-10-14
py37 # EOL 2023-06-27
# py36 # EOL 2021-12-21
# py35, # EOL 2020-09-13
coverage,
skip_missing_interpreters = true
[testenv]
# Pass environment vars (delimit with spaces)
# 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 xml
coverage report --fail-under=50.0
[testenv:flake8]
description = Check Black formatting compliance and add flake8-bugbear checks
skip_install = true
deps =
# Required by flake8-bandit
bandit
# Flake8
# Configuration is defined in the [flake8] section of setup.cfg.
# Run `flake8 --help` to see the available options of *installed* plugins.
flake8
# --- Helper to generate HTML reports:
# flake8-html
# --- Useful flake8 plugins:
flake8-annotations-complexity # TAE002 too complex annotation (X > Y)
# flake8-bandit # Security checks, e.g. S101
flake8-breakpoint # Check forgotten breakpoints and debugger calls
flake8-bugbear # (B...) Check for error-prone constructs
flake8-builtins # Check for python builtins being used as variables or parameters (A...)
flake8-coding # C101 Coding magic comment not found, ...
# flake8-commas # C812 missing trailing comma -> Handled by Black
flake8-comprehensions
# flake8-docstrings
# flake8-eradicate # E800 Found commented out code
flake8-expression-complexity # ECE001 Expression is too complex (X > Y)
# flake8-if-expr # KEK100 don`t use "[on_true] if [expression] else [on_false]" syntax
# flake8-import-order # (we run `isort --check`)
# flake8-isort # (we run `isort --check`)
# flake8-logging-format # G001 Logging statement uses string.format()
flake8-pep3101 # Use "".format instead of %
# flake8-print # T001 print found
# flake8-pytest-style # PT009 use a regular assert instead of unittest-style 'assertTrue'
flake8-quotes # See also [flake8] config
# flake8-return # R503 you should add explicit return at end of the function if function have return value except None
# flake8-rst-docstrings # Docstrings should work with Sphinx (RSTnnn)
# flake8-string-format # Check for valid string.
# flake8-todo # T000 Todo note found
# mccabe # Check conplexity (see also max_complexity setting)
pep8-naming
# Flake8 plugin 'wemake'
# (e.g. WPSnnn style errors)
# wemake-python-styleguide
changedir = {toxinidir}
commands =
; flake8 --help
flake8 ftpsync tests setup.py --doctests --statistics
# flake8 ftpsync tests setup.py --doctests --statistics --count
[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 =
black
isort
{[testenv:flake8]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 =
commands =
# http://www.sphinx-doc.org/en/master/man/sphinx-build.html
python setup_bdist_msi.py bdist_msi