-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (117 loc) · 4.59 KB
/
pyproject.toml
File metadata and controls
135 lines (117 loc) · 4.59 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
[project]
name = "couchbase-mcp-server"
version = "0.9.0"
description = "Couchbase MCP Server — full data-plane and admin REST API as MCP tools"
readme = "README.md"
requires-python = ">=3.10,<3.15"
license = "MIT"
authors = [
{ name = "Chris Ahrendt", email = "celticht32@github.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Topic :: Database",
]
dependencies = [
"mcp>=1.0.0",
"couchbase>=4.4.0,<5.0.0",
]
[project.optional-dependencies]
http = [
"uvicorn>=0.27",
"starlette>=0.35",
]
dev = [
"ruff==0.12.5",
"pre-commit==4.2.0",
"pytest==9.0.3",
"pytest-asyncio==1.3.0",
"pytest-cov>=7.0.0",
# tomllib is stdlib on 3.11+; tomli is the same library, used as a fallback on 3.10
"tomli>=2.0.0 ; python_version < '3.11'",
]
[project.urls]
Homepage = "https://github.com/celticht32/MCP-Couchbase"
Issues = "https://github.com/celticht32/MCP-Couchbase/issues"
[project.scripts]
couchbase-mcp-server = "server:main"
# ── Ruff ─────────────────────────────────────────────────────────────────────
[tool.ruff]
line-length = 88
target-version = "py310"
include = ["**/*.py"]
exclude = [
".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg",
".ipynb_checkpoints", ".mypy_cache", ".nox", ".pants.d", ".pyenv",
".pytest_cache", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv",
"__pypackages__", "_build", "buck-out", "build", "dist",
"node_modules", "site-packages", "venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"N", # pep8-naming
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"PL", # Pylint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long (handled by formatter)
"PLR0913", # Too many arguments
"PLR2004", # Magic value used in comparison
"PLR0911", # Too many return statements (expected in dispatch functions)
"PLR0912", # Too many branches (expected in dispatch functions)
"PLR0915", # Too many statements (expected in dispatch functions)
"PLC0415", # Import not at top-level (intentional: lazy imports for optional deps)
"PLW0603", # Using global statement (intentional: lazy connection pool)
"PLW2901", # Loop variable overwritten (acceptable in our parsing helpers)
"N806", # Variable in function should be lowercase (SQL++ variables)
"N803", # Argument name should be lowercase (QueryOptions pass-through pattern)
"N812", # Lowercase imported as non-lowercase (SDK subdocument as SD)
"B904", # Use raise...from (minor; will fix in follow-up)
"B007", # Loop variable not used (minor; will fix in follow-up)
"SIM102", # Nested if (intentional readability choice in filter function)
"SIM117", # Nested with (intentional: async context manager nesting)
"RUF022", # __all__ is not sorted
"UP038", # Deprecated in ruff 0.10, removed in 0.13. The tuple form
# isinstance(x, (A, B)) is actually ~2x faster than X | Y on
# CPython 3.10-3.12, so the tuple form is preferred. Pinned
# ruff 0.12.5 still emits it; explicit ignore is the fix.
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["PLR2004", "N802"]
"**/config.py" = ["N802"]
[tool.ruff.lint.isort]
known-first-party = ["handlers"]
split-on-trailing-comma = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# ── Pytest ────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
# ── Build ─────────────────────────────────────────────────────────────────────
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["handlers"]
[tool.hatch.build.targets.wheel.force-include]
"server.py" = "server.py"
[tool.uv]
package = true