-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
195 lines (165 loc) · 5.53 KB
/
pyproject.toml
File metadata and controls
195 lines (165 loc) · 5.53 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "document-mcp"
version = "0.0.4"
authors = [
{ name="clchinkc" },
]
description = "A MCP server for managing structured Markdown documents"
readme = "README.md"
requires-python = ">=3.10"
keywords = ["mcp", "document", "management"]
license = "MIT"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
# Core MCP framework
"mcp[cli]>=1.0.0",
"python-dotenv>=1.0.0",
# Web framework for OpenTelemetry metrics collection
"fastapi>=0.95.0",
"uvicorn[standard]>=0.21.0",
# AI and ML dependencies
"pydantic-ai>=0.0.14",
"google-genai>=1.0.0",
"openai",
"numpy>=1.24.0",
# HTTP client
"requests>=2.28.0",
# OpenTelemetry stack for automatic usage analytics
"prometheus-client>=0.17.0",
"opentelemetry-api>=1.21.0",
"opentelemetry-sdk>=1.21.0",
"opentelemetry-instrumentation>=0.42b0",
"opentelemetry-exporter-prometheus>=0.55b0",
"opentelemetry-exporter-otlp-proto-grpc>=1.35.0",
"opentelemetry-instrumentation-fastapi>=0.42b0",
"opentelemetry-instrumentation-requests>=0.42b0",
"python-snappy>=0.7.3",
]
[project.optional-dependencies]
server = [
# OAuth 2.1 hosted server dependencies
"google-auth>=2.34.0", # Google OAuth token verification
"redis>=5.0.0", # Session and token storage
]
gcp-observability = [
# Google Cloud native observability (optional, for Cloud Run deployment)
"google-cloud-logging>=3.0.0",
"opentelemetry-exporter-gcp-trace>=1.6.0",
"opentelemetry-exporter-gcp-monitoring>=1.6.0",
"opentelemetry-propagator-gcp>=1.6.0",
]
dev = [
# Core testing framework
"pytest>=7.3.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"pytest-env>=0.5.2",
"pytest-xdist>=3.7.0", # Parallel test execution
"pytest-timeout>=2.1.0", # Test timeout protection
"pytest-benchmark>=4.0.0", # Performance benchmarking
# Code quality and formatting
"ruff>=0.1.0",
"mypy>=1.0.0",
# Performance monitoring
"memory-profiler>=0.60.0", # For memory profiling tests
"psutil>=5.9.0", # For system resource monitoring
# DSPy for prompt optimization
"dspy>=2.5.0",
# Development utilities (agents run separately from source)
]
[project.urls]
"Homepage" = "https://github.com/document-mcp/document-mcp"
"Bug Tracker" = "https://github.com/document-mcp/document-mcp/issues"
[project.scripts]
"document-mcp" = "document_mcp.doc_tool_server:main"
[tool.setuptools]
packages = [
"document_mcp",
"document_mcp.config",
"document_mcp.models",
"document_mcp.tools",
"document_mcp.utils"
]
[tool.setuptools.package-data]
document_mcp = ["*.ini"]
# Ruff configuration
[tool.ruff]
line-length = 110
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class (Pydantic Config)
"D107", # Missing docstring in __init__
"D205", # Blank line required between summary and description (too strict for our docstrings)
"D212", # Multi-line docstring summary placement (conflicts with D213)
"E501", # Line too long (managed manually for readability in docstrings/prompts)
"E722", # Bare except (used in error handling patterns)
"SIM105", # contextlib.suppress (sometimes try-except is clearer)
"SIM108", # Ternary operator (sometimes if-else is clearer)
]
[tool.ruff.lint.per-file-ignores]
"**/prompts.py" = ["E501"] # Prompt files need long strings
"**/tool_descriptions.py" = ["E501"] # Tool descriptions need long strings
"**/prompt_components.py" = ["E501"] # Prompt components need long strings
"server.py" = ["B904"] # Exception chaining not always appropriate
"prompt_optimizer/*.py" = ["B904"] # Exception chaining not always appropriate
"tests/**/*.py" = ["B904", "SIM117", "D417"] # Test files have different conventions
"src/agents/simple_agent/main.py" = ["E402"] # Import order due to logging setup
"src/agents/simple_agent/agent.py" = ["B904"] # Exception chaining in timeout handling
"src/agents/shared/agent_base.py" = ["B027"] # Empty __aexit__ is intentional
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["document_mcp", "src"]
force-single-line = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# MyPy configuration (kept for advanced type checking)
[tool.mypy]
python_version = "3.10"
exclude = "build/"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[dependency-groups]
dev = [
"mypy>=1.17.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.1.0",
]