This repository was archived by the owner on Jan 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (187 loc) · 5.96 KB
/
pyproject.toml
File metadata and controls
213 lines (187 loc) · 5.96 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "git-notes-memory"
dynamic = ["version"]
description = "Git-native, semantically-searchable memory storage for Claude Code"
readme = "README.md"
license = {text = "MIT"}
keywords = ["git", "notes", "memory", "semantic-search", "embeddings", "claude-code"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Version Control :: Git",
]
requires-python = ">=3.11"
dependencies = [
"pyyaml>=6.0.2",
"python-dotenv>=1.0.1",
"sentence-transformers>=3.0.0",
"sqlite-vec>=0.1.6",
"detect-secrets>=1.4.0",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.2",
"pytest-cov>=7.0.0",
"pytest-asyncio>=1.0.0",
"ruff>=0.14.0",
"mypy>=1.19.0",
"bandit>=1.8.0",
"pip-audit>=2.9.0",
"build>=1.2.0",
"types-PyYAML>=6.0.12",
"bump-my-version>=1.1.0",
]
[project.urls]
Homepage = "https://github.com/zircote/git-notes-memory"
Documentation = "https://github.com/zircote/git-notes-memory#readme"
Repository = "https://github.com/zircote/git-notes-memory.git"
"Bug Tracker" = "https://github.com/zircote/git-notes-memory/issues"
[project.scripts]
git-notes-memory = "git_notes_memory.main:main"
# UV/Astral dependency groups (modern tooling)
[dependency-groups]
dev = [
"pytest>=9.0.2",
"pytest-cov>=7.0.0",
"pytest-asyncio>=1.0.0",
"ruff>=0.14.0",
"mypy>=1.19.0",
"bandit>=1.8.0",
"pip-audit>=2.9.0",
"build>=1.2.0",
"types-PyYAML>=6.0.12",
"bump-my-version>=1.1.0",
]
# Hatch build configuration
[tool.hatch.version]
path = "src/git_notes_memory/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/git_notes_memory"]
[tool.hatch.build.targets.sdist]
include = ["src/git_notes_memory/**/*.py"]
# Ruff - Linting and Formatting
[tool.ruff]
target-version = "py311"
line-length = 88
src = ["src", "tests"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"S", # flake8-bandit (security)
]
ignore = [
"E501", # line length handled by formatter
"SIM108", # ternary operator - prefer explicit if/else for readability
]
[tool.ruff.lint.isort]
known-first-party = ["git_notes_memory"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S105", "S106", "S108", "S603", "S607", "ARG001", "ARG002", "B017", "E402", "F841", "SIM117"]
"src/git_notes_memory/embedding.py" = ["S101"] # assert for type narrowing
"src/git_notes_memory/git_ops.py" = ["S603", "S607"] # subprocess with validated inputs, git uses partial path
"src/git_notes_memory/index.py" = ["S608"] # SQL placeholders are safe (we generate ? only)
"src/git_notes_memory/sync.py" = ["S324", "S110", "S112"] # md5 for content hashing (not security), exception handling patterns
"src/git_notes_memory/observability/exporters/otlp.py" = ["S310"] # OTLP endpoint is user-configured via env var
# mypy - Type Checking
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_configs = true
show_error_codes = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "sentence_transformers.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sqlite_vec.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "detect_secrets.*"
ignore_missing_imports = true
# pytest - Testing
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = ["-ra", "--strict-markers", "--strict-config", "-v"]
filterwarnings = [
"error",
# SQLite connections may not be closed during test teardown due to GC timing
"ignore::pytest.PytestUnraisableExceptionWarning",
# Git version detection may fail in mocked tests
"ignore:.*git version.*:UserWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]
# Coverage
[tool.coverage.run]
source = ["src/git_notes_memory"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
fail_under = 80
# Bandit - Security
[tool.bandit]
exclude_dirs = ["tests", ".venv", "venv"]
skips = ["B101"] # assert_used OK in tests
# bump-my-version - Version Management
[tool.bumpversion]
current_version = "0.12.0"
commit = true
tag = true
tag_name = "v{new_version}"
tag_message = "Release v{new_version}"
message = "chore(release): bump version {current_version} → {new_version}"
allow_dirty = false
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
[[tool.bumpversion.files]]
filename = "src/git_notes_memory/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'
[[tool.bumpversion.files]]
filename = ".claude-plugin/plugin.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'
[[tool.bumpversion.files]]
filename = ".claude-plugin/marketplace.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'