-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
135 lines (126 loc) · 2.81 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[tox]
envlist =
lint,
test,
check-migrations,
type,
[testenv]
basepython=python3.11
setenv =
PIP_FIND_LINKS = https://girder.github.io/large_image_wheels
DJANGO_CONFIGURATION = TestingConfiguration
[testenv:lint]
skipsdist = true
skip_install = true
deps =
flake8<5.0.0
flake8-black
flake8-bugbear
flake8-docstrings
flake8-isort
flake8-quotes
pep8-naming
commands =
flake8 {posargs:.}
[testenv:type]
skipsdist = true
skip_install = true
deps =
mypy
django-stubs
djangorestframework-stubs
types-setuptools
types-filelock
commands =
mypy django_large_image {posargs}
; mypy project {posargs}
[testenv:format]
skipsdist = true
skip_install = true
deps =
black
isort
commands =
isort {posargs:.}
black {posargs:.}
[testenv:test]
changedir = project
passenv =
DJANGO_CELERY_BROKER_URL
DJANGO_DATABASE_URL
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_SECRET_KEY
extras =
colormaps
deps =
factory-boy
pytest
pytest-cov
pytest-django
pytest-factoryboy
pytest-mock
-e .[colormaps]
-e ./project[dev]
commands =
pytest --cov=django_large_image {posargs}
coverage html -d {toxworkdir}/htmlcov/django-large-image
coverage xml -o coverage.xml
[testenv:check-migrations]
passenv =
DJANGO_CELERY_BROKER_URL
DJANGO_DATABASE_URL
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_SECRET_KEY
deps =
-e .
-e ./project[dev]
commands =
{envpython} ./manage.py makemigrations --check --dry-run
[testenv:graph-models]
deps =
-e .
-e ./project[dev,graph]
passenv =
DJANGO_CONFIGURATION
DJANGO_DATABASE_URL
DJANGO_CELERY_BROKER_URL
DJANGO_MINIO_STORAGE_ENDPOINT
DJANGO_MINIO_STORAGE_ACCESS_KEY
DJANGO_MINIO_STORAGE_SECRET_KEY
DJANGO_STORAGE_BUCKET_NAME
DJANGO_MINIO_STORAGE_MEDIA_URL
whitelist_externals = mkdir
allowlist_externals = mkdir
commands =
mkdir -p {toxworkdir}/graphs/
{envpython} ./manage.py graph_models django_large_image -o {toxworkdir}/graphs/django_large_image.png
{envpython} ./manage.py graph_models django_large_image core -g -o {toxworkdir}/graphs/example.png
[flake8]
max-line-length = 2048
show-source = True
exclude =
env37
env38
.git
.tox
__pycache__
*/*egg*/*
.venv
*/node_modules
ignore =
# closing bracket does not match indentation of opening bracket’s line
E123
# whitespace before ':'
E203,
# line break before binary operator
W503,
# Missing docstring in *
D10,
[pytest]
DJANGO_SETTINGS_MODULE = example.settings
addopts = --strict-markers --showlocals --verbose --durations=0
filterwarnings =
ignore::DeprecationWarning:minio
ignore::DeprecationWarning:configurations