Generate a Python package project using the Python Cookiecutter package
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

tox.ini 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. 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. python setup.py build_sphinx -q {posargs}