[tox] envlist = # tests without qt binding because they are hard to install via pip {win,lin,mac}-{py36,py37,py38}-{build} {win,lin,mac}-{py38}-{doc,release} {win,lin,mac}-{py38}-{test,lint,safety,metric,develop}-{pyqt,pyside} [testenv] changedir = doc: docs platform = # Test for Windows, Linux and Mac (if possible, otherwise skip) win: win32 lin: linux mac: osx skip_missing_interpreters = True deps = # Must be first pyqt: pyqt5 pyside: pyside2 # Dependencies for each environment build: -rreq-stable.txt test: -rreq-test.txt lint: -rreq-test.txt safety: -rreq-test.txt metric: -rreq-test.txt develop: -rreq-develop.txt doc: -rreq-doc.txt release: -rreq-release.txt # Essential dependencies to run the application must be in the setup.py whitelist_externals = doc: make doc: latexpdf doc: textlive-full commands = # ALL -------------------------------------------------------------------- # try generate build build: python setup.py sdist bdist_wheel # try install with pip build: python -m pip install . # try execute without bindings build: helpdev --all-for-sure # test with abstraction qtpy build: python -m pip install qtpy build: helpdev --qt # test with abstraction pyqtgraph build: python -m pip install pyqtgraph build: helpdev --qt # test with abstraction qt.py build: python -m pip install qt.py build: helpdev --qt # test with binding pyqt # It needs to solve many problems in gitlab side to make this work # build: python -m pip install pyqt5 # build: helpdev --qt # check all info build: helpdev --all-for-sure # check depedencies build: python -m pip check # TEST ------------------------------------------------------------------- # Those commands commented below correct style problems # DO NOT RUN ON SERVER, it is just to keep registry for local use # autopep8 --ignore=E501 --aggressive --aggressive --aggressive --experimental # docformatter -r -i --wrap-summaries=0 --wrap-descriptions=0 *.py # eradicate # Test and coverage test: pytest --cov "./tests" # test: pytest-cov # test: pytest-qt # Code and docstring style check, running alone for now - pylama-#156 # test: pylama -v --options="tox.ini" "{toxinidir}" # Code linting lint: pycodestyle --config="tox.ini" "." # test: pyflakes "./helpdev" # test: mypy --config-file="tox.ini" "helpdev" # Code and doc linting lint: pylint -r y --rcfile="pylint.ini" "./helpdev" --disable="R1260,R0912" # Doc linting lint: pydocstyle --config="tox.ini" "." lint: doc8 --config="tox.ini" "." # Safety safety: safety check safety: bandit --recursive --skip=B404,B603 "./helpdev" # Code metrics metric: radon cc -a "./helpdev" --exclude="*/ui/*" metric: radon mi "./helpdev" --exclude="*/ui/*" metric: radon raw -s "./helpdev" --exclude="*/ui/*" metric: radon hal -f "./helpdev" --exclude="*/ui/*" # DOC (inside docs folder) ---------------------------------------------- # Documentation - generate apidocs, build html, build latex, build pdf doc: make clean doc: sphinx-build -b html -j auto -E -d "." "." "{toxworkdir}/../build/docs/html" doc: sphinx-build -b latex -j auto -E -d "{toxworkdir}/../build/docs/doctrees" "." "{toxworkdir}/../build/docs/latex" doc: make --ignore-errors --keep-going --silent -C "{toxworkdir}/../build/docs/latex" all-pdf # RELEASE --------------------------------------------------------------- release: python setup.py sdist bdist_wheel release: twine check dist/* # try upload in test platform before the oficial release: twine upload --repository-url https://test.pypi.org/legacy/ dist/* release: python -m pip install --index-url https://test.pypi.org/simple/ helpdev # upload to oficial release: twine upload dist/* release: python -m pip uninstall helpdev release: python -m pip install helpdev usedevelop = develop: True # PYCODESTYLE ################################################################ [pycodestyle] ignore = E501,C0301 max-line-length = 100 statistics = True count = True exclude = .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage, */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*, */.*,*/.coverage,*/./venv/*,./venv,*/docs/*,docs,venv # PYDOCSTYLE ################################################################# [pydocstyle] ignore = D107,D202,D203,D213,D406,D407,D413 match-dir="[^\.].*,!(docs),!(venv)" # DOC8 ####################################################################### [doc8] extension = .rst ignore = D001 file-encoding = "utf-8" ignore-path = .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage, */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*, */.*,*/.coverage,*/./venv/*,./venv,*/examples/* # PYLAMA ##################################################################### [pylama] format = pylint linters = pyflakes skip = .tox,.env,.venv,build,dist,tests,examples,ui,*.egg-info*,*cache*,.coverage, */.tox/*,*/.env/*,*/.venv/*,*/build/*,*/dist/*,*/tests/*,*/ui/*,*/*.egg*, */.*,*/.coverage,*/./venv/*,./venv,venv