Set up tox

This commit is contained in:
Andrew Brookins 2021-11-01 09:45:37 -07:00
parent f44b7fa664
commit 807a29b011
4 changed files with 22 additions and 6 deletions

19
poetry.lock generated
View file

@ -972,6 +972,17 @@ virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,
docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"]
testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)", "pathlib2 (>=2.3.3)"]
[[package]]
name = "tox-pyenv"
version = "1.1.0"
description = "tox plugin that makes tox use `pyenv which` to find python executables"
category = "dev"
optional = false
python-versions = "*"
[package.dependencies]
tox = ">=2.0"
[[package]]
name = "tqdm"
version = "4.62.3"
@ -1112,8 +1123,8 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
[metadata]
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "6ee2fea3f5714de8992d03450cbe4a6ce7ac41825252877777a6d61b777d4934"
python-versions = "^3.9"
content-hash = "fb8766fad12a5598ff95e95e96feae984d7cc64e3ce31eb8d3ad9dfd8b39d621"
[metadata.files]
aioredis = [
@ -1680,6 +1691,10 @@ tox = [
{file = "tox-3.24.4-py2.py3-none-any.whl", hash = "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10"},
{file = "tox-3.24.4.tar.gz", hash = "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca"},
]
tox-pyenv = [
{file = "tox-pyenv-1.1.0.tar.gz", hash = "sha256:916c2213577aec0b3b5452c5bfb32fd077f3a3196f50a81ad57d7ef3fc2599e4"},
{file = "tox_pyenv-1.1.0-py2.py3-none-any.whl", hash = "sha256:e470c18af115fe52eeff95e7e3cdd0793613eca19709966fc2724b79d55246cb"},
]
tqdm = [
{file = "tqdm-4.62.3-py2.py3-none-any.whl", hash = "sha256:8dd278a422499cd6b727e6ae4061c40b48fce8b76d1ccbf5d34fca9b7f925b0c"},
{file = "tqdm-4.62.3.tar.gz", hash = "sha256:d359de7217506c9851b7869f3708d8ee53ed70a1b8edbba4dbcb47442592920d"},

View file

@ -14,7 +14,7 @@ classifiers = [
]
[tool.poetry.dependencies]
python = "^3.9"
python = "^3.8"
redis = "^3.5.3"
aioredis = "^2.0.0"
pydantic = "^1.8.2"
@ -41,6 +41,7 @@ pytest-xdist = "^2.4.0"
twine = "^3.4.2"
email-validator = "^1.1.3"
tox = "^3.24.4"
tox-pyenv = "^1.1.0"
[tool.poetry.scripts]
migrate = "redis_om.model.cli.migrate:migrate"

View file

@ -333,7 +333,7 @@ class FindQuery:
self._pagination: list[str] = []
self._model_cache: list[RedisModel] = []
def dict(self) -> dict[str, Any]:
def dict(self) -> Dict[str, Any]:
return dict(
model=self.model,
offset=self.offset,

View file

@ -1,9 +1,9 @@
[tox]
skipsdist = true
envlist = py37, py38, py39, py310
envlist = py38, py39, py310
[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest
poetry run pytest