-
Notifications
You must be signed in to change notification settings - Fork 14
/
tox.ini
63 lines (56 loc) · 1.48 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[tox]
min_version = 4.0
envlist = py311
[testenv]
install_command = python -I -m pip install --use-deprecated=legacy-resolver {opts} {packages}
allowlist_externals = poetry
[testenv:unit-tests]
description = run unit tests
commands =
poetry install
poetry build
poetry run pytest --disable-warnings {toxinidir}/tests/unit_tests
[testenv:integration-tests]
description = run integration tests
pass_env =
ASTRA_DB_TOKEN
ASTRA_DB_ID
ASTRA_DB_ENV
commands =
poetry install
poetry run pytest --disable-warnings {toxinidir}/tests/integration_tests
[testenv:notebooks]
pass_env =
ASTRA_DB_APPLICATION_TOKEN
ASTRA_DB_API_ENDPOINT
ASTRA_DB_ID
OPENAI_API_KEY
GCLOUD_ACCOUNT_KEY_JSON
LANGCHAIN_API_KEY
LANGCHAIN_TRACING_V2
LANGCHAIN_ENDPOINT
LANGCHAIN_PROJECT
LLAMA_CLOUD_API_KEY
NVIDIA_API_KEY
UNSTRUCTURED_API_KEY
UNSTRUCTURED_API_URL
commands =
poetry install --with notebooks
poetry run pytest --nbmake examples/notebooks
[testenv:lint]
description = lint
skip_install = true
commands =
poetry install --no-root --only lint
poetry run ruff format --diff
poetry run ruff check
poetry run yamllint -s -c .github/.yamllint .github/
[testenv:fix-lint]
description = fix lint
skip_install = true
commands =
poetry install --no-root --only lint
poetry run ruff format
poetry run ruff check --fix
poetry run yamllint -c .github/.yamllint .github/
poetry run scripts/format-example-notebooks.py