-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
153 lines (139 loc) · 4.01 KB
/
pyproject.toml
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
# ### CURLYLINT configuration
#
# ``curlylint`` is run through ``pre-commit`` and may be run manually using
# ``make util/lint/curlylint``.
#
# It does require *opt-in* to the actual rules.
[tool.curlylint.rules]
aria_role = true
html_has_lang = true
# Require all ``<img>`` tags to have the ``alt`` attribute (even empty).
image_alt = true
# use 2 spaces for indentation.
# NOTE: This must be synchronized with ``.editorconfig``.
# TODO: Seems broken atm, see https://github.com/thibaudcolas/curlylint/issues/6
#indent = 2
# allow users to zoom
meta_viewport = true
# don't use the ``autofocus`` attribute on any element
no_autofocus = true
# Don't use positive values for ``tabindex`` attributes
tabindex_no_positive = true
# ### DJLINT configuration
#
# ``djlint`` is run through ``pre-commit`` and may be run manually using
# ``make util/lint/djlint``.
[tool.djlint]
# H017: Tags should be self-closing, which is not true for void tags in HTML5
ignore = "H017"
# https://www.djlint.com/docs/configuration/#per_file_ignores
[tool.djlint.per-file-ignores]
# ignore recommendation to add meta description / keywords. These are provided
# using ``theme/mischback/seo.html``.
"theme/mischback/base.html" = "H030,H031"
# ### ISORT configuration
#
# ``isort`` us run through ``pre-commit`` and may be run manually using
# ``make util/lint/isort``.
#
# Very basic configuration, as this project is not really focussed on providing
# Python source code.
[tool.isort]
profile = "black"
combine_as_imports = true
default_section = "THIRDPARTY"
known_sphinx = "sphinx"
sections = [
"FUTURE",
"STDLIB",
"SPHINX",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
import_heading_stdlib = "Python imports"
import_heading_sphinx = "Sphinx imports"
import_heading_thirdparty = "external imports"
import_heading_firstparty = "app imports"
import_heading_localfolder = "local imports"
# ### TOX configuration
#
# ``tox`` is run to manage different virtual environments for different tasks.
# It is **not** used for its main purpose of running tests with different
# environments.
#
# Please note that ``tox`` >= 4.1 will support ``pyproject.toml`` natively, so
# this configuration will have to be adjusted, probably heavily.
#
# FIXME: #49
# The ``pre-processing`` environment is no longer used for SCSS
# compilation but is still referencing the wrapper script.
# The environment may be re-used for other pre-processing task, e.g.
# the font subsetting, and is kept for reference.
[tool.tox]
legacy_tox_ini = """
[tox]
minversion = 3.26.0
[testenv:sphinx]
basepython = python3
deps =
-r {toxinidir}/requirements/sphinx.txt
envdir = {toxworkdir}/sphinx
setenv =
PYTHONDONTWRITEBYTECODE=1
passenv = CI
skip_install = true
commands =
{posargs:sphinx-build --version}
[testenv:pre-commit]
basepython = python3
deps =
-r {toxinidir}/requirements/pre-commit.txt
envdir = {toxworkdir}/pre-commit
setenv =
PYTHONDONTWRITEBYTECODE=1
passenv = SSH_AUTH_SOCK
skip_install = true
commands =
{posargs:pre-commit run}
[testenv:pip-tools]
basepython = python3
deps =
-r {toxinidir}/requirements/pip-tools.txt
envdir = {toxworkdir}/pip-tools
setenv =
PYTHONDONTWRITEBYTECODE=1
skip_install = true
commands =
pip-compile --resolver=backtracking {posargs}
[testenv:image-processing]
basepython = python3
deps =
-r {toxinidir}/requirements/image-processing.txt
envdir = {toxworkdir}/image-processing
setenv =
PYTHONDONTWRITEBYTECODE=1
skip_install = true
commands =
{posargs:{toxinidir}/util/process-image.py}
[testenv:pre-processing]
basepython = python3
deps =
-r {toxinidir}/requirements/pre-processing.txt
envdir = {toxworkdir}/pre-processing
setenv =
PYTHONDONTWRITEBYTECODE=1
skip_install = true
commands =
{posargs:{toxinidir}/util/compile-sass.py}
[testenv:post-processing]
basepython = python3
deps =
-r {toxinidir}/requirements/post-processing.txt
envdir = {toxworkdir}/post-processing
setenv =
PYTHONDONTWRITEBYTECODE=1
skip_install = true
commands =
{posargs:{toxinidir}/util/prettify-html.py}
"""