-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
232 lines (207 loc) · 5.55 KB
/
Copy pathpyproject.toml
File metadata and controls
232 lines (207 loc) · 5.55 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
[project]
name = "youtrack-rocket-mcp"
dynamic = ["version"]
description = "🚀 Lightning-fast Model Context Protocol (MCP) server for YouTrack issue tracking system"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [
{ name = "Ilya Volnistov", email = "ivolnistov@gmail.com" }
]
keywords = ["mcp", "youtrack", "issue-tracking", "api", "integration", "rocket", "fast", "async"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"httpx>=0.24.0",
"pydantic>=2.0.0",
"fastmcp>=0.1.0", # FastMCP includes mcp as a dependency
]
[dependency-groups]
dev = [
# Dependencies
"python-dotenv>=1.0.0",
# Code quality tools
"ruff>=0.11.9",
"mypy>=1.17.1",
"pre-commit>=3.8.0",
"detect-secrets>=1.5.0",
# Testing tools
"pytest>=7.0.0",
"pytest-cov>=3.0.0",
"pytest-mock>=3.0.0",
"pytest-asyncio>=0.24.0",
# Type stubs
"types-requests",
]
[tool.uv.sources]
mcp = { git = "https://github.com/modelcontextprotocol/python-sdk.git", rev = "main" }
[project.scripts]
youtrack-rocket-mcp = "youtrack_rocket_mcp.server:main"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0-dev"
[tool.hatch.build.hooks.vcs]
version-file = "src/youtrack_rocket_mcp/_version.py"
[tool.hatch.build.targets.wheel]
sources = ["src"]
packages = ["src/youtrack_rocket_mcp"]
# Ruff configuration
[tool.ruff]
exclude = [
".venv",
"venv",
".git",
"__pycache__",
"build",
"dist",
"**/youtrack_rocket_mcp/_version.py", # Auto-generated by hatch-vcs
]
line-length = 120
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # Pylint
"TRY", # tryceratops
"RUF", # Ruff-specific rules
]
ignore = [
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"PLR0912", # Too many branches
"PLR0911", # Too many return statements
"TRY003", # Avoid specifying long messages outside the exception class
]
[tool.ruff.lint.pylint]
max-args = 7
max-locals = 20
max-statements = 60
[tool.ruff.lint.isort]
known-first-party = ["youtrack_rocket_mcp"]
[tool.ruff.lint.per-file-ignores]
# Test files
"tests/**/*.py" = [
"S101", # assert statements allowed in tests
"T201", # print statements allowed in tests
"PLR2004", # magic values allowed in tests
"ARG001", # unused arguments (fixtures)
"ARG002", # unused arguments (setUp)
]
# Tools files - allow long lines in documentation
"src/youtrack_rocket_mcp/tools/*.py" = [
"E501", # Long lines are OK in tool documentation
]
# Search tool has a complex filter method
"src/youtrack_rocket_mcp/tools/search.py" = [
"E501", # Long lines are OK in tool documentation
"PLR0915", # filter_issues is complex but well-structured
]
# Server module needs print for error messages to stderr
"src/youtrack_rocket_mcp/server.py" = [
"T201", # print statements are needed for error output to stderr
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# MyPy configuration
[tool.mypy]
python_version = "3.12"
strict = true
show_column_numbers = true
show_error_context = false
follow_imports = "normal"
plugins = ["pydantic.mypy"]
warn_unreachable = true
mypy_path = ["src"]
exclude = [
"tests/",
"build/",
"dist/",
"_version.py", # Auto-generated by hatch-vcs
]
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "youtrack_rocket_mcp._version"
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"mcp.*",
"httpx.*",
"requests.*",
"dotenv.*",
]
ignore_missing_imports = true
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--cov=youtrack_rocket_mcp",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
asyncio_mode = "auto"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"asyncio: marks tests as async tests",
]
filterwarnings = [
"ignore:Support for class-based `config` is deprecated:DeprecationWarning:pydantic._internal._config",
]
# Coverage configuration
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/__init__.py",
"*/conftest.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@abstractmethod",
]