Publish curated MobilityOps source snapshot
This commit is contained in:
commit
7adc072f5e
317 files changed
+48851
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Prevent known large modules from growing while they are incrementally decomposed."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
LINE_LIMITS = {
|
||||
"backend/app/services/data_quality.py": 900,
|
||||
"backend/app/services/data_quality_duplicate_scan.py": 150,
|
||||
"frontend/src/pages/DataQualityIssueDetail.tsx": 700,
|
||||
"frontend/src/pages/data-quality/DuplicateCustomerPanel.tsx": 250,
|
||||
}
|
||||
BYTE_LIMITS = {
|
||||
"frontend/src/styles.css": 78_000,
|
||||
"frontend/src/styles-architecture-flow.css": 9_000,
|
||||
"frontend/src/styles-data-quality.css": 8_000,
|
||||
}
|
||||
|
||||
failures: list[str] = []
|
||||
for relative, limit in LINE_LIMITS.items():
|
||||
count = len((ROOT / relative).read_text(encoding="utf-8").splitlines())
|
||||
print(f"{relative}: {count}/{limit} lines")
|
||||
if count > limit:
|
||||
failures.append(relative)
|
||||
for relative, limit in BYTE_LIMITS.items():
|
||||
count = (ROOT / relative).stat().st_size
|
||||
print(f"{relative}: {count}/{limit} bytes")
|
||||
if count > limit:
|
||||
failures.append(relative)
|
||||
|
||||
if failures:
|
||||
raise SystemExit("Source budget exceeded; extract a focused module: " + ", ".join(failures))
|
||||
Reference in new issue
Block a user