-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
199 lines (182 loc) · 4.86 KB
/
pyproject.toml
File metadata and controls
199 lines (182 loc) · 4.86 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
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["weather_mcp*"]
exclude = ["tests*", "logs*", "htmlcov*", "examples*"]
[project]
name = "clima-mcp"
version = "0.2.0"
description = "National Weather Service API wrapper with MCP server and SSE support"
authors = [
{name = "Climate MCP Team", email = "clima-mcp@example.com"},
]
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
keywords = ["weather", "mcp", "nws", "national-weather-service", "api", "sse", "server-sent-events", "climate"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"fastmcp>=2.0.0",
"httpx>=0.25.0",
"anyio>=4.0.0",
"aiohttp>=3.8.0",
"requests>=2.31.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-dotenv>=1.0.0",
"python-dateutil>=2.8.0",
"cachetools>=5.3.0",
"loguru>=0.7.0",
"typer>=0.9.0",
"uvicorn>=0.30.0",
# Observability dependencies
"prometheus-client>=0.19.0",
"opentelemetry-api>=1.21.0",
"opentelemetry-sdk>=1.21.0",
"opentelemetry-instrumentation-httpx>=0.42b0",
"opentelemetry-instrumentation-logging>=0.42b0",
"opentelemetry-exporter-prometheus>=0.57b0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.3.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
]
[project.scripts]
clima-mcp = "weather_mcp.cli:main"
[project.urls]
Homepage = "https://github.com/Kode-Rex/clima"
Repository = "https://github.com/Kode-Rex/clima"
Issues = "https://github.com/Kode-Rex/clima/issues"
Documentation = "https://github.com/Kode-Rex/clima#readme"
# Black configuration
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.venv
| \.pytest_cache
| __pycache__
| build
| dist
)/
'''
# Ruff configuration (replaces flake8, isort, etc.)
[tool.ruff]
target-version = "py311"
line-length = 88
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["F401", "F811"] # Allow unused imports in tests
"weather_mcp/sse.py" = ["F841"] # Allow unused variables in SSE module
"weather_mcp/nws.py" = ["F841"] # Allow unused variables in NWS module
[[tool.mypy.overrides]]
module = ["weather_mcp.nws"]
warn_return_any = false
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = ["weather_mcp.config", "weather_mcp.cli", "main"]
disable_error_code = ["call-arg"]
# MyPy configuration
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # More lenient for tests
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false # Allow decorators without types
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = false # Allow unreachable code for safety
strict_equality = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"fastmcp.*",
"sse_starlette.*",
"cachetools.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
warn_no_return = false
# Pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
markers = [
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
asyncio_mode = "auto"
# Coverage configuration
[tool.coverage.run]
source = ["weather_mcp"]
omit = [
"tests/*",
"*/tests/*",
"test_*.py",
"*_test.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]