-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (146 loc) · 4.35 KB
/
Copy pathpyproject.toml
File metadata and controls
162 lines (146 loc) · 4.35 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[project]
name = "mcp-redfish"
version = "0.1.0"
description = "MCP Server for Redfish API Integration - A natural language interface for managing Redfish-enabled infrastructure"
authors = [{name = "Nokia", email = "opensource@nokia.com"}]
maintainers = [{name = "Nokia", email = "opensource@nokia.com"}]
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.13"
keywords = ["mcp", "redfish", "server", "api", "infrastructure", "management"]
dependencies = [
"redfish",
"python-dotenv",
"fastmcp",
"tenacity>=8.0.0"
]
[project.urls]
Homepage = "https://github.com/nokia/mcp-redfish"
Repository = "https://github.com/nokia/mcp-redfish"
Documentation = "https://github.com/nokia/mcp-redfish#readme"
"Bug Tracker" = "https://github.com/nokia/mcp-redfish/issues"
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"mypy>=1.0.0",
"ruff>=0.13.2",
"pre-commit>=3.0.0",
]
test = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0", # For parallel test execution
"hypothesis>=6.0.0",
"requests>=2.25.0", # For e2e emulator health checks
]
[project.scripts]
mcp-redfish = "src.main:main"
[dependency-groups]
dev = [
"bandit[toml]>=1.8.6",
"types-requests>=2.32.4.20250913",
]
[tool.pytest.ini_options]
testpaths = ["test"] # Default: only unit tests (e2e tests require explicit running)
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = [
"-v",
"--strict-markers",
"--strict-config",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow running tests",
"e2e: End-to-end integration tests",
"tools: Tool-specific tests",
"discovery: Tool discovery tests",
"error_handling: Error handling and edge case tests",
"edge_cases: Edge case and boundary condition tests",
"performance: Performance and timing tests",
]
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # Relaxed for external libraries
disallow_incomplete_defs = false # Relaxed for external libraries
check_untyped_defs = true
disallow_untyped_decorators = false # Relaxed for FastMCP decorators
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = false # Disable unreachable code warnings
strict_equality = true
ignore_missing_imports = true # Ignore missing stubs for external libraries
# Handle src layout - simplified to avoid duplicate module detection
files = ["src", "e2e"]
exclude = [
"test/.*",
".*/__pycache__/.*"
]
# Namespace packages configuration for e2e modules
namespace_packages = true
[tool.ruff]
target-version = "py313" # Match project Python version
line-length = 88
[tool.ruff.format]
# Ruff formatter settings (Black-compatible)
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[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 ruff format
"E203", # whitespace before ':', handled by ruff format
"B008", # do not perform function calls in argument defaults
]
[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = ["B011", "B018", "E402"] # E402: Allow module imports after sys.path modifications
"e2e/**/*.py" = ["B011", "B018", "E402"] # E402: Allow module imports after sys.path modifications
[tool.ruff.lint.isort]
known-first-party = ["src", "common", "tools"]
known-local-folder = ["test", "e2e"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.coverage.run]
source = ["src"]
omit = [
"test/*",
"e2e/*",
"*/__pycache__/*",
]
[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",
]
fail_under = 70