-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathtox.ini
More file actions
136 lines (122 loc) · 3.63 KB
/
Copy pathtox.ini
File metadata and controls
136 lines (122 loc) · 3.63 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
# Copyright (C) 2025 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-ng
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 =
# Allow DYLD_LIBRARY_PATH to lookup librsync files on MacOS.
# Allow KIVY_GL_BACKEND to be headless if required.
# Allow LIBRSYNC_DIR for librsync Windows build.
passenv =
DYLD_LIBRARY_PATH
KIVY_GL_BACKEND
LIBRSYNC_DIR
[coverage:run]
relative_files = True
[testenv:doc]
deps =
sphinx
sphinx-argparse-cli
sphinx-design
myst-parser
pydata-sphinx-theme
# For Swagger API docs
minarca-server @ git+https://gitlab.com/ikus-soft/minarca-server@6.1.0
commands =
# Generate openapi.json
python3 doc/openapi.py
sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
[testenv:pyinstaller-{linux,mac,win}]
deps =
pyinstaller<7
dmgbuild ; sys_platform == 'darwin'
debbuild==0.2.1 ; sys_platform == 'linux'
exebuild==0.1.0 ; sys_platform == 'win32'
patch-ng
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 minarca_client doc
skip_install = true
[testenv:flake8]
deps =
flake8==7.2.0
flake8-copyright
commands = flake8 minarca_client doc
skip_install = true
[testenv:isort]
deps = isort>=5.0.1
commands = isort --check --diff minarca_client doc
skip_install = true
[testenv:babel_extract]
deps =
babel
Jinja2
commands = pybabel extract -F babel.cfg --output-file minarca_client/locales/messages.pot minarca_client
[testenv:babel_init]
deps = babel
commands = pybabel init --domain messages --input-file minarca_client/locales/messages.pot --output-dir minarca_client/locales {posargs}
skip_install = true
[testenv:babel_update]
deps = babel
commands = pybabel update --domain messages --input-file minarca_client/locales/messages.pot --output-dir minarca_client/locales {posargs}
skip_install = true
[testenv:babel_compile]
deps = babel
commands = pybabel compile --domain messages --directory minarca_client/locales
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
copyright-check = True
copyright-min-file-size = 2
filename =
*.py
per-file-ignores =
minarca-client/minarca_client/ui/theme/__init__.py:E402
max-complexity = 20
[isort]
profile = black
line_length = 120