-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathtox.ini
More file actions
169 lines (153 loc) · 4.85 KB
/
Copy pathtox.ini
File metadata and controls
169 lines (153 loc) · 4.85 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2012-2025 rdiffweb contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[tox]
envlist = py3,minarca,doc,lint,format,trixie
[testenv]
passenv = RDIFFWEB_TEST_DATABASE_URI
deps=
coverage
pytest-cov
pytest-split
psycopg2-binary
trixie: apscheduler==3.11.0
trixie: argon2-cffi==21.1.0
trixie: cherrypy==18.10.0
trixie: configargparse==1.7
trixie: distro==1.9.0
trixie: humanfriendly==10.0
trixie: Jinja2==3.1.6
trixie: ldap3==2.9.1
trixie: MarkupSafe==2.1.5
trixie: psutil==7.0.0
trixie: setuptools==78.1.1
trixie: sqlalchemy==2.0.40
trixie: tzlocal== 5.3.1
trixie: WTForms==3.1.2
trixie: setuptools==78.1.1
extras = test
commands=
pytest -v --splits {env:PYTEST_SPLITS:1} --group {env:PYTEST_GROUP:1} --capture=sys --debug --override-ini junit_family=xunit1 --junit-xml=xunit-{envname}{env:PYTEST_GROUP:1}.xml --cov=rdiffweb --cov-report xml:coverage-{envname}{env:PYTEST_GROUP:1}.xml rdiffweb
[testenv:selenium]
allowlist_externals=
/usr/bin/xvfb-run
extras = test
commands =
xvfb-run pytest -v --splits {env:PYTEST_SPLITS:1} --group {env:PYTEST_GROUP:1} --debug --ignore=debian rdiffweb
[testenv:minarca]
deps =
pytest
coverage
pytest-cov
extras = test
commands_pre =
pip install -e minarca-server/
commands=
pytest -v --capture=sys --debug --override-ini junit_family=xunit1 --junit-xml=xunit-{envname}{env:PYTEST_GROUP:1}.xml --cov=minarca_server --cov-report xml:coverage-{envname}{env:PYTEST_GROUP:1}.xml minarca-server
[testenv:pyinstaller]
deps =
pyinstaller<7
debbuild==0.2.2
extras = postgresql
usedevelop = false
commands_pre =
pip install minarca-server/
commands =
pyinstaller minarca-server/packaging/minarca-server.spec --noconfirm
[testenv:doc]
deps =
sphinx
myst-parser
commands =
# Generate openapi.json
python3 -m rdiffweb.controller.api_openapi doc/openapi.json
sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
[testenv:format]
deps = .[dev]
allowlist_externals = sh
commands =
black rdiffweb minarca-server/minarca_server
isort rdiffweb minarca-server/minarca_server
sh -c 'djlint --reformat rdiffweb/templates/*.html rdiffweb/templates/**/*.html rdiffweb/components/*.jinja'
skip_install = true
[testenv:lint]
deps = .[dev]
allowlist_externals = sh
commands =
black --check --diff rdiffweb minarca-server/minarca_server
isort --check --diff rdiffweb minarca-server/minarca_server
sh -c 'djlint --check rdiffweb/templates/*.html rdiffweb/templates/**/*.html rdiffweb/components/*.jinja'
flake8 rdiffweb minarca-server/minarca_server
skip_install = true
[testenv:babel_extract]
deps =
babel
Jinja2
jinjax
commands = pybabel extract -F babel.cfg --output-file rdiffweb/locales/messages.pot rdiffweb
skip_install = true
[testenv:babel_init]
deps = babel
commands = pybabel init --domain messages --input-file rdiffweb/locales/messages.pot --output-dir rdiffweb/locales {posargs}
skip_install = true
[testenv:babel_update]
deps = babel
commands = pybabel update --domain messages --input-file rdiffweb/locales/messages.pot --output-dir rdiffweb/locales {posargs}
skip_install = true
[testenv:babel_compile]
deps = babel
commands = pybabel compile --domain messages --directory rdiffweb/locales
skip_install = true
# Update CHANGELOG.md and debian/changelog
[testenv:changelog]
deps =
git-changelog==2.9.4
commands =
git-changelog {posargs}
git-changelog --template "debian" --output "debian/changelog" {posargs}
skip_install = true
# Bump version and git tag
[testenv:bump]
deps =
git-changelog==2.9.4
allowlist_externals =
bash
git
commands =
git-changelog --bump {posargs:auto}
git-changelog --bump {posargs:auto} --template "debian" --output "debian/changelog"
# Create git tag
git add CHANGELOG.md debian/changelog
bash -c 'git commit -m "Release version $(git-changelog --bump {posargs:auto} --bumped-version)"'
bash -c 'git tag $(git-changelog --bump {posargs:auto} --bumped-version)'
skip_install = true
[flake8]
ignore =
# whitespace before ':'
E203
# line too long (86 > 79 characters)
E501
# line break before binary operator
W503
# ambiguous variable name 'I'
E741
copyright-check = True
copyright-min-file-size = 2
filename =
*.py
max-complexity = 20
[isort]
profile = black
line_length = 120