-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
119 lines (109 loc) · 2.74 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
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
[tox]
envlist =
lint,
lint-html,
test,
check-migrations,
[testenv:lockfile]
install_command = pip install --find-links https://girder.github.io/large_image_wheels {opts} {packages}
allowlist_externals = bash
commands = bash generate-requirements.sh
[testenv:lint]
skipsdist = true
skip_install = true
deps =
ruff==0.5.0
semgrep
allowlist_externals =
uv
npx
install_command = uv pip install {opts} {packages}
commands =
ruff check {posargs:.}
ruff format --check {posargs:.}
npx prettier --check **.jinja
semgrep scan --quiet --config rules.yml --error {posargs:.}
[testenv:lint-html]
skipsdist = true
skip_install = true
deps =
djhtml
commands =
djhtml --check {posargs:isic}
[testenv:type]
passenv =
DJANGO_CELERY_BROKER_URL
DJANGO_DATABASE_URL
DJANGO_ELASTICSEARCH_URL
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_SECRET_KEY
DJANGO_REDIS_URL
extras =
dev
test
type
skipsdist = true
allowlist_externals = uv
install_command = uv pip install {opts} {packages}
commands =
mypy {posargs:.}
[testenv:format]
skipsdist = true
skip_install = true
deps =
ruff==0.5.0
allowlist_externals = uv
install_command = uv pip install {opts} {packages}
commands =
ruff check --fix-only {posargs:.}
ruff format {posargs:.}
[testenv:format-html]
skipsdist = true
skip_install = true
deps =
djhtml
allowlist_externals = npx
commands =
djhtml {posargs:isic}
npx prettier --write **.jinja
[testenv:test]
passenv =
DJANGO_CELERY_BROKER_URL
DJANGO_DATABASE_URL
DJANGO_ELASTICSEARCH_URL
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_SECRET_KEY
DJANGO_REDIS_URL
extras =
dev
test
allowlist_externals = uv
install_command = uv pip install --find-links https://girder.github.io/large_image_wheels {opts} {packages}
commands =
pytest {posargs} --cov-report=html --cov-branch --cov=isic
[testenv:check-migrations]
setenv =
DJANGO_SETTINGS_MODULE=isic.settings.testing
passenv =
DJANGO_CELERY_BROKER_URL
DJANGO_DATABASE_URL
DJANGO_ELASTICSEARCH_URL
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_SECRET_KEY
DJANGO_REDIS_URL
extras =
dev
allowlist_externals = uv
install_command = uv pip install --find-links https://girder.github.io/large_image_wheels {opts} {packages}
commands =
{envpython} ./manage.py makemigrations --check --dry-run
[pytest]
DJANGO_SETTINGS_MODULE = isic.settings.testing
addopts = --strict-markers --showlocals
filterwarnings =
ignore::DeprecationWarning:pkg_resources
ignore:.*Factory._after_postgeneration:DeprecationWarning
ignore:set FASTDEV_STRICT_IF:DeprecationWarning