-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
122 lines (110 loc) · 2.59 KB
/
tox.ini
File metadata and controls
122 lines (110 loc) · 2.59 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[tox]
envlist = py{38,39,310,311,312}, lint, security, docs
isolated_build = True
skip_missing_interpreters = True
[testenv]
description = Run unit tests
deps =
pytest>=7.0.0
pytest-cov>=4.0.0
pytest-asyncio>=0.21.0
pytest-xdist>=3.0.0
commands =
pytest tests/unit -v --cov=accelerapp --cov-report=term-missing --cov-report=html
[testenv:integration]
description = Run integration tests
deps =
{[testenv]deps}
commands =
pytest tests/integration -v
[testenv:performance]
description = Run performance tests
deps =
{[testenv]deps}
commands =
pytest tests/performance -v
[testenv:security]
description = Run security tests
deps =
{[testenv]deps}
commands =
pytest tests/security -v
[testenv:all]
description = Run all tests
deps =
{[testenv]deps}
commands =
pytest tests/ -v --cov=accelerapp --cov-report=term-missing --cov-report=html --cov-report=xml
[testenv:lint]
description = Run code quality checks
skip_install = True
deps =
black>=23.0.0
flake8>=6.0.0
isort>=5.12.0
mypy>=1.0.0
commands =
black --check --line-length=100 src/
isort --check-only --profile black --line-length=100 src/
flake8 src/ --max-line-length=100 --extend-ignore=E203,E266,E501,W503
mypy src/ --ignore-missing-imports --check-untyped-defs
[testenv:format]
description = Format code
skip_install = True
deps =
black>=23.0.0
isort>=5.12.0
commands =
black --line-length=100 src/
isort --profile black --line-length=100 src/
[testenv:security-scan]
description = Run security scans
skip_install = True
deps =
bandit>=1.7.0
safety>=2.0.0
commands =
bandit -r src/ -ll -i
safety check
[testenv:docs]
description = Build documentation
deps =
sphinx>=5.0.0
sphinx-rtd-theme>=1.0.0
changedir = docs
commands =
# Placeholder for documentation build
python -c "print('Documentation build would happen here')"
[testenv:clean]
description = Clean up build artifacts
skip_install = True
deps =
allowlist_externals =
rm
find
commands =
rm -rf build/ dist/ .eggs/ *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type d -name .pytest_cache -exec rm -rf {} +
find . -type d -name .mypy_cache -exec rm -rf {} +
find . -type f -name '*.pyc' -delete
find . -type f -name '*.pyo' -delete
[flake8]
max-line-length = 100
extend-ignore = E203, E266, E501, W503
exclude =
.git,
__pycache__,
build,
dist,
.eggs,
*.egg-info,
.venv,
.tox,
examples,
deployment
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*