forked from frappe/frappe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
291 lines (279 loc) · 6.68 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
[project]
name = "frappe"
authors = [
{ name = "Frappe Technologies Pvt Ltd", email = "[email protected]"}
]
description = "Metadata driven, full-stack low code web framework"
requires-python = ">=3.10,<3.13"
readme = "README.md"
dynamic = ["version"]
dependencies = [
# core dependencies
"Babel~=2.13.1",
"Click~=8.1.7",
"filelock~=3.13.1",
"filetype~=1.2.0",
"GitPython~=3.1.34",
"Jinja2~=3.1.2",
"Pillow~=10.3.0",
"PyJWT~=2.8.0",
# We depend on internal attributes,
# do NOT add loose requirements on PyMySQL versions.
"PyMySQL==1.1.1",
"pypdf~=3.17.0",
"PyPika==0.48.9",
"PyQRCode~=1.2.1",
"PyYAML~=6.0.1",
"RestrictedPython~=7.0",
"WeasyPrint==59.0",
"pydyf==0.10.0",
"Werkzeug~=3.0.1",
"Whoosh~=2.7.4",
"beautifulsoup4~=4.12.2",
"bleach-allowlist~=1.0.3",
"bleach[css]~=6.0.0",
"chardet~=5.1.0",
"croniter~=2.0.1",
"cryptography~=43.0.1",
"cssutils~=2.9.0",
"email-reply-parser~=0.5.12",
"gunicorn~=22.0.0",
"html5lib~=1.1",
"ipython~=8.15.0",
"ldap3~=2.9",
"markdown2~=2.4.8",
"MarkupSafe>=2.1.0,<3",
"maxminddb-geolite2==2018.703",
"num2words~=0.5.12",
"oauthlib~=3.2.2",
"openpyxl~=3.1.2",
"passlib~=1.7.4",
"pdfkit~=1.0.0",
"phonenumbers==8.13.13",
"premailer~=3.10.0",
"psutil~=5.9.5",
"psycopg2-binary~=2.9.1",
"pyOpenSSL~=24.2.1",
"pydantic~=2.7.0",
"pyotp~=2.8.0",
"python-dateutil~=2.8.2",
"pytz==2023.3",
"rauth~=0.7.3",
"redis~=5.0.1",
"hiredis~=2.2.3",
"setproctitle~=1.3.3",
"requests-oauthlib~=1.3.1",
"requests~=2.32.0",
"rq==1.16.2",
"rsa>=4.1",
"semantic-version~=2.10.0",
"sentry-sdk~=1.37.1",
"sqlparse~=0.5.0",
"sql_metadata~=2.11.0",
"tenacity~=8.2.2",
"terminaltables~=3.1.10",
"traceback-with-variables~=2.0.4",
"typing_extensions>=4.6.1,<5",
"tomli~=2.0.1",
"uuid-utils~=0.6.1",
"xlrd~=2.0.1",
"zxcvbn~=4.4.28",
"markdownify~=0.11.6",
# integration dependencies
"boto3~=1.34.143",
"dropbox~=11.36.2",
"google-api-python-client~=2.2.0",
"google-auth-oauthlib~=0.4.4",
"google-auth~=1.29.0",
"posthog~=3.0.1",
"vobject~=0.9.7",
"pycountry~=24.6.1",
]
[project.urls]
Homepage = "https://frappeframework.com/"
Repository = "https://github.com/frappe/frappe.git"
"Bug Reports" = "https://github.com/frappe/frappe/issues"
[project.optional-dependencies]
dev = [
"pyngrok~=6.0.0",
"watchdog~=3.0.0",
"responses==0.23.1",
# typechecking
"basedmypy",
"types-PyMySQL",
"types-PyYAML",
"types-Pygments",
"types-beautifulsoup4",
"types-bleach",
"types-cffi",
"types-colorama",
"types-croniter",
"types-decorator",
"types-ldap3",
"types-oauthlib",
"types-openpyxl",
"types-passlib",
"types-psutil",
"types-psycopg2",
"types-python-dateutil",
"types-pytz",
"types-requests",
"types-six",
"types-vobject",
"types-zxcvbn",
]
test = [
"unittest-xml-reporting~=3.2.0",
"coverage~=6.5.0",
"Faker~=18.10.1",
"hypothesis~=6.77.0",
"freezegun~=1.2.2",
"pdbpp~=0.10.3",
]
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.bench.dev-dependencies]
coverage = "~=6.5.0"
Faker = "~=18.10.1"
pyngrok = "~=6.0.0"
unittest-xml-reporting = "~=3.2.0"
watchdog = "~=3.0.0"
hypothesis = "~=6.77.0"
responses = "==0.23.1"
freezegun = "~=1.2.2"
pdbpp = "~=0.10.3"
[tool.ruff]
line-length = 110
target-version = "py310"
exclude = [
"**/doctype/*/boilerplate/*.py" # boilerplate are template strings, not valid python
]
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"I",
"UP",
"B",
"RUF",
]
ignore = [
"B017", # assertRaises(Exception) - should be more specific
"B018", # useless expression, not assigned to anything
"B023", # function doesn't bind loop variable - will have last iteration's value
"B904", # raise inside except without from
"E101", # indentation contains mixed spaces and tabs
"E402", # module level import not at top of file
"E501", # line too long
"E741", # ambiguous variable name
"F401", # "unused" imports
"F403", # can't detect undefined names from * import
"F405", # can't detect undefined names from * import
"F722", # syntax error in forward type annotation
"W191", # indentation contains tabs
"RUF001", # string contains ambiguous unicode character
"UP032", # Use f-string instead of `format` call (translations)
"UP030", # Use implicit references for positional format fields (translations)
]
typing-modules = ["frappe.types.DF"]
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
docstring-code-format = true
[tool.frappix]
# use identifier from https://search.nixos.org/packages
nixpkgs-deps = [
"mariadb",
"restic",
"wkhtmltopdf-bin",
"which",
"gzip",
"bash",
"redis",
"nodejs_20",
"python312",
]
[tool.mypy]
strict = false
pretty = true
incremental = true
sqlite_cache = true
files = [
# start small, with a lot of multiplication potential
"frappe/types/__init__.py",
"frappe/types/DF.py",
"frappe/types/docref.py",
"frappe/types/frappedict.py",
]
exclude = [
# permanent excludes
"^frappe/patches",
'/test_.+\.py$',
"^frappe/tests/ui_test_helpers.py",
"^frappe/parallel_test_runner.py",
"^frappe/deprecation_dumpster.py",
]
disable_error_code = [
]
[[tool.mypy.overrides]]
module = "frappe"
# Too many for a start
disable_error_code = [
"no-any-expr",
"no-untyped-def",
"no-untyped-call",
"no-untyped-usage",
]
# External libraries without types
[[tool.mypy.overrides]]
module = [
"apiclient.http",
"bleach_allowlist",
"boto3",
"botocore.exceptions",
"cssutils",
"cups",
"dropbox",
"email_reply_parser",
"filetype",
"geolite2",
"google",
"googleapiclient.discovery",
"googleapiclient.errors",
"google.oauth2",
"google.oauth2.credentials",
"markdown2",
"markdownify",
"num2words",
"pdfkit",
"premailer",
"pyngrok",
"pypika",
"pypika.dialects",
"pypika.functions",
"pypika.queries",
"pypika.terms",
"pypika.utils",
"pyqrcode",
"rauth",
"requests_oauthlib",
"RestrictedPython",
"RestrictedPython.Guards",
"RestrictedPython.transformer",
"semantic_version",
"sql_metadata",
"sqlparse",
"terminaltables",
"traceback_with_variables",
"weasyprint",
"whoosh.fields",
"whoosh.index",
"whoosh.qparser",
"whoosh.query",
"whoosh.writing",
"xlrd",
"xmlrunner",
]
ignore_missing_imports = true