From fd736d947b5f43beb67ec20494263a921d54015b Mon Sep 17 00:00:00 2001 From: Muhammad Arslan Date: Mon, 31 Jul 2023 23:08:12 +0500 Subject: [PATCH] Added tox --- .gitignore | 1 + pyproject.toml | 1 + tox.ini | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 70908fc9..03886835 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ notebooks/.ipynb_checkpoints tests/__pycache__ __pycache__/ .idea +.coverage \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d2272c3d..23e9f348 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,3 +29,4 @@ dependencies = [ postgres = ["psycopg2", "db-dtypes"] bigqury = ["google-cloud-bigquery"] snowflake = ["snowflake-connector-python"] +test = ["tox"] diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..67eb6496 --- /dev/null +++ b/tox.ini @@ -0,0 +1,20 @@ +[tox] +envlist = + py310, + flake8, + +[py] +deps= + pytest-cov + pytest-remove-stale-bytecode + +[testenv:py310] +deps= + {[py]deps} +basepython = python3.10 +commands = pytest -v --cov=src/vanna --cov-report=term --cov-report=html + +[testenv:flake8] +exclude = .tox/* +deps = flake8 +commands = flake8 src