-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
303 lines (277 loc) · 7.02 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
[project]
name = "abilian-sbe"
version = "1.1.12"
description = "Social Business platform (entreprise collaboration and information management)"
readme = "README.md"
requires-python = ">=3.10,<3.13"
license = "LGPL-2.0-or-later"
authors = [
{ name = "Abilian SAS", email = "[email protected]" },
]
dependencies = [
# Flask and friends
"flask>=3.0.2,<3.1.0",
"jinja2>=3.1.3,<3.2.0",
"werkzeug>=3.1.0,<3.2",
"markupSafe>=2.1.4,<2.2.0",
# Flask extensions
"flask-babel>=1.0.0,<1.1.0",
"flask-assets==2.1.0",
"flask-mail>=0.9.1",
"flask-migrate>=4.0.5,<4.1.0",
"flask-login>=0.6.3,<0.7.0",
"flask-talisman>=1.1.0,<1.2.0",
# Transitive dependencies, but called explicitly in our code
"Babel",
"blinker>=1.6.2",
"click>=8.1.3",
"itsdangerous>=2.1.2",
"numpy>=1.26.3,<2.0.0",
"pytz",
# Persistence
"sqlalchemy==1.4.35",
"flask-sqlalchemy==3.0.1",
"psycopg2>=2.9.9,<3.0.0",
# Forms
"flask-wtf==1.2.0",
"wtforms==3.1.2",
"WTForms-Alchemy==0.18.0",
"wtforms-sqlalchemy>=0.4.1,<0.5.0",
# Web assets
"webassets==2.0",
"jsmin",
"cssmin",
"closure==20161201",
#
"python-dateutil>=2.8.2,<3.0.0",
# Search
"whoosh-reloaded>=2.7.5,<3.0.0",
# task queue
"dramatiq>=1.15.0,<2.0.0",
"redis>=4.6.0,<5.0",
"flask-dramatiq>=0.6.0,<0.7.0",
"dramatiq-abort>=1.1.0,<2.0.0",
"apscheduler>=3.10.4,<4.0.0",
# Infra
"loguru>=0.7.2,<0.8.0",
"filelock>=3.15,<4.0",
# Security
"bleach[css]>=6.2.0,<7.0.0",
"bcrypt",
"defusedxml>=0.7.1,<0.8.0",
"clamd",
# Various libs
"deprecated",
"lxml",
"tqdm",
"python-magic",
"pillow",
"pandas>=2.2.0",
"validate_email",
"toolz",
"html2text>=2024,<2025",
"devtools",
"svcs>=24.1.0",
"attrs>=24.2.0",
# Markdown support for Wiki
"markdown>=3,<4",
# Language and charset detection
"langid>=1.1.6",
"chardet",
# XLSX support
"xlwt",
"openpyxl",
# Dev and prod server
"gunicorn",
"sentry-sdk[flask]",
# Geoip DB
"maxminddb",
"certifi",
"mmdb_writer",
"netaddr",
#
"pytest>=8.3.3",
"hyperlink>=21.0.0",
"python-dotenv>=1.0.1",
"flask-super>=0.2.8",
]
[project.urls]
Repository = "https://github.com/abilian/abilian-sbe"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = [
"src/abilian",
"src/extranet",
]
[tool.uv]
dev-dependencies = [
"abilian-devtools>=0.7,<0.8",
"mypy>=1.5.1,<2.0.0",
"Flask-DebugToolbar",
# "sqlparse>=0.4.4,<0.5.0",
# Dev server
"honcho",
# Testing
"html5lib",
"hyperlink",
"pytest>=8,<9",
"tox>=4.5.1,<5.0.0",
"pytest-flask",
"flask-linktester",
# Type hints
"types-bleach",
"types-deprecated",
"types-python-dateutil",
"types-pytz",
"types-pyyaml",
"types-redis",
"types-requests",
"types-setuptools",
"types-chardet",
"types-Markdown",
"types-toml>=0.10.8.7,<0.11.0.0",
# Tools
"pyupgrade",
"deptry",
# Documentation
"mkdocs-material>=9.5.4,<10.0.0",
"pip-outdated>=0.7.0",
"flynt>=1.0.1",
"snoop>=0.6.0",
"pytest-archon>=0.0.6",
"typeguard>=4.4.1",
]
[tool.pytest.ini_options]
minversion = "6.0"
filterwarnings = [
'ignore::DeprecationWarning',
'ignore::sqlalchemy.exc.SAWarning',
]
# addopts = "-ra -q"
testpaths = ["tests"]
python_files = ["test_*.py", "tests.py", "test.py", "*_tests.py"]
# norecursedirs = .* env* _build *.egg *.egg-info tools deploy etc docs demo bin
# -----------------------------------------------------------------------------
[tool.deptry.per_rule_ignores]
# X defined as a dependency but not used in the codebase
DEP002 = [
# Used by Flask
"python-dotenv",
# Used (implicitly) by Flask-Migrate
'alembic',
# Used by webassets
'jsmin',
'cssmin',
'closure',
# Used implicitly by SQLA
'psycopg2',
# Web
'gunicorn',
]
# X imported but missing from the dependency definitions
DEP001 = ['pkg_resources']
# X imported but declared as a dev dependency
DEP004 = ['flask_debugtoolbar', 'html5lib']
# -----------------------------------------------------------------------------
[tool.pyright]
exclude = ['.nox', 'tests', 'noxfile.py']
include = ["src"]
# strict = ["src"]
# False positives
reportPrivateImportUsage = false
# -----------------------------------------------------------------------------
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
#warn_redundant_casts = true
#warn_no_return = true
#warn_return_any = true
#strict_optional = true
#warn_unused_ignores = true
# exclude = [
# '^file1\.py$', # TOML literal string (single-quotes, no escaping necessary)
# "^file2\\.py$", # TOML basic string (double-quotes, backslash and other characters need escaping)
# ]
# -----------------------------------------------------------------------------
[tool.pyanalyze]
paths = ["src/"]
import_paths = ["."]
# Enable or disable some checks
add_import = true
already_declared = true
bad_async_yield = true
bad_evaluator = true
bad_except_handler = true
bad_exception = true
bad_format_string = true
bad_global = true
bad_match = true
bad_nonlocal = true
attribute_is_never_set = false
bad_star_import = true
bad_super_call = true
bad_unpack = false
bad_yield_from = false
bare_ignore = false
cant_import = false
class_variable_redefinition = false
condition_always_true = false
duplicate_dict_key = false
duplicate_enum_member = false
duplicate_yield = false
implicit_any = false
implicit_non_ascii_string = false
implicit_reexport = false
import_failed = false
impossible_pattern = false
impure_async_call = false
incompatible_argument = false
incompatible_assignment = false
incompatible_call = false
incompatible_default = false
incompatible_override = false
incompatible_return_value = false
incompatible_yield = false
inference_failure = false
internal_error = false
invalid_annotated_assignment = false
invalid_annotation = false
invalid_context_manager = false
invalid_method_return_type = false
invalid_typeddict_key = false
method_first_arg = false
missing_asynq = false
missing_await = false
missing_f = false
missing_parameter_annotation = false
missing_return = false
missing_return_annotation = false
mixing_bytes_and_text = false
no_return_may_return = false
non_boolean_in_boolean_context = false
not_callable = false
possibly_undefined_name = false
suggested_parameter_type = false
suggested_return_type = false
task_needs_yield = false
type_always_true = false
type_does_not_support_bool = false
undefined_attribute = false
undefined_name = false
unexpected_node = false
unhashable_key = false
unnecessary_yield = false
unsupported_operation = false
unused_assignment = false
unused_ignore = false
unused_variable = false
use_floor_div = false
use_fstrings = false
value_always_true = false
yield_in_comprehension = false
yield_without_value = false
# -----------------------------------------------------------------------------
[tool.bandit]
# nothing