-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathpyproject.toml
More file actions
424 lines (399 loc) · 11.4 KB
/
pyproject.toml
File metadata and controls
424 lines (399 loc) · 11.4 KB
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
[build-system]
requires = ["hatchling", "hatch-vcs", "setuptools"]
build-backend = "hatchling.build"
[project]
name = "ethyca-fides"
dynamic = ["version"]
description = "Open-source ecosystem for data privacy as code."
readme = "README.md"
license = { text = "Apache License 2.0" }
requires-python = ">=3.13,<4"
authors = [
{ name = "Ethyca, Inc.", email = "fidesteam@ethyca.com" }
]
urls = { Homepage = "https://github.com/ethyca/fides" }
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"APScheduler==3.9.1.post1",
"CacheControl~=0.14.4",
"GitPython==3.1.41",
"Jinja2==3.1.6",
"PyJWT~=2.12.0",
"PyMySQL==1.1.1",
"SQLAlchemy-Utils==0.38.3",
"acryl-datahub==1.3.1.3",
"aiohttp==3.13.4",
"aiohappyeyeballs~=2.6.1",
"alembic==1.8.1",
"anyascii==0.3.2",
"anyio==3.7.1",
"asyncpg==0.30.0",
"attrs~=25.4.0",
"boto3==1.41.2",
"celery-redis-cluster~=0.2.3",
"celery==5.5.3",
"certifi==2024.8.30",
"click-repl~=0.3.0",
"click==8.1.7",
"click-plugins~=1.1.1",
"click-didyoumean~=0.3.1",
"click_default_group==1.2.2",
"cloud-sql-python-connector==1.9.2",
"cloudpickle~=3.1.2",
"colorama~=0.4.6",
"dask==2025.11.0",
"deepdiff==8.6.2",
"defusedxml==0.7.1",
"email-validator~=2.3.0",
"expandvars==0.9.0",
"fastapi-cli~=0.0.16",
"fastapi-pagination[sqlalchemy]==0.15.12",
"fastapi[all]==0.123.3",
"fideslang==3.1.3",
"firebase-admin==5.3.0",
"flower==2.0.1",
"google-auth==2.48.0",
"httpx~=0.28.1",
"iab-tcf==0.2.2",
"immutables==0.21",
"importlib_resources==5.12.0",
"joblib==1.3.2",
"loguru==0.7.3",
"msgpack~=1.1.2",
"multidimensional_urlencode==0.0.4",
"networkx==3.1",
"nh3==0.2.15",
"numpy~=2.3.5",
"oauthlib==3.3.1",
"objgraph==3.6.0",
"okta==3.1.0",
"onepassword-sdk==0.3.0",
"openpyxl==3.0.9",
"packaging==23.0",
"paramiko==3.4.1",
"passlib[bcrypt]==1.7.4",
"pg8000==1.31.5",
"platformdirs~=4.5.0",
"psycopg2-binary==2.9.11",
"pyahocorasick==2.1.0",
"pydantic-settings==2.3.3",
"pydantic==2.12.4",
"pydash~=8.0.2",
"pygtrie==2.5.0",
"pyinstrument==4.5.1",
"pymongo[srv]==4.7.3",
"joserfc~=1.6.3",
"redis==7.2.0",
"requests-oauth2client>=1.5.0",
"requests-oauthlib==2.0.0",
"rich-click==1.9.0",
"scylla-driver==3.29.7",
"sendgrid==6.9.7",
"slowapi==0.1.9",
"smart-open[s3,gcs]==7.3.0.post1",
"snowflake-sqlalchemy~=1.8.2",
"sqlakeyset~=2.0.1762907931",
"sqlalchemy-bigquery==1.16.0",
"sqlalchemy-citext==1.8.0",
"sqlalchemy-redshift==0.8.11",
"sqlalchemy-stubs==0.4",
"sqlalchemy[asyncio]==1.4.27",
"sqlglot~=30.0.3",
"sshtunnel==0.4.0",
"starlette~=0.50.0",
"stream-zip==0.0.83",
"tenacity~=9.1.2",
"tinycss2>=1.5.0",
"toml==0.10.2",
"tornado~=6.5.5",
"twilio==7.15.0",
"typer==0.20.0",
"types-defusedxml==0.7.0.20240218",
"typing-extensions==4.14.1",
"urllib3~=2.6.3",
"uvicorn[standard]~=0.30.0",
"yarl~=1.22.0",
"filelock~=3.20.0",
"pyOpenSSL~=26.0.0",
"cryptography~=46.0.5",
"snowflake-connector-python~=4.4.0",
"cffi~=2.0.0",
"smmap~=5.0.2",
"rsa~=4.9.1",
"pyasn1~=0.6.3",
"sniffio~=1.3.1",
"requests~=2.33.0",
"python-dateutil~=2.9.0.post0",
"rfc3986~=2.0.0",
"ordered-set==4.1.0",
"setuptools~=80.10.2",
"ujson~=5.12.0",
]
[project.optional-dependencies]
mssql = ["pymssql==2.3.13"]
all = ["pymssql==2.3.13"]
[dependency-groups]
dev = [
"ruff>=0.14.11",
"debugpy~=1.8.0",
"Faker==14.1.0",
"freezegun==1.5.5",
"GitPython==3.1.41",
"moto[s3]==5.1.0",
"mypy==1.10.0",
"nox>=2025.11",
"pre-commit==2.20.0",
"pytest-asyncio==0.19.0",
"pytest-celery==1.2.1",
"pytest-cov==4.0.0",
"pytest-env==0.7.0",
"pytest-loguru==0.4.0",
"pytest-mock==3.14.0",
"pytest-rerunfailures==14.0",
"pytest-xdist==3.8.0",
"pytest-split==0.10.0",
"pytest==8.4.2",
"pyyaml~=6.0.1",
"requests-mock==1.10.0",
"sqlalchemy-stubs==0.4",
"types-oauthlib==3.3.0.20250822",
"types-paramiko==3.0.0.10",
"types-PyYAML==6.0.11",
"types-redis==4.3.4",
"types-requests",
"types-requests_oauthlib==2.0.0.20250809",
"types-toml==0.10.8",
"types-ujson==5.4.0",
"types-urllib3==1.26.23",
"watchfiles==0.19.0",
"werkzeug==3.0.6",
"xenon==0.9.0",
]
[project.scripts]
fides = "fides.cli:cli"
webserver = "fides.api.main:start_webserver"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0+dev"
[tool.hatch.build.targets.wheel]
packages = ["src/fides"]
# Ensure that the "ui-build" folder is included in wheel and sdist; it is
# populated by our clients/admin-ui build process to allow the Admin UI app to
# be distributed as part of the ethyca-fides Python package.
artifacts = ["src/fides/ui-build"]
[tool.hatch.build.targets.sdist]
# Ensure that the "ui-build" folder is included in wheel and sdist (see above)
artifacts = ["src/fides/ui-build"]
# Constrain setuptools for build isolation so legacy deps get pkg_resources (e.g. in docs image).
[tool.uv]
build-constraint-dependencies = ["setuptools==80.10.2"]
# If a dependency fails in CI with ModuleNotFoundError: pkg_resources or setuptools, add it here.
# CI and Dockerfile pre-install setuptools/wheel before uv sync so these packages can build.
no-build-isolation-package = ["pyahocorasick", "scylla-driver"]
# Packages whose setup uses pkg_resources at build time but don't declare setuptools
# as a build dependency; required when building via uv (e.g. docs container).
[tool.uv.extra-build-dependencies]
flatdict = ["setuptools"]
scylla-driver = ["setuptools"]
##########
## MyPy ##
##########
[tool.mypy]
check_untyped_defs = true
disallow_untyped_defs = true
files = ["src"]
exclude = ["migrations/"]
no_implicit_reexport = true
plugins = ["pydantic.mypy", "sqlmypy"]
pretty = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_configs = true
[pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"AccessControl.*",
"alembic.*",
"apscheduler.*",
"boto3.*",
"botocore.*",
"bson.*",
"cassandra.*",
"celery.*",
"citext.*",
"click_default_group.*",
"dask.*",
"deepdiff.*",
"defusedxml.ElementTree.*",
"firebase_admin.*",
"google.api_core.*",
"joblib.*",
"joserfc.*",
"jwt.*",
"multidimensional_urlencode.*",
"networkx.*",
"nh3.*",
"okta.*",
"pandas.*",
"pg8000.*",
"pydash.*",
"pygtrie.*",
"pymongo.*",
"pymysql.*",
"RestrictedPython.*",
"sendgrid.*",
"smart_open.*",
"snowflake.*",
"sqlalchemy_utils.*",
"sqlalchemy.ext.*",
"sqlalchemy.future.*",
"sqlalchemy_bigquery.*",
"twilio.*",
"uvicorn.*",
]
ignore_missing_imports = true
##########
## Ruff ##
##########
[tool.ruff]
target-version = "py313"
line-length = 88
src = ["src", "tests", "noxfiles", "scripts"]
# Exclude directories
exclude = [
".git",
".hg",
".mypy_cache",
".tox",
".venv",
"_build",
"build",
"dist",
"tests/data",
"src/fides/api/alembic/migrations",
]
[tool.ruff.lint]
# Enable specific rule sets that approximate black/isort/pylint behavior
# See https://docs.astral.sh/ruff/rules/ for details
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
# Disable rules that correspond to pylint's disabled rules or are too strict initially
ignore = [
"E501", # line-too-long (handled by formatter)
"E402", # module-import-not-at-top-of-file (import-outside-toplevel)
"E712", # true-false-comparison (can be auto-fixed)
"E711", # none-comparison (can be auto-fixed)
"E713", # not-in-test (can be auto-fixed)
"E714", # not-is-test (can be auto-fixed)
"E721", # type-comparison
"E722", # bare-except (broad-except)
"E731", # lambda-assignment (unnecessary-lambda-assignment)
"F401", # unused-import (will be noisy in __init__ files)
"F403", # undefined-local-with-import-star
"F405", # undefined-local-with-import-star-usage
"F541", # f-string-missing-placeholders (can tighten later)
"F841", # unused-variable (can tighten later)
]
# Allow fix for all enabled rules (when `--fix` is provided)
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
# Ignore specific rules in test files
"tests/**/*.py" = [
"ARG", # Allow unused arguments in tests
"B", # Allow some bugbear rules in tests
"PIE", # Allow some pie rules in tests
]
# Ignore import violations in __init__.py files
"__init__.py" = ["F401", "F403"]
# Allow some flexibility in scripts and nox files
"scripts/**/*.py" = ["T201", "T203"]
"noxfile.py" = ["T201", "T203"]
"noxfiles/**/*.py" = ["T201", "T203"]
[tool.ruff.lint.isort]
known-first-party = ["fides"]
known-third-party = ["nox"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.mccabe]
# Set complexity threshold to reasonable level
max-complexity = 15
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Like Black, respect magic trailing comma
skip-magic-trailing-comma = false
# Like Black, automatically detect line ending
line-ending = "auto"
############
## Pytest ##
############
[tool.pytest.ini_options]
env = [
"FIDES__TEST_MODE=true",
"FIDES__SECURITY__AUTH_RATE_LIMIT=1000/minute",
"PYTHONDONTWRITEBYTECODE=1"
]
log_cli=false
filterwarnings = "ignore::DeprecationWarning:aiofiles.*:"
testpaths="tests"
log_level = "INFO"
addopts = [
"-ra",
"-vv",
"-s",
"--disable-pytest-warnings",
"--junitxml=test_report.xml"
]
markers = [
"unit: only runs tests that don't require non-python dependencies (i.e. a database)",
"integration: only runs tests that require application dependencies (i.e. a database)",
"external: only runs tests that require access to non-docker, external services (i.e. Snowflake)",
"postgres: only runs the integration tests for postgres",
"mssql: only runs the integration tests for sqlserver/mssql",
"mysql: only runs the integration tests for mysql",
"serial: marks tests that must run sequentially to avoid resource conflicts",
"async_dsr: marks tests related to async DSR functionality",
"integration",
"integration_external",
"integration_mysql",
"integration_postgres",
"integration_mongodb",
"integration_mongodb_atlas",
"integration_mssql",
"integration_google_cloud_sql_mysql",
"integration_google_cloud_sql_postgres",
"integration_rds_mysql",
"integration_rds_postgres",
"integration_redshift",
"integration_snowflake",
"integration_mariadb",
"integration_bigquery",
"integration_dynamodb",
"integration_saas",
"integration_saas_override",
"integration_scylladb",
"unit_saas"
]
asyncio_mode = "auto"
[tool.coverage.run]
omit = ["src/fides/api/alembic/migrations/*"]