-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (118 loc) · 3.13 KB
/
pyproject.toml
File metadata and controls
130 lines (118 loc) · 3.13 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
[project]
name = "obsidian-graph"
version = "1.0.0"
description = "Semantic knowledge graph engine for markdown vaults"
requires-python = ">=3.11"
dependencies = [
"mcp>=1.0.0",
"asyncpg>=0.29.0",
"pgvector>=0.3.0",
"voyageai>=0.3.0",
"watchdog>=4.0.0",
"loguru>=0.7.2",
"python-dotenv>=1.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"black",
"ruff",
"mypy",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
markers = [
"e2e: marks tests as end-to-end Docker tests (run with '-m e2e')",
"stress: marks tests as stress tests (deselect with '-m \"not stress\"')",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.coverage.run]
source = ["src"]
omit = [
"tests/*",
"scripts/diagnose_vault.py", # Diagnostic utility, not core functionality
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == '__main__':",
"if TYPE_CHECKING:",
"@abstractmethod",
]
precision = 2
show_missing = true
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"S", # flake8-bandit (security)
"T20", # flake8-print (no print statements)
]
ignore = [
"E501", # line too long (handled by formatter)
"S101", # assert used (allowed in tests)
"S311", # pseudo-random generator (we use secrets where needed)
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S106", "T201", "S108", "B007", "F841", "E402"] # Allow assert, passwords, print, /tmp, unused vars, non-top imports in tests
"scripts/*" = ["T201", "S108"] # CLI scripts use print() and /tmp paths
[tool.black]
line-length = 100
target-version = ["py311"]
include = '\.pyi?$'
extend-exclude = '''
/(
\.eggs
| \.git
| \.venv
| build
| dist
| __pycache__
)/
'''
[tool.mypy]
python_version = "3.11"
# Gradual adoption - relaxed settings for existing code
disallow_untyped_defs = false
check_untyped_defs = false
warn_return_any = false
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = false
strict_optional = false
show_error_codes = true
pretty = true
# Disable error codes for gradual adoption (enable as codebase is typed)
disable_error_code = ["var-annotated", "arg-type", "assignment", "call-overload", "return-value", "attr-defined"]
[[tool.mypy.overrides]]
module = "src.validation"
disallow_untyped_defs = true
disallow_any_unimported = true
warn_return_any = true
[[tool.mypy.overrides]]
module = "src.security_utils"
disallow_untyped_defs = true
disallow_any_unimported = true
warn_return_any = true
[[tool.mypy.overrides]]
module = ["watchdog.*", "voyageai.*", "pgvector.*", "mcp.*", "loguru.*"]
ignore_missing_imports = true