-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (69 loc) · 2.8 KB
/
Copy pathpyproject.toml
File metadata and controls
77 lines (69 loc) · 2.8 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
[project]
name = "churn-intelligence-platform"
version = "0.1.0"
description = "Production-quality subscription analytics: churn prediction, CLV modeling, cohort analysis, and AI-generated insights"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "FomkaHamilton" }]
keywords = ["churn", "subscription", "analytics", "machine-learning", "clv", "forecasting"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Office/Business :: Financial",
]
# ── Ruff (linting + formatting) ───────────────────────────────────────────────
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "SIM", "RUF"]
ignore = [
"E501", # line length handled by formatter
"B008", # do not perform calls in default args (Pydantic validators need this)
"RUF012", # mutable class attrs — fine in Pydantic models
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101", "ANN"] # assert and missing annotations OK in tests
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ── Mypy (type checking) ──────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.11"
strict = true
ignore_missing_imports = true
warn_return_any = true
warn_unused_configs = true
exclude = ["tests/", "notebooks/", "data/"]
# ── Pytest ────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --cov=src --cov-report=term-missing --cov-report=xml"
# ── Coverage ──────────────────────────────────────────────────────────────────
[tool.coverage.run]
source = ["src"]
omit = [
"tests/*",
"*/migrations/*",
"*/__init__.py",
"src/pages/*",
"src/visualization/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@abstractmethod",
]
fail_under = 80