forked from fonttools/fontbakery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
308 lines (257 loc) · 7.95 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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
[build-system]
requires = ["setuptools >= 61.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "fontbakery"
dynamic = ["version"]
description = "A font quality assurance tool for everyone"
requires-python = ">=3.8"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Chris Simpkins", email = "[email protected]" },
{ name = "Dave Crossland", email = "[email protected]" },
{ name = "Felipe Sanches", email = "[email protected]" },
{ name = "Jens Kutilek" },
{ name = "Lasse Fister" },
{ name = "Marc Foley" },
{ name = "Miguel Sousa" },
{ name = "Nikolaus Waxweiler" },
{ name = "Rosalie Wagner" },
{ name = "Simon Cozens" },
{ name = "Vitaly Volkov" },
{ name = "Viviana Monsalve" },
{ name = "Yanone" },
]
maintainers = [
{ name = "Felipe Sanches", email = "[email protected]" },
]
dependencies = [
"fontTools >= 4.46.0",
"freetype-py < 2.4.0", # see: https://github.com/fonttools/fontbakery/issues/4143
"opentypespec",
"opentype-sanitizer >= 9.1.0, == 9.*",
"munkres",
"PyYAML",
"toml",
"cmarkgfm >= 0.4",
"rich",
"Jinja2 >= 3.0.0", # issue #4717
"packaging",
"pip-api",
"requests >= 2.19", # issue #4718
"beziers >= 0.6.0, == 0.6.*",
"uharfbuzz",
"vharfbuzz >= 0.2.0",
"typing_extensions ; python_version < '3.11'",
]
[project.optional-dependencies]
# Note: These dependencies are meant to be private (not used explicitly by users)
# and are used just to facilitate maintainance of versioning
# dependencies that are shared by multiple vendor-profiles.
# (this way, the maintainer only needs to edit a single entry)
beautifulsoup4 = [
"beautifulsoup4 >= 4.7.1",
# For parsing registered vendor IDs
# com.google.fonts/check/vendor_id produces an ERROR if Beautiful Soup 4
# version 4.0.1 to 4.6.1 or 4.7.0 is installed because of bugs in Beautiful Soup
# (see https://github.com/fonttools/fontbakery/issues/4270)
]
shaperglot = [
"shaperglot >= 0.3.0, < 0.6.0",
# versions prior to v0.3.0 had too stric dependency rules
# for other deps such as protobuf, making it harder satisfy all dependencies.
]
ufo2ft = [
"ufo2ft >= 2.25.2",
# 2.25.2 updated the script lists for Unicode 14.0
]
# These Google Fonts profile dependencies contain data that is critical to
# always be up-to-date, so we treat any update to these deps the same way we would
# deal with API-breaking updates. Only the latest released version is acceptable:
googlefontsalwayslatest = [
"axisregistry >= 0.4.10, == 0.4.*",
"gflanguages >= 0.6.2, == 0.6.*",
"gfsubsets >= 2024.5.9",
"glyphsets >= 1.0.0, == 1.*",
"shaperglot >= 0.5.0, == 0.5.*",
]
# Profile-specific dependencies:
adobefonts = [
# The Adobe Fonts profile currently depends only on the base-install of
# fontbakery dependencies. But we keep here a place-holder "extra" for
# consistency (all vendor-specific profiles have the same install instructions)
# And at some point in the future there may be actual dependencies listed
# here for this profile.
]
fontval = [
"lxml",
]
fontwerk = [
"fontbakery[googlefonts]",
]
googlefonts = [
"dehinter >= 3.1.0",
# 3.1.0 added dehinter.font.hint function
"fonttools[lxml,unicode]",
# (see https://github.com/googlefonts/gflanguages/pull/7)
"protobuf >= 3.7.0, < 4",
# 3.7.0 fixed a bug on parsing some METADATA.pb files.
# We cannot use v4 because our protobuf files have been compiled with v3.
# (see https://github.com/fonttools/fontbakery/issues/2200)
"unicodedata2",
"fontbakery[beautifulsoup4]",
"fontbakery[googlefontsalwayslatest]",
"fontbakery[shaping]",
"fontbakery[ufo]",
]
iso15008 = []
microsoft = []
notofonts = [
"fontbakery[googlefonts]",
]
# FIXME: This is not a vendor-specific profile!
shaping = [
"collidoscope >= 0.5.2",
# 0.5.2 added Python 3.11 wheels
# (see https://github.com/fonttools/fontbakery/issues/3970)
"stringbrewer",
"fontbakery[ufo2ft]",
"fontbakery[shaperglot]",
]
typenetwork = [
"unicodedata2",
"fontbakery[beautifulsoup4]",
"fontbakery[ufo2ft]",
"fontbakery[shaperglot]",
]
# FIXME: This is not a vendor-specific profile!
ufo = [
"defcon",
"fonttools[ufo]",
"ufolint",
"fontbakery[ufo2ft]",
]
# Dependencies for building our documentation:
docs = [
"myst-parser >= 2.0.0, == 2.*",
"sphinx >= 7.1.2, == 7.1.*",
"sphinx_rtd_theme >= 2.0.0, == 2.*",
"m2r >= 0.3.1, == 0.3.*",
]
# Some users may want a full install of all profiles:
all = [
"fontbakery[docs]",
"fontbakery[adobefonts]",
"fontbakery[fontval]",
"fontbakery[fontwerk]",
"fontbakery[googlefonts]",
"fontbakery[iso15008]",
"fontbakery[notofonts]",
"fontbakery[shaping]",
"fontbakery[typenetwork]",
"fontbakery[ufo]",
]
# Requirements for running code-tests:
tests = [
"black == 23.12.1",
"pylint == 3.0.3",
"pytest-cov == 4.1.0",
"pytest-xdist == 3.5.0",
"requests-mock == 1.10.0",
"fontbakery[all]",
]
[project.scripts]
fontbakery = "fontbakery.cli:main"
[tool.setuptools.packages.find]
where = ["Lib"]
[tool.setuptools_scm]
write_to = "Lib/fontbakery/_version.py"
# ============================================================================
[tool.black]
line-length = 88
target-version = ["py310"]
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project. Separate regexes with | .
(
.*_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the project
)
'''
# ============================================================================
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
addopts = "--color=yes --verbose"
filterwarnings = [
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
]
# ============================================================================
[tool.pylint.master]
ignore-patterns = ".*_pb2.py"
jobs = 0 # Specifying 0 will auto-detect the number of processors available to use
logging-format-style = "new"
msg-template = "{msg_id} ({symbol}) {path} @ {line} — {msg}"
output-format = "colorized"
score = "n"
[tool.pylint.'MESSAGES CONTROL']
disable = [
# Error
"no-member",
"no-name-in-module",
"used-before-assignment",
# Warning
"broad-exception-caught",
"broad-exception-raised",
"cell-var-from-loop",
"fixme",
"keyword-arg-before-vararg",
"protected-access",
"raise-missing-from",
"redefined-outer-name",
"subprocess-run-check",
"superfluous-parens",
"undefined-loop-variable",
"unnecessary-pass",
"unused-argument",
"unused-variable",
# Convention
"consider-iterating-dictionary",
"consider-using-dict-items",
"consider-using-enumerate",
"consider-using-f-string",
"import-outside-toplevel",
"invalid-name",
"missing-docstring",
"too-many-lines",
# Refactor
"chained-comparison",
"consider-using-with",
"duplicate-code",
"inconsistent-return-statements",
"no-else-raise",
"no-else-return",
"too-few-public-methods",
"too-many-arguments",
"too-many-boolean-expressions",
"too-many-branches",
"too-many-instance-attributes",
"too-many-locals",
"too-many-nested-blocks",
"too-many-public-methods",
"too-many-return-statements",
"too-many-statements",
"unnecessary-dict-index-lookup",
"use-a-generator",
# Information
"c-extension-no-member",
# FIXME on Sphinx code,
"abstract-method",
"unexpected-keyword-arg",
"logging-too-many-args",
"attribute-defined-outside-init",
]
[tool.pytype]
inputs = ["Lib"]
exclude = ["Lib/fontbakery/*_pb2.py", "Lib/fontbakery/sphinx_extensions"]