-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
114 lines (101 loc) · 4.36 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
[project]
name = "mex-model"
version = "3.3.2"
description = "JSON schema files defining the MEx metadata model."
authors = [{ name = "MEx Team", email = "[email protected]" }]
readme = { file = "README.md", content-type = "text/markdown" }
license = { file = "LICENSE" }
urls = { Repository = "https://github.com/robert-koch-institut/mex-model" }
requires-python = ">=3.11,<3.13"
dependencies = []
optional-dependencies.dev = [
"ipdb>=0.13,<1",
"mypy>=1,<2",
"ruff>=0.7,<1",
"sphinx-jsonschema>=1,<2",
"sphinx>=8.1,<9"
]
[tool.cruft]
template = "https://github.com/robert-koch-institut/mex-template"
skip = ["CHANGELOG.md", "mex", "tests"]
[tool.ipdb]
context = 5
[tool.pdm]
distribution = true
[tool.pdm.scripts]
update-all = { cmd = "pdm update --group :all --update-all --save-compatible" }
lock-all = { cmd = "pdm lock --group :all --refresh" }
install-all = { cmd = "pdm install --group :all --no-editable --frozen-lockfile" }
export-all = { cmd = "pdm export --group :all --no-hashes -f requirements" }
sphinx = { cmd = "pdm run sphinx-build -aE -b dirhtml docs docs/dist" }
doc = { composite = ["sphinx"] }
wheel = { cmd = "pdm build --no-sdist" }
lint = { cmd = "pre-commit run --all-files" }
all = { composite = ["install-all", "lint", "doc"] }
[tool.pydantic-mypy]
warn_untyped_fields = true
[tool.ruff]
fix = true
line-length = 88
show-fixes = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
ignore = [
"AIR", # Disable airflow specific rules (we are not using airflow)
"ANN", # Disable all annotations checks (handled by mypy)
"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 and speed)
"D104", # Allow missing package docstring (for brevity and speed)
"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)
"DJ", # Disable django specific checks (we are not using django)
"FBT", # Disable boolean type hint checks (for more flexibility)
"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)
"PTH123", # Allow using builtin open method (simpler than pathlib)
"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]
"docs/**" = [
"INP001", # Docs folder does not need to be a package
"SLF001", # Allow accessing private members to customize extensions
]
"scripts/**" = [
"INP001", # Scripts folder does not need to be a package
]
"tests/**" = [
"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
"ISC", # Allow implicitly concatenated strings
"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.isort]
known-first-party = ["mex", "tests"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[build-system]
requires = ["pdm-backend==2.4.3"]
build-backend = "pdm.backend"