-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
46 lines (38 loc) · 1.09 KB
/
tox.ini
File metadata and controls
46 lines (38 loc) · 1.09 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
[tox]
envlist = python3.9, python3.10, flake8, mypy
isolated_build = true
[gh-actions]
python =
3.9: python3.9, flake8, mypy
3.10: python3.10, flake8, mypy
; 3.11: python3.11
; 3.12: python3.12
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps = -r{toxinidir}/requirements_dev.txt
[testenv:flake8]
basepython = python3.9, python3.10
deps = flake8
[testenv:mypy]
basepython = python3.9, python3.10
deps = mypy
commands =
# stop the build if there are Python syntax errors or undefined names
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# type linting
mypy src/
# pytest unit
pytest -v tests/unit
# pytest config
pytest -v tests/config
[testenv:coverage]
basepython = python3.9, python3.10
deps =
pytest
pytest-cov
commands =
pytest --cov=src/trim_rag --cov-report=html -v tests
pytest --cov=src/trim_rag --cov-report=html -v tests/config