From cd052b20a71bec0d605151eeb6b7ac87fbeb3e4a Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 18 Sep 2023 03:26:38 -0400 Subject: [PATCH] Start setting up tox It is not completely working yet. --- .gitignore | 1 - requirements-dev.txt | 3 --- tox.ini | 24 ++++++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 0bd307639..139bf8ff3 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,3 @@ nbproject .pytest_cache/ monkeytype.sqlite3 output.txt -tox.ini diff --git a/requirements-dev.txt b/requirements-dev.txt index f6705341c..e3030c597 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,6 +7,3 @@ flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only pytest-icdiff # pytest-profiling - - -tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..0b5591139 --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +requires = tox>=4 +env_list = py{37,38,39,310,311,312}, lint, mypy, black + +[testenv] +description = Run unit tests +package = wheel +extras = test +commands = pytest --color=yes {posargs} + +[testenv:lint] +description = Lint via pre-commit +basepython = py39 +commands = pre-commit run --all-files + +[testenv:mypy] +description = Typecheck with mypy +basepython = py39 +commands = mypy -p git + +[testenv:black] +description = Check style with black +basepython = py39 +commands = black --check --diff git