-
Notifications
You must be signed in to change notification settings - Fork 20
/
pyproject.toml
143 lines (128 loc) · 3.26 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
[project]
name = "diracx"
description = "Client installation for users of DiracX installations"
readme = "README.md"
requires-python = ">=3.11"
keywords = []
license = { text = "GPL-3.0-only" }
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: System :: Distributed Computing",
]
dependencies = ["diracx-api", "diracx-cli", "diracx-client", "diracx-core"]
dynamic = ["version"]
[project.optional-dependencies]
testing = ["diracx-testing"]
[tool.setuptools]
packages = []
[build-system]
requires = ["setuptools>=61", "wheel", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.ruff]
line-length = 120
src = ["diracx-*/src", "diracx-*/tests"]
exclude = [
"diracx-client/src/diracx/client/",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errrors
"F", # pyflakes
"B", # flake8-bugbear
"I", # isort
"PLE", # pylint errors
"D", # pydocstyle
# "UP", # pyUpgrade
"FLY", # flynt
"DTZ", # flake8-datetimez
"S", # flake8-bandit
]
ignore = [
"B905",
"B008",
"B006",
"S101", # bandit: use of assert https://docs.astral.sh/ruff/rules/assert/
"D203",
"D213",
# TODO: Maybe enable these
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
# TODO: These should be re-enabled after fixing
"D205",
"D401",
"D404",
]
[tool.ruff.lint.per-file-ignores]
# Ignore Bandit security checks in the test directories
"diracx-testing/*" = ["S"]
"diracx-*/tests/*" = ["S"]
[tool.ruff.lint.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
"fastapi.Body",
"fastapi.Header",
]
[tool.isort]
profile = "black"
[tool.mypy]
files = [
"diracx-api/src/**/*.py",
"diracx-cli/src/**/*.py",
"diracx-client/src/**/_patch.py",
"diracx-core/src/**/*.py",
"diracx-db/src/**/*.py",
"diracx-routers/src/**/*.py",
]
mypy_path = [
"$MYPY_CONFIG_FILE_DIR/diracx-api/src",
"$MYPY_CONFIG_FILE_DIR/diracx-cli/src",
"$MYPY_CONFIG_FILE_DIR/diracx-client/src",
"$MYPY_CONFIG_FILE_DIR/diracx-core/src",
"$MYPY_CONFIG_FILE_DIR/diracx-db/src",
"$MYPY_CONFIG_FILE_DIR/diracx-routers/src",
]
plugins = ["sqlalchemy.ext.mypy.plugin", "pydantic.mypy"]
allow_redefinition = true
explicit_package_bases = true
# disallow_untyped_defs = true
# strict = true
enable_error_code = ["import", "attr-defined"]
[[tool.mypy.overrides]]
module = 'DIRAC.*'
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = 'authlib.*'
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = [
"diracx-api/tests",
"diracx-cli/tests",
"diracx-client/tests",
"diracx-core/tests",
"diracx-db/tests",
"diracx-routers/tests",
]
addopts = [
"-v",
"--cov=diracx",
"--cov-report=term-missing",
"-pdiracx.testing",
"-pdiracx.testing.osdb",
"--import-mode=importlib",
]
asyncio_mode = "auto"
markers = [
"enabled_dependencies: List of dependencies which should be available to the FastAPI test client",
]