Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
205 lines (184 loc) · 4.31 KB
/
Copy pathtox.ini
File metadata and controls
205 lines (184 loc) · 4.31 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[tox]
minversion = 3.8.0
envlist = py{38,39,310,311,312,313}, lint, docs, security, coverage
skip_missing_interpreters = true
isolated_build = true
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311, lint, docs, security, coverage
3.12: py312
3.13: py313
[testenv]
description = Run tests with pytest
deps =
pytest>=7.0.0
pytest-cov>=4.0.0
pytest-mock>=3.10.0
pytest-xdist>=3.0.0
matplotlib>=3.3.0
seaborn>=0.11.0
numpy>=1.19.0
pandas>=1.1.0
commands =
pytest tests/ -v --tb=short --durations=10
setenv =
PYTHONPATH = {toxinidir}
MPLBACKEND = Agg
PLOT2LLM_LOG_LEVEL = WARNING
passenv =
CI
CODECOV_TOKEN
[testenv:coverage]
description = Run tests with coverage reporting
deps =
{[testenv]deps}
coverage[toml]>=7.0.0
commands =
pytest tests/ -v --cov=plot2llm --cov-report=term --cov-report=html --cov-report=xml
coverage report --show-missing --fail-under=65
[testenv:lint]
description = Run linting and code quality checks
deps =
black>=22.0.0
flake8>=5.0.0
isort>=5.10.0
mypy>=1.0.0
ruff>=0.1.0
bandit>=1.7.0
commands =
black --check --diff plot2llm/ tests/
isort --check-only --diff plot2llm/ tests/
flake8 plot2llm/ tests/
mypy plot2llm/
ruff check plot2llm/ tests/
bandit -r plot2llm/ -f json
[testenv:format]
description = Auto-format code
deps =
black>=22.0.0
isort>=5.10.0
commands =
black plot2llm/ tests/
isort plot2llm/ tests/
[testenv:security]
description = Run security checks
deps =
bandit>=1.7.0
safety>=2.0.0
commands =
bandit -r plot2llm/ -f json -o bandit-report.json
safety check
[testenv:docs]
description = Build documentation
changedir = docs
deps =
sphinx>=5.0.0
sphinx-rtd-theme>=1.2.0
myst-parser>=0.18.0
numpy>=1.19.0
pandas>=1.1.0
matplotlib>=3.3.0
commands =
sphinx-build -W -b html . _build/html
[testenv:docs-serve]
description = Build and serve documentation locally
changedir = docs
deps = {[testenv:docs]deps}
commands =
sphinx-build -W -b html . _build/html
python -m http.server 8000 --directory _build/html
[testenv:build]
description = Build distribution packages
deps =
build>=0.8.0
twine>=4.0.0
commands =
python -m build
twine check dist/*
[testenv:publish-test]
description = Publish to TestPyPI
deps =
twine>=4.0.0
commands =
twine upload --repository testpypi dist/*
[testenv:publish]
description = Publish to PyPI
deps =
twine>=4.0.0
commands =
twine upload dist/*
[testenv:clean]
description = Clean build artifacts
deps =
commands =
python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in ['build', 'dist', 'plot2llm.egg-info', '.pytest_cache', 'htmlcov', '.coverage', '.mypy_cache'] if os.path.exists(d)]"
[testenv:pre-commit]
description = Run pre-commit on all files
deps = pre-commit>=2.20.0
commands = pre-commit run --all-files
[testenv:benchmark]
description = Run performance benchmarks
deps =
{[testenv]deps}
pytest-benchmark>=4.0.0
commands =
pytest tests/ -v -m "slow" --benchmark-only
[testenv:integration]
description = Run integration tests
deps = {[testenv]deps}
commands =
pytest tests/test_advanced_integration.py -v --tb=short
[testenv:unit]
description = Run unit tests only
deps = {[testenv]deps}
commands =
pytest tests/ -v -m "unit" --tb=short
[testenv:fast]
description = Run fast tests (unit tests, no coverage)
deps = {[testenv]deps}
commands =
pytest tests/ -v -m "unit" -x --tb=short --durations=5
[testenv:dev]
description = Development environment
deps =
{[testenv]deps}
ipython>=8.0.0
jupyter>=1.0.0
notebook>=6.4.0
black>=22.0.0
isort>=5.10.0
pre-commit>=2.20.0
commands =
python -c "import plot2llm; print('Development environment ready!')"
python -c "import plot2llm; print(f'Version: {plot2llm.__version__}')"
[flake8]
max-line-length = 88
extend-ignore = E203, W503, E501
exclude =
.git,
__pycache__,
build,
dist,
.tox,
.venv,
venv,
.eggs,
*.egg
[coverage:run]
source = plot2llm
omit =
*/tests/*
*/test_*
*/__pycache__/*
*/venv/*
*/env/*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.: