-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (135 loc) · 3.87 KB
/
Copy pathpyproject.toml
File metadata and controls
149 lines (135 loc) · 3.87 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
[project]
name = "slopmortem"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
"openai>=2.33",
"qdrant-client>=1.17.1",
"fastembed>=0.8",
"pydantic>=2.13",
"pydantic-settings>=2.14",
"typer>=0.25",
"trafilatura>=2.0",
"readability-lxml>=0.8.4",
"tldextract>=5.3",
"jsonref>=1.1",
"jinja2>=3.1",
"tiktoken>=0.12",
"lmnr>=0.7",
"anyio>=4.13",
"httpx>=0.28",
"python-frontmatter>=1.1",
"pyyaml>=6.0",
"tavily-python>=0.7",
"uuid7>=0.1",
"python-dateutil>=2.9",
]
[project.scripts]
slopmortem = "slopmortem.cli:app"
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["slopmortem*"]
[dependency-groups]
dev = [
"pytest>=9",
"pytest-asyncio>=1.3",
"pytest-cov>=7.0",
"pytest-recording>=0.13",
"pytest-xdist>=3.8",
"syrupy>=5.1",
"jsonschema>=4.26",
"ruff>=0.15",
"basedpyright>=1.39",
"import-linter>=2.4",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = "-ra"
markers = [
"requires_qdrant: needs a live Qdrant on localhost:6333",
"slow: loads heavy assets (e.g. the ~550MB ONNX model). Skip with -m 'not slow'.",
]
[tool.ruff]
line-length = 100
target-version = "py313"
extend-exclude = ["external"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Owned by `ruff format`
"W191",
"E111", "E114", "E117",
"D206", "D300",
"Q000", "Q001", "Q002", "Q003",
"COM812", "COM819",
"ISC001", "ISC002",
# Mutually exclusive pairs — pick one
"D203", # vs D211
"D213", # vs D212
# "Missing docstring" requirements: per CLAUDE.md, docstrings should explain
# *why*, not exist as a checkbox. Style rules (D2xx-D4xx) still enforce
# consistency when a docstring is present.
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107",
# Pointless to enforce
"CPY001", # copyright header on every file
# TD003 still enforces "TODO needs an issue link"; the meta "you have a TODO"
# warning is noise for things we've parked deliberately.
"FIX002",
# `Any` is intentional for SDK passthroughs and Jinja contexts; basedpyright's
# `reportAny` is the real gate (each site carries `# pyright: ignore[reportAny]`).
"ANN401",
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"S101", # assert is the point in tests
"PLR2004", # magic numbers OK in tests
"ANN", # annotations not required
"D", # docstrings not required
"SLF001", # tests poke private attrs
"ARG", # unused fixture args are common
"INP001", # tests/ is not a package
"ASYNC240", # blocking Path I/O is fine in async setup
]
"conftest.py" = ["ANN", "D", "INP001"]
"scripts/**" = [
"T201", # scripts print to stdout
"INP001", # scripts/ is not a package
]
[tool.ruff.lint.flake8-type-checking]
# Pydantic needs annotation classes at runtime for model_rebuild() / json schema
# generation. Don't shuffle them into TYPE_CHECKING.
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
runtime-evaluated-decorators = ["pydantic.validate_call"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 5
max-branches = 12
max-returns = 6
max-statements = 50
[tool.basedpyright]
include = ["slopmortem", "tests"]
extraPaths = ["."]
pythonVersion = "3.13"
typeCheckingMode = "strict"
reportAny = "error"
reportExplicitAny = "error"
reportImplicitOverride = "error"
reportUnreachable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportImplicitStringConcatenation = "error"
reportMissingTypeStubs = false
[[tool.basedpyright.executionEnvironments]]
root = "tests"
reportMissingParameterType = false
reportUnknownParameterType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownMemberType = false
reportAny = false
reportExplicitAny = false
reportPrivateUsage = false # tests poke private helpers; mirrors SLF001 above