Generate a Python package project using the Python Cookiecutter package
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

85 lines
1.8KB

  1. [tox]
  2. envlist = cov_init, py3, cov_report, docs, bandit, pylint
  3. [testenv]
  4. basepython =
  5. py3: {env:TOXPYTHON:python3}
  6. py37: {env:TOXPYTHON:python3.7}
  7. py38: {env:TOXPYTHON:python3.8}
  8. py39: {env:TOXPYTHON:python3.9}
  9. {bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3}
  10. setenv =
  11. PYTHONPATH={toxinidir}:{toxinidir}/{{ cookiecutter.project_slug }}
  12. PYTHONUNBUFFERED=yes
  13. HOME={env:HOME:/tmp}
  14. passenv = COVERAGE_FILE PYTHONPATH PYTHONUNBUFFERED HOME
  15. skip_missing_interpreters = True
  16. alwayscopy = True
  17. deps =
  18. -r {toxinidir}/requirements/test.txt
  19. commands =
  20. pytest --durations 25 \
  21. --basetemp={envtmpdir} \
  22. --confcutdir=.. \
  23. --cov \
  24. --cov-append \
  25. -n 0 \
  26. {posargs}
  27. [testenv:cov_init]
  28. deps =
  29. coverage
  30. skip_install = True
  31. commands =
  32. coverage erase
  33. [testenv:cov_report]
  34. deps =
  35. coverage
  36. skip_install = True
  37. commands =
  38. coverage html
  39. {toxinidir}/docs/source/coverage/extract_source.py
  40. [testenv:lint]
  41. deps =
  42. pre-commit
  43. twine
  44. ignore_errors = True
  45. commands =
  46. twine check {distdir}/*
  47. pre-commit run --all-files
  48. [testenv:pur]
  49. deps =
  50. pur
  51. skip_install = True
  52. description =
  53. Update all versioned packages in requirements.txt files
  54. commands =
  55. pur -r requirements-all.txt
  56. [testenv:pylint]
  57. deps =
  58. pylint==1.9.4; python_version >= "2.7" and python_version < "3.0"
  59. pylint; python_version >= "3.4"
  60. skip_install = True
  61. commands =
  62. pylint --rcfile=.pylintrc --fail-under 9.5 {{ cookiecutter.project_slug }}
  63. [testenv:bandit]
  64. deps =
  65. bandit
  66. skip_install = True
  67. commands =
  68. bandit -r {{ cookiecutter.project_slug }}
  69. [testenv:docs]
  70. deps =
  71. -r {toxinidir}/requirements/dev.txt
  72. skip_install = True
  73. description =
  74. Invoke sphinx-build to build the HTML docs
  75. commands =
  76. python setup.py build_sphinx -q {posargs}