From 6a028e5794d5153900bac069bdb0c9edc263b5e0 Mon Sep 17 00:00:00 2001 From: Jesse Spangenberger Date: Mon, 4 Sep 2023 13:36:40 -0400 Subject: [PATCH] Minor updates to build env (#96) --- .devcontainer/pipx-install.sh | 8 +------- tox.ini | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.devcontainer/pipx-install.sh b/.devcontainer/pipx-install.sh index 66140406..2098fca0 100644 --- a/.devcontainer/pipx-install.sh +++ b/.devcontainer/pipx-install.sh @@ -1,10 +1,8 @@ #!/bin/sh -packages="poetry pre-commit tox isort sphinx ruff pyright" +packages="poetry pre-commit tox isort ruff pyright" types_inject="types-PyYAML types-Jinja2 types-pillow" -pytest_inject="pyfakefs pytest-cache pytest-cov pytest-dependency pytest-mock tqdm requests" -sphinx_inject="sphinx-rtd-theme sphinxcontrib-images sphinxcontrib-mermaid sphinxcontrib-napoleon" install() { for p in $1; do @@ -20,7 +18,3 @@ done install "${packages}" inject ruff "${types_inject}" -inject pytest "${pytest_inject}" -inject sphinx "${sphinx_inject}" - -pip install --user sphinx-rtd-theme docutils diff --git a/tox.ini b/tox.ini index 4c307851..912582e7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,28 @@ [tox] +min_version = 4.0 isolated_build = true +env_list = + py310 + docs + type [testenv] extras = - lint + tests commands = poetry install -v - poetry run pytest tests/ -whitelist_externals = poetry + poetry run pytest tests +allowlist_externals = poetry [testenv:lint] extras = lint commands = - black --safe src tests - isort src tests - flakeheaven lint src tests + ruff --fix src + black src + +[testenv:type] +extras = + exe +commands = + mypy src