Debian Codegraph @

tox.ini

raw symbols SCIP
1 [tox]
2
3 envlist =
4 # tests without qt binding because they are hard to install via pip
5 {win,lin,mac}-{py36,py37,py38}-{build}
6 {win,lin,mac}-{py38}-{doc,release}
7 {win,lin,mac}-{py38}-{test,lint,safety,metric,develop}-{pyqt,pyside}
8
9 [testenv]
10
11 changedir =
12 doc: docs
13
14 platform =
15 # Test for Windows, Linux and Mac (if possible, otherwise skip)
16 win: win32
17 lin: linux
18 mac: osx
19
20 skip_missing_interpreters =
21 True
22
23 deps =
24 # Must be first
25 pyqt: pyqt5
26 pyside: pyside2
27
28 # Dependencies for each environment
29 build: -rreq-stable.txt
30 test: -rreq-test.txt
31 lint: -rreq-test.txt
32 safety: -rreq-test.txt
33 metric: -rreq-test.txt
34 develop: -rreq-develop.txt
35 doc: -rreq-doc.txt
36 release: -rreq-release.txt
37 # Essential dependencies to run the application must be in the setup.py
38
39 whitelist_externals =
40 doc: make
41 doc: latexpdf
42 doc: textlive-full
43
44 commands =
45 # ALL --------------------------------------------------------------------
46
47 # try generate build
48 build: python setup.py sdist bdist_wheel
49 # try install with pip
50 build: python -m pip install .
51 # try execute without bindings
52 build: helpdev --all-for-sure
53
54 # test with abstraction qtpy
55 build: python -m pip install qtpy
56 build: helpdev --qt
57 # test with abstraction pyqtgraph
58 build: python -m pip install pyqtgraph
59 build: helpdev --qt
60 # test with abstraction qt.py
61 build: python -m pip install qt.py
62 build: helpdev --qt
63
64 # test with binding pyqt
65 # It needs to solve many problems in gitlab side to make this work
66 # build: python -m pip install pyqt5
67 # build: helpdev --qt
68
69 # check all info
70 build: helpdev --all-for-sure
71
72 # check depedencies
73 build: python -m pip check
74
75 # TEST -------------------------------------------------------------------
76
77 # Those commands commented below correct style problems
78 # DO NOT RUN ON SERVER, it is just to keep registry for local use
79 # autopep8 --ignore=E501 --aggressive --aggressive --aggressive --experimental
80 # docformatter -r -i --wrap-summaries=0 --wrap-descriptions=0 *.py
81 # eradicate
82
83 # Test and coverage
84 test: pytest --cov "./tests"
85 # test: pytest-cov
86 # test: pytest-qt
87
88 # Code and docstring style check, running alone for now - pylama-#156
89 # test: pylama -v --options="tox.ini" "{toxinidir}"
90
91 # Code linting
92 lint: pycodestyle --config="tox.ini" "."
93 # test: pyflakes "./helpdev"
94 # test: mypy --config-file="tox.ini" "helpdev"
95
96 # Code and doc linting
97 lint: pylint -r y --rcfile="pylint.ini" "./helpdev" --disable="R1260,R0912"
98
99 # Doc linting
100 lint: pydocstyle --config="tox.ini" "."
101 lint: doc8 --config="tox.ini" "."
102
103 # Safety
104 safety: safety check
105 safety: bandit --recursive --skip=B404,B603 "./helpdev"
106
107 # Code metrics
108 metric: radon cc -a "./helpdev" --exclude="*/ui/*"
109 metric: radon mi "./helpdev" --exclude="*/ui/*"
110 metric: radon raw -s "./helpdev" --exclude="*/ui/*"
111 metric: radon hal -f "./helpdev" --exclude="*/ui/*"
112
113 # DOC (inside docs folder) ----------------------------------------------
114
115 # Documentation - generate apidocs, build html, build latex, build pdf
116 doc: make clean
117 doc: sphinx-build -b html -j auto -E -d "." "." "{toxworkdir}/../build/docs/html"
118 doc: sphinx-build -b latex -j auto -E -d "{toxworkdir}/../build/docs/doctrees" "." "{toxworkdir}/../build/docs/latex"
119 doc: make --ignore-errors --keep-going --silent -C "{toxworkdir}/../build/docs/latex" all-pdf
120
121 # RELEASE ---------------------------------------------------------------
122
123 release: python setup.py sdist bdist_wheel
124 release: twine check dist/*
125 # try upload in test platform before the oficial
126 release: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
127 release: python -m pip install --index-url https://test.pypi.org/simple/ helpdev
128 # upload to oficial
129 release: twine upload dist/*
130 release: python -m pip uninstall helpdev
131 release: python -m pip install helpdev
132
133 usedevelop =
134 develop: True
135
136 # PYCODESTYLE ################################################################
137
138 [pycodestyle]
139
140 ignore = E501,C0301
141 max-line-length = 100
142 statistics = True
143 count = True
144 exclude =
145 .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage,
146 */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*,
147 */.*,*/.coverage,*/./venv/*,./venv,*/docs/*,docs,venv
148
149 # PYDOCSTYLE #################################################################
150
151 [pydocstyle]
152
153 ignore = D107,D202,D203,D213,D406,D407,D413
154 match-dir="[^\.].*,!(docs),!(venv)"
155
156 # DOC8 #######################################################################
157
158 [doc8]
159
160 extension = .rst
161 ignore = D001
162 file-encoding = "utf-8"
163 ignore-path =
164 .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage,
165 */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*,
166 */.*,*/.coverage,*/./venv/*,./venv,*/examples/*
167
168 # PYLAMA #####################################################################
169
170 [pylama]
171
172 format = pylint
173 linters = pyflakes
174 skip =
175 .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage,
176 */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*,
177 */.*,*/.coverage,*/./venv/*,./venv,venv