Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (162 loc) · 4.43 KB
/
Copy pathpyproject.toml
File metadata and controls
179 lines (162 loc) · 4.43 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
173
174
175
176
177
178
179
[project]
name = "price-predictor"
version = "0.1.0"
description = "End-to-end MLOps pipeline for predicting Polish real estate prices from Otodom listings."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.12,<3.13"
authors = [{ name = "PricePredictor" }]
keywords = ["mlops", "real-estate", "machine-learning", "otodom"]
classifiers = [
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Private :: Do Not Upload",
]
dependencies = [
# --- config & runtime contracts ---
"pydantic>=2.9,<3",
"pydantic-settings>=2.5,<3",
"structlog>=24.4",
"hydra-core>=1.3,<2",
# --- data ---
"scrapy>=2.12",
"scrapy-playwright>=0.0.40",
"playwright>=1.48",
"polars>=1.12",
"duckdb>=1.1",
"pandera[polars]>=0.20",
"dvc[s3]>=3.55",
"kaggle>=1.6",
"psycopg[binary]>=3.2",
# --- ml ---
"numpy>=2.0",
"pandas>=2.2",
"scipy>=1.13",
"scikit-learn>=1.5",
"xgboost>=2.1",
"lightgbm>=4.5",
"catboost>=1.2",
"optuna>=4.0",
"shap>=0.46",
# Floor the JIT stack: shap pulls numba transitively and the resolver
# otherwise backtracks to numba 0.53 (no Python 3.12 wheels / support).
"numba>=0.60",
"llvmlite>=0.43",
"mlflow>=2.17",
# --- serving ---
"fastapi>=0.115",
"uvicorn[standard]>=0.32",
"streamlit>=1.39",
# --- monitoring ---
"evidently>=0.4.30",
"prometheus-client>=0.21",
]
[project.urls]
Repository = "https://github.com/your-org/price-predictor"
[project.scripts]
price-predictor = "price_predictor.__main__:main"
[dependency-groups]
dev = [
"ruff>=0.7",
"mypy>=1.13",
"pytest>=8.3",
"pytest-cov>=5.0",
"pre-commit>=4.0",
"httpx>=0.27",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/price_predictor"]
# ---------------------------------------------------------------------------
# Ruff: linter + formatter
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
extend-exclude = ["notebooks"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T20", # flake8-print
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"RUF", # ruff-specific
"D", # pydocstyle
"ANN", # flake8-annotations
]
ignore = [
"D203", # 1 blank line before class docstring (conflicts with D211)
"D213", # multi-line summary on second line (conflicts with D212)
"D107", # __init__ documented in the class docstring (Google style)
"ANN401", # allow typing.Any where deliberately needed
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D", "ANN"]
"notebooks/**/*.py" = ["D", "ANN", "T20"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["price_predictor"]
[tool.ruff.format]
docstring-code-format = true
# ---------------------------------------------------------------------------
# mypy: strict static typing
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
show_error_codes = true
pretty = true
files = ["src"]
# Third-party libraries that ship no type information.
[[tool.mypy.overrides]]
module = [
"scrapy.*",
"parsel.*",
"mlflow.*",
"shap.*",
"xgboost.*",
"lightgbm.*",
"catboost.*",
"evidently.*",
"hydra.*",
"omegaconf.*",
"duckdb.*",
"sklearn.*",
"scipy.*",
"optuna.*",
"pandera.*",
]
ignore_missing_imports = true
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
addopts = "-ra --strict-markers --strict-config"
markers = [
"integration: tests that exercise external systems (db, network, docker)",
]
[tool.coverage.run]
branch = true
source = ["src/price_predictor"]
[tool.coverage.report]
show_missing = true
skip_covered = true