-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
220 lines (201 loc) · 6.33 KB
/
Copy pathpyproject.toml
File metadata and controls
220 lines (201 loc) · 6.33 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>=1.24"]
build-backend = "hatchling.build"
[project]
name = "uniprot-mcp-server"
version = "1.3.0"
description = "Model Context Protocol server for the UniProt protein knowledgebase. Install: pip install uniprot-mcp-server"
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
keywords = [
"mcp", "model-context-protocol", "mcp-server", "uniprot", "protein-database",
"bioinformatics", "proteins", "swiss-prot", "biology", "llm-tools",
"anthropic", "claude", "provenance", "reproducibility", "alphafold",
"clinvar", "drug-discovery",
]
authors = [
{ name = "Santiago Maniches", email = "santiago.maniches@gmail.com" },
]
maintainers = [
{ name = "Santiago Maniches", email = "santiago.maniches@gmail.com" },
{ name = "TOPOLOGICA LLC", email = "santiago.maniches@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.27",
"mcp>=1.2",
]
[project.optional-dependencies]
test = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-socket>=0.7",
"respx>=0.21",
"hypothesis>=6.100",
"syrupy>=4.6",
]
dev = [
"ruff>=0.6",
"mypy>=1.10",
"bandit>=1.7",
"pip-audit>=2.7",
"pre-commit>=3.7",
"interrogate>=1.7",
]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
]
[project.urls]
Homepage = "https://topologica.ai"
Repository = "https://github.com/smaniches/uniprot-mcp"
Documentation = "https://smaniches.github.io/uniprot-mcp/"
Issues = "https://github.com/smaniches/uniprot-mcp/issues"
Changelog = "https://github.com/smaniches/uniprot-mcp/blob/main/CHANGELOG.md"
"Author ORCID" = "https://orcid.org/0009-0005-6480-1987"
Organization = "https://topologica.ai"
[project.scripts]
uniprot-mcp = "uniprot_mcp.server:main"
# Alias matching the PyPI distribution name, so the MCP Registry launch
# command `uvx uniprot-mcp-server` resolves to a console script. Both
# entry points target the same callable; the bare `uniprot-mcp` is kept
# for back-compat.
uniprot-mcp-server = "uniprot_mcp.server:main"
[tool.hatch.build.targets.wheel]
packages = ["src/uniprot_mcp"]
[tool.hatch.build.targets.sdist]
include = [
"src/uniprot_mcp/**",
"README.md",
"LICENSE",
"NOTICE",
"CHANGELOG.md",
"CITATION.cff",
"ARCHITECTURE.md",
"tests/**",
]
exclude = [
"**/__pycache__",
"**/.pytest_cache",
"**/.mypy_cache",
"**/.ruff_cache",
]
[tool.pytest.ini_options]
minversion = "8.0"
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = [
"--strict-markers",
"--strict-config",
"-ra",
"--disable-socket",
"--allow-unix-socket",
"--allow-hosts=127.0.0.1,::1",
]
markers = [
"integration: live UniProt REST API; opt-in with --integration",
"mcp_protocol: spawns the MCP server as a subprocess",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning:pydantic.*",
"ignore::DeprecationWarning:mcp.*",
]
[tool.coverage.run]
branch = true
source = ["uniprot_mcp"]
[tool.coverage.report]
# Gate enforced at 100% line + branch across the package. The coverage
# uplift (chore/coverage-100) restored the v1.0.0 100% level after the
# v1.0.1 -> v1.1.x clinical/biomedical work had let it drift to ~92%.
# Two genuinely-unreachable arcs carry a justified ``# pragma: no cover``
# so they do not block the gate:
# - client.py version-lookup ``except``: import-time fallback to "dev"
# when running uninstalled; exercising it requires a module reload
# that breaks exception-class identity across the package.
# - server.py target-dossier FASTA-fetch ``except``: non-fatal
# chemistry fallback.
# ``_extract_provenance`` reads the accept header directly from
# ``response.request``: the function also reads ``response.url`` (which
# httpx derives from the request), so the request is always present and
# the read needs no guard or pragma.
# Every other branch is covered by a genuine, assertion-bearing test.
# PRs that drop coverage below 100% should be rejected by review.
fail_under = 100
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # bugbear
"UP", # pyupgrade
"SIM", # simplify
"RUF", # ruff-specific
"N", # pep8-naming
"ASYNC", # flake8-async
"S", # bandit-lite
"PGH", # pygrep-hooks: require an error code on every type:ignore / noqa
]
ignore = [
"S101", # use of assert in tests is fine
"E501", # line too long handled by formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S", "N802", "N803"]
[tool.mypy]
python_version = "3.11"
strict = true
files = ["src/uniprot_mcp"]
mypy_path = "src"
disallow_untyped_decorators = false
warn_unused_ignores = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["mcp.*"]
ignore_missing_imports = true
[tool.bandit]
exclude_dirs = ["tests", "_scratch"]
skips = ["B101"] # asserts in non-test code only, but we don't use them anyway
[tool.interrogate]
# Docstring-coverage gate over the package public + internal surface.
# Keys use underscores (interrogate accepts both; underscores are the
# documented form). `fail_under` is pinned at the exact current baseline
# (115/171 documented objects = 67.25%) and is a one-way ratchet: any
# regression fails CI; raising it is welcome.
# Run locally with: interrogate -c pyproject.toml src/uniprot_mcp
fail_under = 67.25
ignore_init_method = true
ignore_magic = true
ignore_nested_functions = true
ignore_module = false
ignore_private = false
ignore_semiprivate = false
exclude = ["tests", "_scratch"]