-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
217 lines (191 loc) · 6.14 KB
/
pyproject.toml
File metadata and controls
217 lines (191 loc) · 6.14 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
214
215
216
217
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# ---------------------------------------------------------------------------
# Project metadata
# ---------------------------------------------------------------------------
[project]
name = "contextgo"
dynamic = ["version"]
description = "Local-first context & memory runtime for multi-agent AI coding teams"
readme = "README.md"
license = "AGPL-3.0-only"
requires-python = ">=3.10"
authors = [
{ name = "Dunova", email = "contact@dunova.io" },
]
maintainers = [
{ name = "Dunova", email = "contact@dunova.io" },
]
keywords = [
"ai",
"context",
"memory",
"local-first",
"developer-tools",
"multi-agent",
"llm",
"coding-assistant",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Build Tools",
"Topic :: System :: Logging",
"Topic :: Utilities",
"Typing :: Typed",
]
# Core runtime has zero mandatory third-party dependencies.
# httpx is available as an optional extra for remote sync paths.
dependencies = []
[project.optional-dependencies]
remote = ["httpx>=0.27"]
vector = ["model2vec>=0.4.0", "bm25s>=0.2.0", "numpy>=1.24"]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-asyncio>=0.23",
"ruff>=0.4",
"bandit>=1.8",
"safety>=3.3",
"mypy>=1.10",
"numpy>=1.24",
"build>=1.2",
"twine>=5.0",
]
all = [
"contextgo[remote]",
"contextgo[vector]",
]
[project.scripts]
contextgo = "contextgo.context_cli:main"
[project.urls]
Homepage = "https://github.com/dunova/ContextGO"
Documentation = "https://github.com/dunova/ContextGO/tree/main/docs"
Repository = "https://github.com/dunova/ContextGO"
"Bug Tracker" = "https://github.com/dunova/ContextGO/issues"
Changelog = "https://github.com/dunova/ContextGO/blob/main/.github/CHANGELOG.md"
Security = "https://github.com/dunova/ContextGO/blob/main/.github/SECURITY.md"
# ---------------------------------------------------------------------------
# Hatch — version and build
# ---------------------------------------------------------------------------
[tool.hatch.version]
path = "VERSION"
pattern = "(?P<version>[0-9]+\\.[0-9]+\\.[0-9]+.*)"
[tool.hatch.build.targets.wheel]
packages = ["src/contextgo"]
exclude = [
"**/__pycache__",
"**/*.pyc",
"**/import_memories.py",
]
[tool.hatch.build.targets.wheel.force-include]
"src/contextgo/py.typed" = "contextgo/py.typed"
"src/contextgo/data/noise_markers.json" = "contextgo/data/noise_markers.json"
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/scripts",
"/native",
"/docs",
"/docs/benchmarks",
"/docs/templates",
"/VERSION",
"/README.md",
"/.github/CHANGELOG.md",
"/.github/CONTRIBUTING.md",
"/.github/SECURITY.md",
"/LICENSE",
]
# ---------------------------------------------------------------------------
# Ruff — linter and formatter
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM", "C4", "PIE", "RET", "TID"]
ignore = [
"E501", # line length — enforced via formatter, not linter
]
unfixable = ["B"] # keep B-violations visible; fix manually
[tool.ruff.lint.per-file-ignores]
"tests/test_*.py" = ["SIM117", "SIM105", "E741", "E402"]
[tool.ruff.lint.isort]
known-first-party = ["contextgo"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = [
"--cov=src/contextgo",
"--cov-report=term-missing",
"--cov-report=xml",
"--cov-fail-under=97",
"-v",
]
# ---------------------------------------------------------------------------
# Coverage
# ---------------------------------------------------------------------------
[tool.coverage.run]
source = ["src/contextgo"]
omit = ["tests/test_*.py", "tests/*_test.py", "src/contextgo/__main__.py"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = false
precision = 1
fail_under = 86
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
]
exclude_also = [
# Dual-import fallback pattern: try bare import, fallback to relative
"except ImportError:",
"from \\. import",
]
# ---------------------------------------------------------------------------
# Bandit — security scanner
# ---------------------------------------------------------------------------
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101", "B310", "B311", "B404", "B603", "B607", "B608"]
# B101: assert; B310: url open; B311: random (non-crypto); B404: subprocess import
# B603: subprocess w/o shell; B607: partial path; B608: SQL string (parameterized ?)
# ---------------------------------------------------------------------------
# Mypy
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.10"
strict = false
warn_return_any = false
warn_unused_ignores = false
ignore_missing_imports = true
disable_error_code = ["no-redef", "assignment", "attr-defined", "operator", "misc", "return-value"]