-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
147 lines (131 loc) · 3.04 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
[project]
name = "sonata-cell-position"
version = "0.0.0"
description = "sonata-cell-position web API"
authors = [
{name = "Blue Brain Project, EPFL"},
{name = "Gianluca Ficarelli", email = "gianluca.ficarelli@epfl.ch"},
]
dependencies = [
"cachetools",
"entity-management>=1.2.36",
"fastapi",
"h5py",
"libsonata==0.1.24", # pinned for performance reasons
"loguru",
"loky",
"numpy<2", # to be unpinned with libsonata >= 0.1.28
"pandas",
"psutil", # allow early memory leak detections in loky
"pyarrow",
"pydantic>=2",
"pydantic-settings",
"pyjwt",
"pyyaml",
"requests",
"uvicorn[standard]",
"voxcell",
]
requires-python = "==3.12.*"
readme = "README.md"
license = {text = "Apache-2.0"}
[project.optional-dependencies]
cli = [
"click",
]
[tool.uv]
dev-dependencies = [
"coverage[toml]",
"httpx",
"mypy",
"pytest",
"pytest-asyncio<0.22", # https://github.com/pytest-dev/pytest-asyncio/issues/706
"pytest-cov",
"pytest-loguru",
"ruff",
"types-cachetools",
"types-requests",
"types-PyYAML",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PL", # pylint
"UP", # pyupgrade
]
ignore = [
"FIX002", # Line contains TODO, consider resolving the issue
"TD", # TODOs
]
[tool.ruff.lint.isort]
known-local-folder = ["tests"]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"ANN", # Missing type annotation
"ARG002", # Unused method argument
"D", # pydocstyle
"ERA001", # Found commented-out code
"INP001", # Missing `__init__.py`
"PLC2701", # Private name import from external module
"PLR2004", # magic value (constant) used in comparison (i.e. expected == 3)
"S101", # Use of `assert` detected
"SLF001", # private member access
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
# Maximum number of arguments for function / method
max-args = 11
# Maximum number of locals for function / method body
max-locals = 15
# Maximum number of return / yield for function / method body
max-returns = 7
# Maximum number of branch for function / method body
max-branches = 12
# Maximum number of statements in function / method body
max-statements = 50
# Maximum number of public methods for a class (see R0904).
max-public-methods = 60
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"--import-mode=importlib",
"-vv",
"-ra",
"--cov=app",
"--durations=10",
"--durations-min=1.0",
]
asyncio_mode = "auto"
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning:nptyping",
]
[tool.coverage.paths]
source = [
"src",
"*/site-packages",
]
[tool.coverage.run]
branch = true
parallel = false
[tool.coverage.report]
show_missing = true
precision = 0
fail_under = 80
omit = [
"__main__.py",
]
[tool.mypy]
show_error_codes = true
ignore_missing_imports = true
allow_redefinition = true