-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtox.ini
106 lines (96 loc) · 2.78 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
# Copyright (C) 2023 IKUS Software. All rights reserved.
# IKUS Software inc. PROPRIETARY/CONFIDENTIAL.
# Use is subject to license terms.
[tox]
envlist = py3-{linux,mac,win}, flake8, black, isort, pyinstaller-{linux,mac,win}
[testenv]
deps =
pytest-cov
patch
platform =
linux: linux
mac: darwin
win: win32
extras = test
allowlist_externals=
/usr/bin/xvfb-run
commands =
python patches/apply.py
mac: pytest -v --debug --override-ini junit_family=xunit1 --junit-xml=xunit-mac.xml --cov=minarca_client --cov-report xml:coverage-mac.xml minarca_client
# In Windows, disable stdout & stderr capture (-s) during test
win: pytest -s -v --debug --override-ini junit_family=xunit1 --junit-xml=xunit-win.xml --cov=minarca_client --cov-report xml:coverage-win.xml minarca_client
# In Linux, run within virtual frame buffer to test GUI
linux: xvfb-run pytest -v --debug --override-ini junit_family=xunit1 --junit-xml=xunit-linux.xml --cov=minarca_client --cov-report xml:coverage-linux.xml minarca_client
# Temporary solution to avoid compilation error on MacOS with 22.3
download = true
setenv =
VIRTUALENV_PIP = 22.2.2
# Allow DYLD_LIBRARY_PATH to lookup librsync files on MacOS
# Allow KIVY_GL_BACKEND to be headless if required
passenv =
DYLD_LIBRARY_PATH
KIVY_GL_BACKEND
[coverage:run]
relative_files = True
[testenv:doc]
deps =
sphinx
myst-parser
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
skip_install = true
[testenv:pyinstaller-{linux,mac,win}]
deps =
# Stick to v5.x.x until Kivy fix compatibility issue. https://github.com/kivy/kivy/issues/8653
pyinstaller<6
dmgbuild ; sys_platform == 'darwin'
debbuild==0.1.0 ; sys_platform == 'linux'
exebuild==0.1.0 ; sys_platform == 'win32'
patch
passenv =
AZURE_*
DYLD_LIBRARY_PATH
platform =
linux: linux
mac: darwin
win: win32
allowlist_externals=
/usr/bin/xvfb-run
commands =
python patches/apply.py
win: pyinstaller packaging/minarca.spec --noconfirm
mac: pyinstaller packaging/minarca.spec --noconfirm
linux: xvfb-run pyinstaller packaging/minarca.spec --noconfirm
[testenv:black]
deps = black==24.3.0
commands = black --check --diff setup.py minarca_client
skip_install = true
[testenv:flake8]
deps =
flake8
commands = flake8 setup.py minarca_client
skip_install = true
[testenv:isort]
deps = isort>=5.0.1
commands = isort --check --diff setup.py minarca_client
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
# Ignore import ordering (handle by isort)
E402
filename =
*.py
setup.py
per-file-ignores =
minarca-client/minarca_client/ui/theme/__init__.py:E402
max-complexity = 20
[isort]
profile = black
line_length = 120