Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (169 loc) · 6.11 KB
/
Copy pathpyproject.toml
File metadata and controls
192 lines (169 loc) · 6.11 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
# NOTE: there is deliberately no `[tool.uv]` table here.
#
# It previously held `exclude-newer = "P3D"` and `prerelease = "allow"`. Neither should
# come back:
# * The supply-chain cooldown is configured in `.github/dependabot.yml` (`cooldown`).
# Recent uv can also express a rolling window here, via `exclude-newer` with a
# duration (e.g. "P3D" / "3 days"). We keep it in Dependabot instead because older uv
# only accepts a fixed RFC 3339 date and, on seeing a duration, silently drops this
# whole table (a warning, then it keeps going) -- and the repo pins no uv version --
# so a contributor on an older uv would quietly lose these settings.
# * Allowing pre-releases must stay off. `packages/proxy` pins this project's exact
# runtime closure, and a pinned pre-release makes that wrapper uninstallable without
# `--prerelease=allow`, which `uvx`/`pip` users cannot pass. The build hook enforces
# this, so re-enabling the setting turns a pre-release in the lock into a failed
# release. Dependencies that only publish pre-releases (the `agent-framework*` example
# tree) still resolve without it, because their own constraints demand them.
[tool.uv.workspace]
members = [
"examples/mcp-client/*"
]
# The pinned wrapper (packages/proxy) is deliberately NOT a workspace member. Its
# dependencies are dynamic and derived from this workspace's lock file at build time, so
# including it would make `uv lock` build the wrapper's metadata from the very lock file
# it is trying to write. See packages/proxy/hatch_build.py.
exclude = [
"packages/proxy"
]
[project]
name = "mcp-proxy-for-aws"
# NOTE: "Patch"=9223372036854775807 bumps next release to zero.
version = "1.7.0"
description = "MCP Proxy for AWS"
readme = "README.md"
requires-python = ">=3.10,<3.15"
dependencies = [
"fastmcp>=3.2,<3.5",
# Used directly for SigV4 signing, request hooks and error handling, so it is declared
# rather than relied on transitively through fastmcp -> mcp. The cap matches mcp's own.
"httpx>=0.27.1,<1.0",
"boto3>=1.41.0",
"botocore[crt]>=1.41.0",
]
license = {text = "Apache-2.0"}
license-files = ["LICENSE", "NOTICE" ]
authors = [
{name = "Amazon Web Services"},
{name = "MCP Proxy for AWS"},
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
[project.urls]
documentation = "https://github.com/aws/mcp-proxy-for-aws/blob/main/README.md"
repository = "https://github.com/aws/mcp-proxy-for-aws.git"
changelog = "https://github.com/aws/mcp-proxy-for-aws/blob/main/CHANGELOG.md"
[project.scripts]
"mcp-proxy-for-aws" = "mcp_proxy_for_aws.server:main"
[dependency-groups]
dev = [
"commitizen>=4.2.2",
# Build backend, needed in the dev environment to unit-test packages/proxy's
# build hooks (which import hatchling's plugin interfaces).
"hatchling>=1.27.0",
# tomllib backport, for tests that read pyproject.toml on Python 3.10.
"tomli>=2.0.0; python_full_version < '3.11'",
"pre-commit>=4.1.0",
"ruff>=0.9.7",
"pyright>=1.1.398",
"pytest>=8.0.0",
"pytest-asyncio>=0.26.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
line-length = 99
extend-include = ["*.ipynb"]
exclude = [
".venv",
"**/__pycache__",
"**/node_modules",
"**/dist",
"**/build",
"**/env",
"**/.ruff_cache",
"**/.venv",
"**/.ipynb_checkpoints"
]
force-exclude = true
[tool.ruff.lint]
exclude = ["__init__.py"]
select = ["C", "D", "E", "F", "G", "I", "TC", "UP", "W"]
ignore = ["C901", "E501", "E741", "F402", "F823", "D100", "D106"]
[tool.ruff.lint.isort]
lines-after-imports = 2
no-sections = true
[tool.ruff.lint.per-file-ignores]
"**/*.ipynb" = ["F704"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.pyright]
include = ["mcp_proxy_for_aws", "tests", "examples/*"]
exclude = ["**/__pycache__", "**/.venv", "**/node_modules", "**/dist", "**/build"]
[tool.commitizen]
name = "cz_conventional_commits"
version_provider = "uv"
tag_format = "v$version"
# The pinned wrapper `mcp-proxy-for-aws-cli` must move in lockstep: its metadata pins
# `mcp-proxy-for-aws` to its own version, so a wrapper left behind at the previous version
# would pin a release that this bump has just superseded. A unit test asserts they match.
#
# `mcp_proxy_for_aws/__init__.py` is deliberately absent: `__version__` now reads the
# installed distribution's metadata instead of carrying a literal to rewrite.
version_files = [
"pyproject.toml:version",
"packages/proxy/pyproject.toml:version"
]
update_changelog_on_bump = true
[tool.hatch.build.targets.wheel]
packages = ["mcp_proxy_for_aws"]
# The code package's sdist otherwise bundles the whole working tree. Keep the
# sibling wrapper project (packages/proxy) and local planning notes (.agents)
# out of it.
[tool.hatch.build.targets.sdist]
exclude = [
"packages",
".agents",
]
[tool.bandit]
exclude_dirs = ["venv", ".venv", "tests"]
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
testpaths = [ "tests", "packages/proxy/tests"]
asyncio_mode = "auto"
markers = [
"live: marks tests that make live API calls (deselect with '-m \"not live\"')",
"asyncio: marks tests that use asyncio",
"unit: mark the tests as unit test to run for every PR",
"integ: mark the tests as integration test to run before release",
]
[tool.coverage.report]
exclude_also = [
'pragma: no cover',
'if __name__ == .__main__.:\n main()',
]
[tool.coverage.run]
source = ["mcp_proxy_for_aws"]