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.

87 lines
1.8KB

  1. [tox]
  2. envlist = cov_init, py{37,38,39}, cov_report, docs, bandit, pylint
  3. [testenv]
  4. basepython =
  5. py37: {env:TOXPYTHON:python3.7}
  6. py38: {env:TOXPYTHON:python3.8}
  7. py39: {env:TOXPYTHON:python3.9}
  8. {bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3}
  9. setenv =
  10. COVERAGE_FILE=.coverage.{envname}
  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. -n 0 \
  25. {posargs}
  26. [testenv:cov_init]
  27. deps =
  28. coverage
  29. skip_install = True
  30. commands =
  31. coverage erase
  32. [testenv:cov_report]
  33. deps =
  34. coverage
  35. skip_install = True
  36. commands =
  37. coverage combine
  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. pylint-fail-under
  61. skip_install = True
  62. commands =
  63. pylint-fail-under --rcfile=.pylintrc --fail_under 9.5 {{ cookiecutter.project_slug }}
  64. [testenv:bandit]
  65. deps =
  66. bandit
  67. skip_install = True
  68. commands =
  69. bandit -r {{ cookiecutter.project_slug }}
  70. [testenv:docs]
  71. deps =
  72. -r {toxinidir}/requirements/dev.txt
  73. skip_install = True
  74. description =
  75. Invoke sphinx-build to build the HTML docs
  76. commands =
  77. sphinx-build -b linkcheck
  78. sphinx-build -b html -q {posargs}