-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (154 loc) · 5.17 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (154 loc) · 5.17 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
[project]
name = "mex-common"
version = "3.0.0"
description = "Common library for MEx python projects."
authors = [{ name = "MEx Team", email = "mex@rki.de" }]
readme = { file = "README.md", content-type = "text/markdown" }
license = "MIT"
urls = { Repository = "https://github.com/robert-koch-institut/mex-common" }
requires-python = ">=3.11,<3.15"
dependencies = [
"backoff>=2,<3",
"click>=8,<9",
"langdetect>=1,<2",
"ldap3>=2,<3",
"mex-model>=5,<6",
"networkx>=3",
"numpy>=2,<3",
"pandas>=3,<4",
"pyarrow>=24,<25",
"pydantic-settings>=2.14,<2.15",
"pydantic>=2,<3",
"tabulate>=0.9",
"pytz>=2025",
"requests>=2,<3",
]
[dependency-groups]
dev = [
"ipdb>=0.13",
"mypy>=1",
"pandas-stubs",
"pytest-cov>=6",
"pytest-random-order>=1",
"pytest-xdist>=3",
"pytest>=8",
"ruff>=0.15",
"sphinx>=9",
"types-ldap3",
"types-networkx",
"types-pytz",
"types-requests",
"types-tabulate",
]
fuzzing = [
"mex-artificial>=2",
]
[tool.cruft]
template = "https://github.com/robert-koch-institut/mex-template"
skip = ["CHANGELOG.md", "mex", "tests"]
[tool.ipdb]
context = 5
[tool.mypy]
show_error_codes = true
strict = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ['langdetect.*', 'mex.artificial.helpers']
ignore_missing_imports = true
[tool.pydantic-mypy]
warn_untyped_fields = true
[tool.pytest.ini_options]
addopts = [
"--verbose",
"--cov",
"--no-cov-on-fail",
"--cov-report=term-missing:skip-covered",
"--cov-fail-under=96",
"--cov-branch",
"--pdbcls=IPython.terminal.debugger:TerminalPdb",
"--random-order-bucket=global",
]
markers = [
"integration: mark a test as integration test",
"fuzzing: mark a test as fuzzing test, requiring fuzzing dependencies"
]
[tool.ruff]
fix = true
line-length = 88
show-fixes = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
ignore = [
"COM", # Disable flake8-commas checks (let ruff format handle that)
"CPY", # Disable copyright notice checks (we have LICENSE files)
"D100", # Allow missing module docstring (for brevity)
"D104", # Allow missing package docstring (for brevity)
"D203", # Disallow blank line before class docstring (inverse of D211)
"D213", # Disallow multi-line docstring starting at second line (inverse of D212)
"D406", # Allow section name ending with newline (google style compat)
"D407", # Allow missing dashed underline after section (google style compat)
"D413", # Allow missing blank line after last section (google style compat)
"FIX", # Allow committing with open TODOs (don't punish committers)
"ISC001", # Disable checks for implicitly concatenated strings (formatter compat)
"N805", # Allow first argument of a method to be non-self (pydantic compat)
"N815", # Allow mixedCase variables in class scope (model compat)
"RUF012", # Allow mutable class attributes (pydantic compat)
"SIM108", # Allow explicit if-else instead of ternary (easier to read)
"TD003", # Allow TODOs without ticket link (don't punish TODO writers)
"TRY003", # Allow long exception message at the raise site (for pydantic)
]
select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"mex/common/connector/http.py" = [
"A005", # Allow custom http connector module to shadow standard-library
]
"mex/common/logging.py" = [
"A005", # Allow custom logging module to shadow standard-library
]
"mex/common/models/resource.py" = [
"A005", # Allow module for resource models to shadow standard-library
]
"mex/common/types/__init__.py" = [
"A005", # Allow custom types module to shadow standard-library
]
"mex/common/types/email.py" = [
"A005", # Allow custom email types module to shadow standard-library
]
"docs/**" = [
"INP001", # Docs folder does not need to be a package
]
"scripts/**" = [
"INP001", # Scripts folder does not need to be a package
]
"tests/**" = [
"A005", # Allow modules shadowing standard-library modules
"ARG005", # Allow unused lambda arguments for mocking
"D101", # Allow missing docstring in public class
"D102", # Allow missing docstring in public method
"D103", # Allow missing docstring in public function
"D107", # Allow missing docstring in `__init__`
"E501", # Allow longer lines with test data
"N807", # Allow mocking `__init__`
"PLR0915", # Allow functions with many statements
"PLR2004", # Allow comparing with static values
"PT004", # Allow public fixtures without returns
"PT013", # Allow more flexible pytest imports
"S101", # Allow use of `assert` in tests
"SLF", # Allow private member access
]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"reflex" = "rx"
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.isort]
known-first-party = ["mex", "tests"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[build-system]
requires = ["hatchling>=1.28.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["mex"]
[tool.hatch.build.targets.sdist]
packages = ["mex"]