Cryptography primitives for Hypercore https://hypercore-crypto.readthedocs.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tox.ini 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [tox]
  2. envlist =
  3. {py36,py37}
  4. lint
  5. sort
  6. format
  7. type
  8. docs
  9. changelog
  10. metadata-release
  11. skip_missing_interpreters = True
  12. isolated_build = True
  13. [testenv]
  14. description = run the unit tests
  15. deps =
  16. pytest
  17. pytest-cov
  18. pytest-mock
  19. commands =
  20. pytest test/ --cov={toxinidir}/hypercore_crypto/ --no-cov-on-fail {posargs}
  21. [testenv:lint]
  22. description = lint the source
  23. skipdist = True
  24. deps = flake8
  25. commands = flake8 {posargs} hypercore_crypto/ test/
  26. [testenv:sort]
  27. description = sort the source
  28. skipdist = True
  29. deps = isort
  30. commands = isort {posargs:-rc -c} -sp setup.cfg hypercore_crypto/ test/
  31. [testenv:format]
  32. description = format the source
  33. skipdist = True
  34. basepython = python3.7
  35. deps = black
  36. commands = black {posargs:--check} hypercore_crypto/ test/
  37. [testenv:type]
  38. description = type check the source
  39. basepython = python3.7
  40. skipdist = True
  41. deps = mypy
  42. commands = mypy hypercore_crypto/ test/
  43. [testenv:docs]
  44. description = build the documentation
  45. skipdist = True
  46. extras = docs
  47. commands = python -m setup build_sphinx
  48. [testenv:docs-livereload]
  49. description = invoke sphinx-autobuild to build and reload the documentation
  50. commands = python -m sphinx_autobuild docs/source docs/build
  51. deps = sphinx-autobuild>=0.7.1,<1.0
  52. extras = docs
  53. [testenv:changelog]
  54. description = draw up the new changelog
  55. skipdist = True
  56. passenv = VERSION
  57. deps = towncrier
  58. commands = towncrier --version={env:VERSION} {posargs}
  59. [testenv:metadata-release]
  60. description = validate the package metadata
  61. deps = twine
  62. commands =
  63. rm -rf {toxworkdir}/dist
  64. python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
  65. python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
  66. twine check {toxworkdir}/dist/*
  67. whitelist_externals =
  68. rm
  69. [testenv:release]
  70. description = make a release
  71. deps = {[testenv:metadata-release]deps}
  72. commands =
  73. rm -rf {toxworkdir}/dist
  74. python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
  75. python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
  76. twine upload {toxworkdir}/dist/*
  77. whitelist_externals =
  78. rm