-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (158 loc) · 4.95 KB
/
pyproject.toml
File metadata and controls
172 lines (158 loc) · 4.95 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 = "chapkit"
version = "0.1.0"
description = "Async SQLAlchemy database library for Python 3.13+ with FastAPI integration and ML workflow support"
readme = "README.md"
authors = [{ name = "Morten Hansen", email = "morten@winterop.com" }]
license = { text = "AGPL-3.0-or-later" }
requires-python = ">=3.13"
keywords = [
"fastapi",
"sqlalchemy",
"async",
"database",
"ml",
"machine-learning",
"rest-api",
"crud",
"vertical-slice",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Framework :: FastAPI",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Database",
]
dependencies = [
"aiosqlite>=0.21.0",
"alembic>=1.17.0",
"fastapi[standard]>=0.119.0",
"geojson-pydantic>=2.1.0",
"gunicorn>=23.0.0",
"opentelemetry-api>=1.37.0",
"opentelemetry-exporter-prometheus>=0.58b0",
"opentelemetry-instrumentation-fastapi>=0.58b0",
"opentelemetry-instrumentation-sqlalchemy>=0.58b0",
"opentelemetry-sdk>=1.37.0",
"pandas>=2.3.3",
"pydantic>=2.12.0",
"python-ulid>=3.1.0",
"scikit-learn>=1.7.2",
"sqlalchemy[asyncio]>=2.0.43",
"structlog>=24.4.0",
]
[project.urls]
Homepage = "https://github.com/winterop-com/chapkit"
Repository = "https://github.com/winterop-com/chapkit"
Issues = "https://github.com/winterop-com/chapkit/issues"
Documentation = "https://github.com/winterop-com/chapkit#readme"
[dependency-groups]
dev = [
"coverage[toml]>=7.6.0",
"mypy>=1.18.2",
"pandas-stubs>=2.2.3.250101",
"pytest>=8.4.2",
"pytest-cov>=5.0.0",
"pytest-asyncio>=1.2.0",
"ruff>=0.14.0",
"pyright>=1.1.406",
"scikit-learn>=1.7.2",
"mkdocs-material>=9.6.21",
"mkdocstrings>=0.30.1",
"mkdocstrings-python>=1.18.2",
]
[build-system]
requires = ["uv_build>=0.9.0,<0.10.0"]
build-backend = "uv_build"
[tool.ruff]
target-version = "py313"
line-length = 120
[tool.ruff.lint]
fixable = ["ALL"]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"D", # pydocstyle (docstring checking)
]
ignore = [
"D203", # one-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Tests don't need docstrings
"tests/**/*.py" = ["D"]
# Alembic migrations are autogenerated
"alembic/**/*.py" = ["D"]
# Allow missing docstrings in __init__ files if they're just exports
"**/__init__.py" = ["D104"]
# Internal source - allow some missing docstrings for now
"src/**/*.py" = [
"D102", # Missing docstring in public method (TODO: fix gradually)
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__ (TODO: fix gradually)
]
# Examples must have all docstrings (strictest enforcement)
"examples/**/*.py" = []
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
norecursedirs = ["examples", ".git", ".venv", "__pycache__"]
filterwarnings = [
"ignore:Pydantic serializer warnings:UserWarning",
"ignore:Remove.*format_exc_info.*:UserWarning",
]
[tool.coverage.run]
branch = true
dynamic_context = "test_function"
relative_files = true
source = ["chapkit"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
precision = 2
show_missing = true
skip_covered = true
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
warn_unused_ignores = true
strict_equality = true
mypy_path = ["src", "typings"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[tool.pyright]
include = ["src", "tests", "examples", "alembic"]
pythonVersion = "3.13"
typeCheckingMode = "strict"
diagnosticMode = "workspace"
useLibraryCodeForTypes = true
reportPrivateUsage = false # Tests need to access protected members
reportUnusedFunction = false # Decorated functions (pytest fixtures, routes) flagged incorrectly
reportUnusedTypeParameters = true # Catch unused type parameters in generic classes
reportUnknownMemberType = false # Third-party libraries (pandas) have incomplete stubs
reportUnknownArgumentType = false # Related to third-party stub issues
reportUnknownParameterType = false # Test helpers don't need full annotations
reportUnknownVariableType = false # Related to third-party stub issues
reportMissingTypeArgument = false # Allow dict without type args in tests
reportMissingTypeStubs = false # Third-party libraries (OpenTelemetry) missing stubs