-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
354 lines (317 loc) · 8.26 KB
/
pyproject.toml
File metadata and controls
354 lines (317 loc) · 8.26 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
[build-system]
requires = [
"uv-build>=0.9.28,<0.10",
]
build-backend = "uv_build"
[project]
name = "mcp-learning"
version = "0.2.0"
description = "Exploring different features of MCP servers and clients"
readme = { file = "README-pypi.md", content-type = "text/markdown" }
requires-python = ">=3.13,<3.14"
license = "AGPL-3.0-or-later"
authors = [
{ name = "Anirban Ray", email = "39331844+yarnabrina@users.noreply.github.com" }
]
maintainers = [
{ name = "Anirban Ray", email = "39331844+yarnabrina@users.noreply.github.com" }
]
keywords = [
"mcp",
"mcp-server",
"mcp-client",
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"mcp>=1.26.0,<2",
"openai>=2.16.0,<3",
"pydantic>=2.12.5,<3",
"pydantic-settings>=2.12.0,<3",
"rich>=14.3.1,<15",
]
[project.optional-dependencies]
cli = [
"prompt-toolkit>=3.0.52,<4",
]
monitoring = [
"langfuse>=3.12.1,<4",
]
[dependency-groups]
dev = [
"pip>=26.0",
"pre-commit>=4.5.1,<5",
{ include-group = "docs" },
{ include-group = "format" },
{ include-group = "lint" },
]
docs = [
"mkdocs>=1.6.1,<2",
"mkdocs-material>=9.7.1,<10",
"Pygments>=2.19.2,<3",
]
format = [
"black>=26.1.0,<27",
"ruff>=0.14.14,<1",
]
lint = [
"pylint>=4.0.4,<5",
"ruff>=0.14.14,<1",
]
[project.urls]
source = "https://github.com/yarnabrina/learn-model-context-protocol"
documentation = "https://yarnabrina.github.io/learn-model-context-protocol/"
[project.scripts]
mcp-server = "mcp_learning:mcp_server_main"
mcp-client = "mcp_learning:mcp_client_main"
[tool.black]
line-length = 99
skip_magic_trailing_comma = true
target-version = [
"py313",
]
[tool.ruff]
fix = true
indent-width = 4
line-length = 99
output-format = "grouped"
preview = false
respect-gitignore = true
src = [
# "docs",
"src",
# "tests",
# "noxfile.py",
]
target-version = "py313"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
indent-style = "space"
skip-magic-trailing-comma = false
preview = false
quote-style = "double"
[tool.ruff.lint]
fixable = [
"ALL",
]
ignore = [
"COM", # flake8-commas
"CPY", # flake8-copyright
"D213", # Multi-line docstring summary should start at the second line
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"PD", # pandas-vet
"RET501", # Do not explicitly return None in function if it is the only possible return value
"RET502", # Do not implicitly return None in function able to return non-None value
"RET503", # Missing explicit return at the end of function able to return non-None value
"RET504", # Unnecessary assignment to {name} before return statement
"TC", # flake8-type-checking
"TID252", # Prefer absolute imports over relative imports from parent modules
"TRY003", # Avoid specifying long messages outside the exception class
]
preview = false
select = [
"ALL",
]
task-tags = [
"FIXME",
"TODO",
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"pydantic.Field",
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.flake8-type-checking]
exempt-modules = [
"typing",
"typing_extensions",
]
quote-annotations = true
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
]
runtime-evaluated-decorators = [
"pydantic.validate_call",
]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"pydantic.field_validator",
]
[tool.ruff.lint.per-file-ignores]
# "docs/**/conf.py" = [
# "INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
# ]
"src/**/__init__.py" = [
"F401", # {name} imported but unused; consider using importlib.util.find_spec to test for availability
]
# "tests/**/conftest.py" = [
# "INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
# "PLR0913", # Too many arguments in function definition ({c_args} > {max_args})
# ]
# "tests/**/test_*.py" = [
# "INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
# "PLR0913", # Too many arguments in function definition ({c_args} > {max_args})
# "S101", # Use of assert detected
# "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
# ]
[tool.ruff.lint.pycodestyle]
max-doc-length = 99
max-line-length = 99
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = [
"typing.overload",
]
property-decorators = [
"pydantic.computed_field",
]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.isort]
overwrite_in_place = true
profile = "black"
atomic = true
line_length = 99
remove_redundant_aliases = true
split_on_trailing_comma = false
src_paths = [
# "docs",
"src",
# "tests",
# "noxfile.py",
]
py_version = 313
[tool.pylint.main]
extension-pkg-allow-list = [
"pydantic",
]
fail-under = 8.5
jobs = 0
recursive = true
[tool.pylint.basic]
include-naming-hint = true
[tool.pylint.format]
max-line-length = 99
[tool.pylint.logging]
logging-format-style = "new"
[tool.pylint."messages control"]
enable = [
"all",
]
disable = [
"import-outside-toplevel", # Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.
"logging-fstring-interpolation", # Used when a logging statement has a call form of "logging.<logging method>(f"...")".Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-format-interpolation is disabled then you can use str.format. If logging-not-lazy is disabled then you can use % formatting as normal.
]
[tool.pylint.reports]
output-format = "colorized"
[tool.codespell]
ignore-words-list = "astroid"
# [tool.pytest.ini_options]
# addopts = "--junit-xml=junit.xml"
# console_output_style = "count"
# [tool.coverage.paths]
# source = [
# "src",
# "*/site-packages",
# ]
# [tool.coverage.run]
# branch = true
# command_line = "--module pytest"
# data_file = ".coverage"
# include = [
# "src/**/*.py",
# ]
# omit = [
# "tests/**/conftest.py",
# "tests/**/test_*.py",
# ]
# [tool.coverage.report]
# exclude_lines = [
# "pragma: no cover",
# "if __name__ == .__main__.:",
# "if typing.TYPE_CHECKING:",
# ]
# fail_under = 85
# include = [
# "src/**/*.py",
# ]
# include_namespace_packages = true
# omit = [
# "tests/**/conftest.py",
# "tests/**/test_*.py",
# ]
# precision = 2
# show_missing = true
# [tool.coverage.html]
# directory = "htmlcov"
# [tool.coverage.xml]
# output = "coverage.xml"
[tool.mypy]
files = [
"src",
]
exclude = [
"conftest",
"test_",
]
strict = false
[tool.autoflake]
in-place = true
remove-all-unused-imports = true
recursive = true
expand-star-imports = true
ignore-init-module-imports = true
remove-duplicate-keys = true
remove-unused-variables = true
[tool.vulture]
min_confidence = 100
paths = [
# "docs",
"src",
# "tests",
# "noxfile.py",
]
[tool.numpydoc_validation]
checks = [ # Report findings on all checks except the ones listed below "all"
"all",
"GL01", # Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)
"ES01", # No extended summary found
"PR08", # Parameter "{param_name}" description should start with a capital letter
"PR09", # Parameter "{param_name}" description should finish with "."
"RT04", # Return value description should start with a capital letter
"RT05", # Return value description should finish with "."
"SA01", # See Also section not found
"EX01", # No examples section found
]
exclude = [ # Don't report issues on objects matching any of the regular regular expressions
"\\.__init__$",
]
[tool.uv]
default-groups = [
"dev",
]