forked from mcaln/mega-brain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
121 lines (109 loc) · 3.66 KB
/
pyproject.toml
File metadata and controls
121 lines (109 loc) · 3.66 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "mega-brain"
version = "1.4.0"
requires-python = ">=3.11"
dependencies = [
"PyYAML>=6.0,<7.0",
]
[project.optional-dependencies]
pipeline = [
"PyYAML>=6.0,<7.0",
]
speakers = [
"pyannote.audio>=3.1.0",
"torch>=2.0.0,<3.0.0",
"torchaudio>=2.0.0,<3.0.0",
"numpy>=1.24.0",
"scipy>=1.10.0",
"assemblyai>=0.28.0",
]
rag = [
"voyageai>=0.3.0",
"rank-bm25>=0.2.2",
]
vectordb = [
"chromadb>=1.0.0",
]
extractors = [
"pymupdf>=1.24.0",
"mammoth>=1.8.0",
]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.8",
"pyright>=1.1",
]
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["core", ".claude/hooks"]
exclude = [
"core/intelligence/pipeline/read_ai_*.py",
]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "SIM", "RUF"]
ignore = [
"E501", # line too long — handled by formatter
"UP007", # Use X | Y for union — keep Optional for 3.11 compat
"UP035", # deprecated typing imports — existing codebase pattern
"RUF013", # implicit-optional — existing codebase pattern, fix gradually
"SIM102", # collapsible-if — readability preference
"SIM108", # if-else-block-instead-of-if-exp — readability preference
"SIM110", # reimplemented-builtin — clarity over brevity
"SIM103", # needless-bool — clarity preference
"SIM105", # suppressible-exception — explicit try/except is clearer
"SIM116", # if-else-block-instead-of-dict-lookup — readability
"SIM117", # nested with statements — readability preference
"B007", # unused loop variables — common with os.walk patterns
"B023", # loop variable binding — existing patterns
"B904", # raise from exceptions — fix gradually
"B905", # zip without strict — existing pattern
"N806", # uppercase variable in function — constant-like naming
]
[tool.ruff.lint.isort]
known-first-party = ["core"]
[tool.ruff.lint.per-file-ignores]
".claude/hooks/*" = ["E722", "F401", "RUF001"] # hooks: bare except, re-exports, unicode emoji
"core/intelligence/speakers/*" = ["F401"] # conditional imports for optional GPU deps
"core/intelligence/pipeline/read_ai_*" = ["E999"] # special syntax files
"core/intelligence/entities/*" = ["RUF001"] # unicode chars in business domain strings
"core/intelligence/pipeline/extractors/*" = ["RUF001"] # unicode chars in HTML entity decoding
"core/intelligence/pipeline/autonomous_processor.py" = ["N818"] # legacy exception name
"core/intelligence/rag/evaluator.py" = ["RUF034"] # useless if-else in demo code
"core/intelligence/pipeline/mce/cli.py" = ["E402"] # imports after sys.path manipulation
"core/intelligence/validation/*" = ["F841"] # unused variables in validation logic
"tests/*" = ["E402", "F841", "RUF059"] # test files: imports, fixtures, unpacked vars
[tool.ruff.format]
quote-style = "double"
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "basic"
include = ["core"]
exclude = [
".claude/hooks",
"**/__pycache__",
"core/intelligence/pipeline/read_ai_*.py",
]
[tool.pytest.ini_options]
testpaths = ["tests/python"]
python_files = "test_*.py"
python_functions = "test_*"
addopts = "-v --tb=short"
markers = [
"unit: Fast isolated tests (no filesystem, no network)",
"integration: Tests that touch filesystem or state files",
"e2e: End-to-end pipeline tests",
"slow: Tests that take >5s",
]
[tool.coverage.run]
source = ["core/intelligence"]
omit = ["*/__pycache__/*", "*/__init__.py"]
[tool.coverage.report]
fail_under = 9
show_missing = true
[tool.setuptools.packages.find]
include = ["core*"]