-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (72 loc) · 3.26 KB
/
Copy pathpyproject.toml
File metadata and controls
81 lines (72 loc) · 3.26 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
[project]
name = "ledgerlens-data"
version = "0.2.0"
description = "Data ingestion, fraud-detection engine, and feature pipeline for LedgerLens"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
# Tests intentionally import after dependency probes/path setup and assert broad
# third-party failure contracts in a few compatibility cases.
"tests/**" = ["B017", "B904", "E402"]
"examples/**" = ["E402"]
"*.ipynb" = ["E402"]
[tool.black]
line-length = 100
target-version = ["py311", "py312"]
[tool.mypy]
python_version = "3.11"
strict_optional = true
warn_return_any = true
ignore_missing_imports = true
warn_unused_ignores = true
# Modules covered by the static analysis gate (issue #545)
# Run with: python scripts/static_analysis_gate.py
# or: mypy detection ingestion streaming ci_metrics benchmarks utils
# ---------------------------------------------------------------------------
# bandit — security linting (issue #545)
# ---------------------------------------------------------------------------
[tool.bandit]
# Exclude test files and vendored scripts from the security scan
exclude_dirs = ["tests", "scripts"]
# Skip B101 (assert statements) — used in test helpers that may be imported
skips = ["B101"]
# ---------------------------------------------------------------------------
# radon — complexity analysis (issue #545)
# ---------------------------------------------------------------------------
# Run via: python scripts/static_analysis_gate.py --complexity-max 10
# Or: radon cc detection/ ingestion/ --min C --show-complexity
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
markers = [
"integration: marks tests as live Testnet integration tests (deselect with '-m not integration')",
"slow: marks tests that run PPO training (deselect with '-m not slow')",
"concurrency: concurrency validation tests for streaming workers (included by default)",
]
# ---------------------------------------------------------------------------
# mutmut — mutation testing configuration
# ---------------------------------------------------------------------------
# Run with: make mutation-test
# Or manually: mutmut run --paths-to-mutate detection/benford_engine.py,...
# ---------------------------------------------------------------------------
[tool.mutmut]
# Limit mutation scope to the core scoring path — keeps CI runtime under 15 min.
# detection/model_inference.py is intentionally excluded here: it has heavy
# integration fixtures (train_models, tmp_path_factory) that make mutmut's
# subprocess-based runner very slow. The Makefile target passes it explicitly
# via --paths-to-mutate instead so we can time-box it separately.
paths_to_mutate = "detection/benford_engine.py"
tests_dir = "tests/"
# Run only the fast unit tests during mutation (skip integration + slow marks)
runner = "python -m pytest -x -q --timeout=30 -m 'not integration and not slow' tests/test_benford.py tests/test_benford_ci.py"
# Do not mutate import blocks, type annotations, or docstrings
dict_synonyms = ""
# Avoid mutating auto-generated files or vendored code
exclude_list = "tests/,scripts/,data/"