tox.ini 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [tox]
  2. envlist =
  3. py{36,37,38,39,310}
  4. clean
  5. cov
  6. docs
  7. fmt
  8. lint
  9. [testenv]
  10. extras =
  11. test
  12. commands =
  13. pytest {posargs}
  14. [testenv:build]
  15. basepython = python3.8
  16. deps =
  17. twine
  18. wheel
  19. commands =
  20. python setup.py sdist bdist_wheel
  21. twine check dist/*.whl dist/*.tar.gz
  22. python setup.py clean --all
  23. [testenv:clean]
  24. skip_install = true
  25. deps =
  26. cleanpy>=0.3.1
  27. commands =
  28. cleanpy --all --exclude-envs .
  29. [testenv:cov]
  30. extras =
  31. test
  32. deps =
  33. coverage[toml]>=5
  34. commands =
  35. coverage run -m pytest {posargs:-vv}
  36. coverage report -m
  37. [testenv:docs]
  38. basepython = python3.8
  39. deps =
  40. -r{toxinidir}/requirements/docs_requirements.txt
  41. commands =
  42. python setup.py build_sphinx --source-dir=docs/ --build-dir=docs/_build --all-files
  43. [testenv:fmt]
  44. skip_install = true
  45. deps =
  46. autoflake>=1.4
  47. black[jupyter]>=22.6
  48. isort>=5
  49. commands =
  50. autoflake --in-place --recursive --remove-all-unused-imports --ignore-init-module-imports .
  51. isort .
  52. black setup.py docs/ datetimerange/ examples/ test/
  53. [testenv:lint]
  54. skip_install = true
  55. deps =
  56. codespell
  57. mypy>=0.971
  58. pylama>=8.4.1
  59. types-python-dateutil
  60. commands =
  61. python setup.py check
  62. mypy datetimerange/ setup.py
  63. -codespell -q2 --check-filenames docs/pages datetimerange/ examples/ test/ README.rst
  64. pylama
  65. [testenv:readme]
  66. skip_install = true
  67. changedir = docs
  68. deps =
  69. path
  70. readmemaker>=1.1.0
  71. commands =
  72. python make_readme.py