-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Expand file tree
/
Copy pathtox.ini
More file actions
87 lines (78 loc) · 2.15 KB
/
Copy pathtox.ini
File metadata and controls
87 lines (78 loc) · 2.15 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 2025 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[tox]
envlist = py310, py311, py312, format, lint-src, lint-tests
skip_missing_interpreters = True
[testenv]
setenv =
PYTHONWARNINGS = ignore
deps =
.[openai,dev,test]
commands =
pytest -ra -m "not live_api and not requires_pip and not integration"
[testenv:format]
skip_install = true
deps =
isort==5.13.2
pyink==24.3.0
commands =
isort langextract tests --check-only --diff
pyink langextract tests --check --diff --config pyproject.toml
[testenv:lint-src]
deps =
pylint>=3.0.0
commands =
pylint --rcfile=.pylintrc langextract
[testenv:lint-tests]
deps =
pylint>=3.0.0
commands =
pylint --rcfile=tests/.pylintrc tests
[testenv:live-api]
basepython = python3.11
passenv =
GEMINI_API_KEY
LANGEXTRACT_API_KEY
LANGEXTRACT_RUN_OPENAI_BATCH_LIVE_TESTS
OPENAI_API_KEY
GOOGLE_APPLICATION_CREDENTIALS
GOOGLE_CLOUD_PROJECT
VERTEX_LOCATION
VERTEX_PROJECT
deps = .[all,dev,test]
commands =
pytest tests/test_live_api.py -v -m live_api --maxfail=1
[testenv:ollama-integration]
basepython = python3.11
deps =
.[openai,dev,test]
requests>=2.25.0
commands =
pytest tests/test_ollama_integration.py -v --tb=short
[testenv:plugin-integration]
basepython = python3.11
setenv =
PIP_NO_INPUT = 1
PIP_DISABLE_PIP_VERSION_CHECK = 1
deps =
.[dev,test]
setuptools>=77.0
commands =
pytest tests/provider_plugin_test.py::PluginE2ETest tests/create_provider_plugin_test.py -v -m "requires_pip"
[testenv:plugin-smoke]
basepython = python3.11
deps =
.[dev,test]
commands =
pytest tests/provider_plugin_test.py::PluginSmokeTest -v