mcp-server-analyzer 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_server_analyzer-0.1.0/.dockerignore +53 -0
- mcp_server_analyzer-0.1.0/.github/copilot-instructions.md +0 -0
- mcp_server_analyzer-0.1.0/.github/workflows/ci-cd.yml +355 -0
- mcp_server_analyzer-0.1.0/.gitignore +240 -0
- mcp_server_analyzer-0.1.0/.pre-commit-config.yaml +53 -0
- mcp_server_analyzer-0.1.0/CHANGELOG.md +0 -0
- mcp_server_analyzer-0.1.0/Dockerfile +54 -0
- mcp_server_analyzer-0.1.0/LICENSE +21 -0
- mcp_server_analyzer-0.1.0/PKG-INFO +265 -0
- mcp_server_analyzer-0.1.0/README.md +223 -0
- mcp_server_analyzer-0.1.0/docker-test.sh +10 -0
- mcp_server_analyzer-0.1.0/docs/CICD_SETUP.md +222 -0
- mcp_server_analyzer-0.1.0/examples/README.md +125 -0
- mcp_server_analyzer-0.1.0/examples/bad_code.py +151 -0
- mcp_server_analyzer-0.1.0/examples/good_code.py +91 -0
- mcp_server_analyzer-0.1.0/examples/mixed_code.py +155 -0
- mcp_server_analyzer-0.1.0/examples/preview-ruff.md +150 -0
- mcp_server_analyzer-0.1.0/examples/preview-vulture.md +91 -0
- mcp_server_analyzer-0.1.0/examples/simple_issues.py +55 -0
- mcp_server_analyzer-0.1.0/pyproject.toml +164 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/__init__.py +7 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/__main__.py +7 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/analyzers/__init__.py +6 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/analyzers/ruff.py +188 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/analyzers/vulture.py +194 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/models.py +72 -0
- mcp_server_analyzer-0.1.0/src/mcp_python_analyzer/server.py +264 -0
- mcp_server_analyzer-0.1.0/tests/conftest.py +42 -0
- mcp_server_analyzer-0.1.0/tests/test_basic.py +38 -0
- mcp_server_analyzer-0.1.0/tests/test_server.py +79 -0
- mcp_server_analyzer-0.1.0/tests/test_working.py +79 -0
- mcp_server_analyzer-0.1.0/uv.lock +1759 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Git
|
|
2
|
+
.git/
|
|
3
|
+
.gitignore
|
|
4
|
+
|
|
5
|
+
# Virtual environments
|
|
6
|
+
.venv/
|
|
7
|
+
venv/
|
|
8
|
+
env/
|
|
9
|
+
|
|
10
|
+
# Python cache
|
|
11
|
+
__pycache__/
|
|
12
|
+
*.pyc
|
|
13
|
+
*.pyo
|
|
14
|
+
*.pyd
|
|
15
|
+
.Python
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
|
|
23
|
+
# OS
|
|
24
|
+
.DS_Store
|
|
25
|
+
.DS_Store?
|
|
26
|
+
._*
|
|
27
|
+
.Spotlight-V100
|
|
28
|
+
.Trashes
|
|
29
|
+
ehthumbs.db
|
|
30
|
+
Thumbs.db
|
|
31
|
+
|
|
32
|
+
# Build artifacts
|
|
33
|
+
build/
|
|
34
|
+
dist/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
|
|
37
|
+
# Test artifacts
|
|
38
|
+
.pytest_cache/
|
|
39
|
+
.coverage
|
|
40
|
+
htmlcov/
|
|
41
|
+
.mypy_cache/
|
|
42
|
+
|
|
43
|
+
# Documentation
|
|
44
|
+
docs/
|
|
45
|
+
*.md
|
|
46
|
+
!README.md
|
|
47
|
+
|
|
48
|
+
# Development
|
|
49
|
+
tests/
|
|
50
|
+
mixed_example.py
|
|
51
|
+
claude_test_config.json
|
|
52
|
+
setup.sh
|
|
53
|
+
README_old.md
|
|
File without changes
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# Comprehensive CI/CD Pipeline for MCP Python Analyzer
|
|
2
|
+
# Combines testing, pre-commit, Python publishing, and Docker deployment
|
|
3
|
+
# Based on best practices from useful-optimizer and dracula-palette workflows
|
|
4
|
+
|
|
5
|
+
name: CI/CD Pipeline
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
tags: ['v*.*.*']
|
|
11
|
+
pull_request:
|
|
12
|
+
branches: [main]
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
PYTHON_VERSION: '3.11' # Default Python version
|
|
16
|
+
UV_CACHE_DIR: ~/.cache/uv
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
# ============================================================================
|
|
20
|
+
# Pre-commit and Code Quality (Python 3.11 only)
|
|
21
|
+
# ============================================================================
|
|
22
|
+
pre-commit:
|
|
23
|
+
name: Pre-commit & Code Quality
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout code
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
31
|
+
uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
34
|
+
|
|
35
|
+
- name: Install uv
|
|
36
|
+
uses: astral-sh/setup-uv@v4
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
cache-dependency-glob: |
|
|
40
|
+
**/uv.lock
|
|
41
|
+
**/pyproject.toml # cspell:disable-line
|
|
42
|
+
|
|
43
|
+
- name: Cache uv dependencies
|
|
44
|
+
uses: actions/cache@v4
|
|
45
|
+
with:
|
|
46
|
+
path: ${{ env.UV_CACHE_DIR }}
|
|
47
|
+
key: uv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/uv.lock') }}
|
|
48
|
+
restore-keys: |
|
|
49
|
+
uv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
|
|
50
|
+
uv-${{ runner.os }}-
|
|
51
|
+
|
|
52
|
+
- name: Install dependencies
|
|
53
|
+
run: |
|
|
54
|
+
uv sync --dev --locked
|
|
55
|
+
uv tool install pre-commit
|
|
56
|
+
|
|
57
|
+
- name: Run pre-commit hooks
|
|
58
|
+
run: |
|
|
59
|
+
uv tool run pre-commit install
|
|
60
|
+
uv tool run pre-commit run --all-files --show-diff-on-failure
|
|
61
|
+
|
|
62
|
+
# ============================================================================
|
|
63
|
+
# Testing and Quality Assurance
|
|
64
|
+
# ============================================================================
|
|
65
|
+
test-and-quality:
|
|
66
|
+
name: Test & Quality (${{ matrix.python-version }})
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
needs: pre-commit
|
|
69
|
+
strategy:
|
|
70
|
+
fail-fast: false
|
|
71
|
+
matrix:
|
|
72
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- name: Checkout code
|
|
76
|
+
uses: actions/checkout@v4
|
|
77
|
+
|
|
78
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
79
|
+
uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: ${{ matrix.python-version }}
|
|
82
|
+
|
|
83
|
+
- name: Install uv
|
|
84
|
+
uses: astral-sh/setup-uv@v4
|
|
85
|
+
with:
|
|
86
|
+
enable-cache: true
|
|
87
|
+
cache-dependency-glob: |
|
|
88
|
+
**/uv.lock
|
|
89
|
+
**/pyproject.toml # cspell:disable-line
|
|
90
|
+
|
|
91
|
+
- name: Cache uv dependencies
|
|
92
|
+
uses: actions/cache@v4
|
|
93
|
+
with:
|
|
94
|
+
path: ${{ env.UV_CACHE_DIR }}
|
|
95
|
+
key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
|
|
96
|
+
restore-keys: |
|
|
97
|
+
uv-${{ runner.os }}-${{ matrix.python-version }}-
|
|
98
|
+
uv-${{ runner.os }}-
|
|
99
|
+
|
|
100
|
+
- name: Install dependencies
|
|
101
|
+
run: |
|
|
102
|
+
uv sync --dev --locked
|
|
103
|
+
|
|
104
|
+
- name: Run pytest with coverage # cspell:disable-line
|
|
105
|
+
env:
|
|
106
|
+
PYTHONPATH: src # cspell:disable-line
|
|
107
|
+
run: |
|
|
108
|
+
uv run pytest tests/ -v --cov=src/mcp_python_analyzer --cov-report=xml --cov-report=html --cov-report=term-missing --tb=short
|
|
109
|
+
|
|
110
|
+
- name: Upload coverage to Codecov
|
|
111
|
+
if: matrix.python-version == '3.11'
|
|
112
|
+
uses: codecov/codecov-action@v4
|
|
113
|
+
with:
|
|
114
|
+
file: ./coverage.xml
|
|
115
|
+
flags: unittests # cspell:disable-line
|
|
116
|
+
name: codecov-umbrella
|
|
117
|
+
fail_ci_if_error: false
|
|
118
|
+
|
|
119
|
+
- name: Upload coverage artifacts
|
|
120
|
+
if: matrix.python-version == '3.11'
|
|
121
|
+
uses: actions/upload-artifact@v4
|
|
122
|
+
with:
|
|
123
|
+
name: coverage-report
|
|
124
|
+
path: htmlcov/ # cspell:disable-line
|
|
125
|
+
|
|
126
|
+
# ============================================================================
|
|
127
|
+
# Build Python Distribution Packages
|
|
128
|
+
# ============================================================================
|
|
129
|
+
build-python:
|
|
130
|
+
name: Build Python Package 📦
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
needs: test-and-quality
|
|
133
|
+
if: github.event_name != 'pull_request'
|
|
134
|
+
|
|
135
|
+
steps:
|
|
136
|
+
- name: Checkout code
|
|
137
|
+
uses: actions/checkout@v4
|
|
138
|
+
|
|
139
|
+
- name: Set up Python
|
|
140
|
+
uses: actions/setup-python@v5
|
|
141
|
+
with:
|
|
142
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
143
|
+
|
|
144
|
+
- name: Install build and twine tools
|
|
145
|
+
run: |
|
|
146
|
+
pip install build twine
|
|
147
|
+
|
|
148
|
+
- name: Build distribution packages
|
|
149
|
+
run: |
|
|
150
|
+
python -m build
|
|
151
|
+
|
|
152
|
+
- name: Check distribution packages
|
|
153
|
+
run: |
|
|
154
|
+
python -m twine check dist/*
|
|
155
|
+
|
|
156
|
+
- name: Store distribution packages
|
|
157
|
+
uses: actions/upload-artifact@v4
|
|
158
|
+
with:
|
|
159
|
+
name: python-package-distributions
|
|
160
|
+
path: dist/
|
|
161
|
+
|
|
162
|
+
# ============================================================================
|
|
163
|
+
# Build and Push Docker Images
|
|
164
|
+
# ============================================================================
|
|
165
|
+
build-docker:
|
|
166
|
+
name: Build Docker Image 🐳
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
needs: test-and-quality
|
|
169
|
+
if: github.event_name != 'pull_request'
|
|
170
|
+
permissions:
|
|
171
|
+
contents: read
|
|
172
|
+
packages: write
|
|
173
|
+
id-token: write # for signing images with Cosign
|
|
174
|
+
|
|
175
|
+
steps:
|
|
176
|
+
- name: Checkout code
|
|
177
|
+
uses: actions/checkout@v4
|
|
178
|
+
|
|
179
|
+
- name: Extract metadata
|
|
180
|
+
id: meta
|
|
181
|
+
uses: docker/metadata-action@v5
|
|
182
|
+
with:
|
|
183
|
+
images: ghcr.io/${{ github.repository }}
|
|
184
|
+
tags: |
|
|
185
|
+
type=ref,event=branch
|
|
186
|
+
type=semver,pattern={{version}}
|
|
187
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
188
|
+
type=semver,pattern={{major}}
|
|
189
|
+
type=raw,value=latest,enable={{is_default_branch}}
|
|
190
|
+
|
|
191
|
+
- name: Set up Docker Buildx # cspell:disable-line
|
|
192
|
+
uses: docker/setup-buildx-action@v3 # cspell:disable-line
|
|
193
|
+
|
|
194
|
+
- name: Log in to GitHub Container Registry
|
|
195
|
+
uses: docker/login-action@v3
|
|
196
|
+
with:
|
|
197
|
+
registry: ghcr.io
|
|
198
|
+
username: ${{ github.actor }}
|
|
199
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
200
|
+
|
|
201
|
+
- name: Install Cosign for image signing
|
|
202
|
+
uses: sigstore/cosign-installer@v3.7.0 # cspell:disable-line
|
|
203
|
+
|
|
204
|
+
- name: Build and push Docker image
|
|
205
|
+
id: build-and-push
|
|
206
|
+
uses: docker/build-push-action@v6
|
|
207
|
+
with:
|
|
208
|
+
context: .
|
|
209
|
+
platforms: linux/amd64,linux/arm64
|
|
210
|
+
push: true
|
|
211
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
212
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
213
|
+
cache-from: type=gha
|
|
214
|
+
cache-to: type=gha,mode=max
|
|
215
|
+
|
|
216
|
+
- name: Sign Docker images with Cosign
|
|
217
|
+
env:
|
|
218
|
+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
|
|
219
|
+
TAGS: ${{ steps.meta.outputs.tags }}
|
|
220
|
+
run: |
|
|
221
|
+
images=""
|
|
222
|
+
for tag in ${TAGS}; do
|
|
223
|
+
images+="${tag}@${DIGEST} "
|
|
224
|
+
done
|
|
225
|
+
cosign sign --yes ${images}
|
|
226
|
+
|
|
227
|
+
# ============================================================================
|
|
228
|
+
# Publish to TestPyPI (for testing) # cspell:disable-line
|
|
229
|
+
# ============================================================================
|
|
230
|
+
publish-testpypi: # cspell:disable-line
|
|
231
|
+
name: Publish to TestPyPI 🧪 # cspell:disable-line
|
|
232
|
+
runs-on: ubuntu-latest
|
|
233
|
+
needs: build-python
|
|
234
|
+
if: github.ref == 'refs/heads/main'
|
|
235
|
+
environment:
|
|
236
|
+
name: testpypi # cspell:disable-line
|
|
237
|
+
url: https://test.pypi.org/p/mcp-server-analyzer
|
|
238
|
+
permissions:
|
|
239
|
+
id-token: write # for trusted publishing
|
|
240
|
+
|
|
241
|
+
steps:
|
|
242
|
+
- name: Download distribution packages
|
|
243
|
+
uses: actions/download-artifact@v4
|
|
244
|
+
with:
|
|
245
|
+
name: python-package-distributions
|
|
246
|
+
path: dist/
|
|
247
|
+
|
|
248
|
+
- name: Publish to TestPyPI # cspell:disable-line
|
|
249
|
+
uses: pypa/gh-action-pypi-publish@release/v1 # cspell:disable-line
|
|
250
|
+
with:
|
|
251
|
+
repository-url: https://test.pypi.org/legacy/
|
|
252
|
+
skip-existing: true
|
|
253
|
+
print-hash: true
|
|
254
|
+
|
|
255
|
+
# ============================================================================
|
|
256
|
+
# Publish to PyPI (production) # cspell:disable-line
|
|
257
|
+
# ============================================================================
|
|
258
|
+
publish-pypi: # cspell:disable-line
|
|
259
|
+
name: Publish to PyPI 🚀 # cspell:disable-line
|
|
260
|
+
runs-on: ubuntu-latest
|
|
261
|
+
needs: build-python
|
|
262
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
263
|
+
environment:
|
|
264
|
+
name: pypi # cspell:disable-line
|
|
265
|
+
url: https://pypi.org/p/mcp-server-analyzer
|
|
266
|
+
permissions:
|
|
267
|
+
id-token: write # for trusted publishing
|
|
268
|
+
|
|
269
|
+
steps:
|
|
270
|
+
- name: Download distribution packages
|
|
271
|
+
uses: actions/download-artifact@v4
|
|
272
|
+
with:
|
|
273
|
+
name: python-package-distributions
|
|
274
|
+
path: dist/
|
|
275
|
+
|
|
276
|
+
- name: Publish to PyPI # cspell:disable-line
|
|
277
|
+
uses: pypa/gh-action-pypi-publish@release/v1 # cspell:disable-line
|
|
278
|
+
|
|
279
|
+
# ============================================================================
|
|
280
|
+
# Create GitHub Release with Signed Artifacts
|
|
281
|
+
# ============================================================================
|
|
282
|
+
github-release:
|
|
283
|
+
name: Create GitHub Release 📋
|
|
284
|
+
runs-on: ubuntu-latest
|
|
285
|
+
needs: [publish-pypi, build-docker] # cspell:disable-line
|
|
286
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
287
|
+
permissions:
|
|
288
|
+
contents: write
|
|
289
|
+
id-token: write # for signing artifacts
|
|
290
|
+
|
|
291
|
+
steps:
|
|
292
|
+
- name: Checkout code
|
|
293
|
+
uses: actions/checkout@v4
|
|
294
|
+
|
|
295
|
+
- name: Download distribution packages
|
|
296
|
+
uses: actions/download-artifact@v4
|
|
297
|
+
with:
|
|
298
|
+
name: python-package-distributions
|
|
299
|
+
path: dist/
|
|
300
|
+
|
|
301
|
+
- name: Extract version from tag
|
|
302
|
+
id: version
|
|
303
|
+
run: |
|
|
304
|
+
VERSION=${GITHUB_REF#refs/tags/v}
|
|
305
|
+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
306
|
+
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
307
|
+
|
|
308
|
+
- name: Sign artifacts with Sigstore # cspell:disable-line
|
|
309
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.1 # cspell:disable-line
|
|
310
|
+
with:
|
|
311
|
+
inputs: >-
|
|
312
|
+
./dist/*.tar.gz
|
|
313
|
+
./dist/*.whl
|
|
314
|
+
|
|
315
|
+
- name: Create GitHub Release
|
|
316
|
+
env:
|
|
317
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
318
|
+
run: |
|
|
319
|
+
gh release create '${{ steps.version.outputs.tag }}' \
|
|
320
|
+
--repo '${{ github.repository }}' \
|
|
321
|
+
--title 'Release ${{ steps.version.outputs.tag }}' \
|
|
322
|
+
--notes "## MCP Python Analyzer ${{ steps.version.outputs.version }}
|
|
323
|
+
|
|
324
|
+
### 🚀 What's New
|
|
325
|
+
- Automated release from tag ${{ steps.version.outputs.tag }}
|
|
326
|
+
|
|
327
|
+
### 📦 Installation
|
|
328
|
+
\`\`\`bash
|
|
329
|
+
# Install via pip
|
|
330
|
+
pip install mcp-server-analyzer==${{ steps.version.outputs.version }}
|
|
331
|
+
|
|
332
|
+
# Install via uvx
|
|
333
|
+
uvx install mcp-server-analyzer==${{ steps.version.outputs.version }}
|
|
334
|
+
|
|
335
|
+
# Run with Docker
|
|
336
|
+
docker run ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
|
|
337
|
+
\`\`\`
|
|
338
|
+
|
|
339
|
+
### 🐳 Docker Images
|
|
340
|
+
- **Multi-arch**: \`ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}\`
|
|
341
|
+
- **Latest**: \`ghcr.io/${{ github.repository }}:latest\`
|
|
342
|
+
- **Platforms**: linux/amd64, linux/arm64
|
|
343
|
+
- **Signed**: All images signed with Cosign for security
|
|
344
|
+
|
|
345
|
+
### 🔐 Security
|
|
346
|
+
- All artifacts signed with Sigstore # cspell:disable-line
|
|
347
|
+
- Docker images signed with Cosign
|
|
348
|
+
- Published using GitHub OIDC trusted publishing"
|
|
349
|
+
|
|
350
|
+
- name: Upload signed artifacts to release
|
|
351
|
+
env:
|
|
352
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
353
|
+
run: |
|
|
354
|
+
gh release upload '${{ steps.version.outputs.tag }}' dist/** \
|
|
355
|
+
--repo
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
|
|
2
|
+
# Byte-compiled / optimized / DLL files
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[codz]
|
|
5
|
+
*$py.class
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py.cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
#uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
#poetry.lock
|
|
110
|
+
#poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
#pdm.lock
|
|
117
|
+
#pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
#pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi
|
|
127
|
+
|
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
129
|
+
__pypackages__/
|
|
130
|
+
|
|
131
|
+
# Celery stuff
|
|
132
|
+
celerybeat-schedule
|
|
133
|
+
celerybeat.pid
|
|
134
|
+
|
|
135
|
+
# SageMath parsed files
|
|
136
|
+
*.sage.py
|
|
137
|
+
|
|
138
|
+
# Environments
|
|
139
|
+
.env
|
|
140
|
+
.envrc
|
|
141
|
+
.venv
|
|
142
|
+
env/
|
|
143
|
+
venv/
|
|
144
|
+
ENV/
|
|
145
|
+
env.bak/
|
|
146
|
+
venv.bak/
|
|
147
|
+
|
|
148
|
+
# Spyder project settings
|
|
149
|
+
.spyderproject
|
|
150
|
+
.spyproject
|
|
151
|
+
|
|
152
|
+
# Rope project settings
|
|
153
|
+
.ropeproject
|
|
154
|
+
|
|
155
|
+
# mkdocs documentation
|
|
156
|
+
/site
|
|
157
|
+
|
|
158
|
+
# mypy
|
|
159
|
+
.mypy_cache/
|
|
160
|
+
.dmypy.json
|
|
161
|
+
dmypy.json
|
|
162
|
+
|
|
163
|
+
# Pyre type checker
|
|
164
|
+
.pyre/
|
|
165
|
+
|
|
166
|
+
# pytype static type analyzer
|
|
167
|
+
.pytype/
|
|
168
|
+
|
|
169
|
+
# Cython debug symbols
|
|
170
|
+
cython_debug/
|
|
171
|
+
|
|
172
|
+
# PyCharm
|
|
173
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
174
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
175
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
176
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
177
|
+
#.idea/
|
|
178
|
+
|
|
179
|
+
# Abstra
|
|
180
|
+
# Abstra is an AI-powered process automation framework.
|
|
181
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
182
|
+
# Learn more at https://abstra.io/docs
|
|
183
|
+
.abstra/
|
|
184
|
+
|
|
185
|
+
# Visual Studio Code
|
|
186
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
187
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
188
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
189
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
190
|
+
# .vscode/
|
|
191
|
+
|
|
192
|
+
# Ruff stuff:
|
|
193
|
+
.ruff_cache/
|
|
194
|
+
|
|
195
|
+
# PyPI configuration file
|
|
196
|
+
.pypirc
|
|
197
|
+
|
|
198
|
+
# Marimo
|
|
199
|
+
marimo/_static/
|
|
200
|
+
marimo/_lsp/
|
|
201
|
+
__marimo__/
|
|
202
|
+
|
|
203
|
+
# Streamlit
|
|
204
|
+
.streamlit/secrets.toml
|
|
205
|
+
|
|
206
|
+
# General
|
|
207
|
+
.DS_Store
|
|
208
|
+
.AppleDouble
|
|
209
|
+
.LSOverride
|
|
210
|
+
Icon[
|
|
211
|
+
|
|
212
|
+
# Thumbnails
|
|
213
|
+
._*
|
|
214
|
+
|
|
215
|
+
# Files that might appear in the root of a volume
|
|
216
|
+
.DocumentRevisions-V100
|
|
217
|
+
.fseventsd
|
|
218
|
+
.Spotlight-V100
|
|
219
|
+
.TemporaryItems
|
|
220
|
+
.Trashes
|
|
221
|
+
.VolumeIcon.icns
|
|
222
|
+
.com.apple.timemachine.donotpresent
|
|
223
|
+
|
|
224
|
+
# Directories potentially created on remote AFP share
|
|
225
|
+
.AppleDB
|
|
226
|
+
.AppleDesktop
|
|
227
|
+
Network Trash Folder
|
|
228
|
+
Temporary Items
|
|
229
|
+
.apdisk
|
|
230
|
+
|
|
231
|
+
.vscode/*
|
|
232
|
+
!.vscode/settings.json
|
|
233
|
+
!.vscode/tasks.json
|
|
234
|
+
!.vscode/launch.json
|
|
235
|
+
!.vscode/extensions.json
|
|
236
|
+
!.vscode/*.code-snippets
|
|
237
|
+
!*.code-workspace
|
|
238
|
+
|
|
239
|
+
# Built Visual Studio Code Extensions
|
|
240
|
+
*.vsix
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Pre-commit configuration for MCP Python Analyzer
|
|
2
|
+
# See https://pre-commit.com for more information
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
# Basic file checks
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v5.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
- id: check-added-large-files
|
|
13
|
+
- id: check-case-conflict
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: debug-statements
|
|
17
|
+
|
|
18
|
+
# Python-specific checks with RUFF
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
rev: v0.12.5
|
|
21
|
+
hooks:
|
|
22
|
+
# Linter
|
|
23
|
+
- id: ruff
|
|
24
|
+
args: [--fix]
|
|
25
|
+
# Formatter
|
|
26
|
+
- id: ruff-format
|
|
27
|
+
|
|
28
|
+
# Type checking with mypy (minimal config)
|
|
29
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
30
|
+
rev: v1.17.0
|
|
31
|
+
hooks:
|
|
32
|
+
- id: mypy
|
|
33
|
+
additional_dependencies:
|
|
34
|
+
- fastmcp>=0.3.0
|
|
35
|
+
- pydantic>=2.0.0
|
|
36
|
+
args: [--ignore-missing-imports]
|
|
37
|
+
files: ^src/
|
|
38
|
+
|
|
39
|
+
# Pyupgrade for python version itself
|
|
40
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
41
|
+
rev: v3.0.0
|
|
42
|
+
hooks:
|
|
43
|
+
- id: pyupgrade
|
|
44
|
+
args: [--py310-plus]
|
|
45
|
+
|
|
46
|
+
# Configuration for specific tools
|
|
47
|
+
default_language_version:
|
|
48
|
+
python: python3.11
|
|
49
|
+
|
|
50
|
+
default_stages: [pre-commit]
|
|
51
|
+
|
|
52
|
+
# Speed up by focusing on source files only
|
|
53
|
+
exclude: ^(\.venv/|\.git/|__pycache__/|examples/)
|
|
File without changes
|