mcp-context-server 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_context_server-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +49 -0
- mcp_context_server-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +33 -0
- mcp_context_server-0.1.0/.github/workflows/lint.yml +99 -0
- mcp_context_server-0.1.0/.github/workflows/publish.yml +149 -0
- mcp_context_server-0.1.0/.github/workflows/release-please.yml +57 -0
- mcp_context_server-0.1.0/.github/workflows/test.yml +86 -0
- mcp_context_server-0.1.0/.gitignore +162 -0
- mcp_context_server-0.1.0/.pre-commit-config.yaml +59 -0
- mcp_context_server-0.1.0/.release-please-manifest.json +3 -0
- mcp_context_server-0.1.0/CHANGELOG.md +12 -0
- mcp_context_server-0.1.0/CLAUDE.md +287 -0
- mcp_context_server-0.1.0/CONTRIBUTING.md +158 -0
- mcp_context_server-0.1.0/PKG-INFO +222 -0
- mcp_context_server-0.1.0/README.md +209 -0
- mcp_context_server-0.1.0/app/__init__.py +1 -0
- mcp_context_server-0.1.0/app/db_manager.py +1049 -0
- mcp_context_server-0.1.0/app/logger_config.py +45 -0
- mcp_context_server-0.1.0/app/models.py +158 -0
- mcp_context_server-0.1.0/app/py.typed +0 -0
- mcp_context_server-0.1.0/app/repositories/__init__.py +41 -0
- mcp_context_server-0.1.0/app/repositories/base.py +24 -0
- mcp_context_server-0.1.0/app/repositories/context_repository.py +258 -0
- mcp_context_server-0.1.0/app/repositories/image_repository.py +252 -0
- mcp_context_server-0.1.0/app/repositories/statistics_repository.py +284 -0
- mcp_context_server-0.1.0/app/repositories/tag_repository.py +107 -0
- mcp_context_server-0.1.0/app/schema.sql +39 -0
- mcp_context_server-0.1.0/app/server.py +734 -0
- mcp_context_server-0.1.0/app/settings.py +104 -0
- mcp_context_server-0.1.0/app/types.py +88 -0
- mcp_context_server-0.1.0/pyproject.toml +235 -0
- mcp_context_server-0.1.0/release-please-config.json +60 -0
- mcp_context_server-0.1.0/run_integration_test.py +24 -0
- mcp_context_server-0.1.0/server.json +241 -0
- mcp_context_server-0.1.0/tests/__init__.py +8 -0
- mcp_context_server-0.1.0/tests/conftest.py +437 -0
- mcp_context_server-0.1.0/tests/run_server.py +61 -0
- mcp_context_server-0.1.0/tests/test_database.py +412 -0
- mcp_context_server-0.1.0/tests/test_db_manager.py +453 -0
- mcp_context_server-0.1.0/tests/test_deduplication.py +504 -0
- mcp_context_server-0.1.0/tests/test_integration.py +700 -0
- mcp_context_server-0.1.0/tests/test_json_parameter_handling.py +365 -0
- mcp_context_server-0.1.0/tests/test_json_string_handling.py +352 -0
- mcp_context_server-0.1.0/tests/test_models.py +364 -0
- mcp_context_server-0.1.0/tests/test_parameter_handling.py +951 -0
- mcp_context_server-0.1.0/tests/test_real_server.py +854 -0
- mcp_context_server-0.1.0/tests/test_resource_warnings.py +390 -0
- mcp_context_server-0.1.0/tests/test_server.py +969 -0
- mcp_context_server-0.1.0/uv.lock +1121 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
## To Reproduce
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
1. Run command '...'
|
|
15
|
+
2. See error
|
|
16
|
+
|
|
17
|
+
## Expected Behavior
|
|
18
|
+
A clear and concise description of what you expected to happen.
|
|
19
|
+
|
|
20
|
+
## Actual Behavior
|
|
21
|
+
What actually happened instead.
|
|
22
|
+
|
|
23
|
+
## Error Messages
|
|
24
|
+
```text
|
|
25
|
+
Paste any error messages here
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## System Information
|
|
29
|
+
- OS: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
|
|
30
|
+
- Python Version: [run `python --version`]
|
|
31
|
+
- uv Version: [run `uv --version`]
|
|
32
|
+
- MCP Client: [e.g., Claude Code, LangGraph, etc.]
|
|
33
|
+
- MCP Context Server Version: [from pyproject.toml]
|
|
34
|
+
|
|
35
|
+
## Diagnostic Output
|
|
36
|
+
Please run and paste output:
|
|
37
|
+
```bash
|
|
38
|
+
# Test if server starts
|
|
39
|
+
uv run python -m app.server
|
|
40
|
+
|
|
41
|
+
# Check database location
|
|
42
|
+
ls -la ~/.mcp/context_storage.db
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Additional Context
|
|
46
|
+
Add any other context about the problem here.
|
|
47
|
+
|
|
48
|
+
## Possible Solution
|
|
49
|
+
If you have suggestions on how to fix the issue.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Description
|
|
10
|
+
A clear and concise description of what you want to happen.
|
|
11
|
+
|
|
12
|
+
## Problem It Solves
|
|
13
|
+
Describe the problem or limitation this feature would address.
|
|
14
|
+
|
|
15
|
+
## Proposed Solution
|
|
16
|
+
Describe how you envision this feature working.
|
|
17
|
+
|
|
18
|
+
## Alternatives Considered
|
|
19
|
+
Describe any alternative solutions or features you've considered.
|
|
20
|
+
|
|
21
|
+
## Use Cases
|
|
22
|
+
Provide examples of how this feature would be used:
|
|
23
|
+
1.
|
|
24
|
+
2.
|
|
25
|
+
3.
|
|
26
|
+
|
|
27
|
+
## Additional Context
|
|
28
|
+
Add any other context, mockups, or examples about the feature request here.
|
|
29
|
+
|
|
30
|
+
## Would you be willing to contribute this feature?
|
|
31
|
+
- [ ] Yes, I can implement this
|
|
32
|
+
- [ ] Yes, I can help test it
|
|
33
|
+
- [ ] No, but I can provide more details if needed
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
name: Lint and Validate
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
security-events: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pre-commit:
|
|
13
|
+
name: Run Pre-Commit Checks
|
|
14
|
+
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version-file: pyproject.toml
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v6
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
cache-dependency-glob: "pyproject.toml"
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: uv sync --dev
|
|
34
|
+
|
|
35
|
+
- name: Install pre-commit
|
|
36
|
+
run: pip install pre-commit
|
|
37
|
+
|
|
38
|
+
- name: Run pre-commit hooks
|
|
39
|
+
run: |
|
|
40
|
+
pre-commit run --all-files --show-diff-on-failure
|
|
41
|
+
|
|
42
|
+
mcp:
|
|
43
|
+
name: MCP Checks
|
|
44
|
+
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
env:
|
|
47
|
+
SERVER_NAME: io.github.alex-feel/mcp-context-server
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout code
|
|
51
|
+
uses: actions/checkout@v5
|
|
52
|
+
|
|
53
|
+
- name: Verify MCP marker in README
|
|
54
|
+
run: |
|
|
55
|
+
set -euo pipefail
|
|
56
|
+
# Accept either plain line or HTML comment
|
|
57
|
+
if grep -Eq "(^|<!--[[:space:]]*)mcp-name:[[:space:]]*${SERVER_NAME}([[:space:]]*-->|$)" README.md; then
|
|
58
|
+
echo 'OK: README contains MCP marker'
|
|
59
|
+
else
|
|
60
|
+
echo "README.md must contain 'mcp-name: ${SERVER_NAME}' line or HTML comment" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
- name: Validate server.json presence and JSON syntax
|
|
65
|
+
run: |
|
|
66
|
+
python - <<'PY'
|
|
67
|
+
# Validate that server.json exists and is valid JSON
|
|
68
|
+
import json, sys
|
|
69
|
+
from pathlib import Path
|
|
70
|
+
p = Path('server.json')
|
|
71
|
+
if not p.exists():
|
|
72
|
+
print('server.json not found', file=sys.stderr)
|
|
73
|
+
sys.exit(1)
|
|
74
|
+
with p.open('r', encoding='utf-8') as f:
|
|
75
|
+
json.load(f)
|
|
76
|
+
print('OK: server.json exists and is valid JSON')
|
|
77
|
+
PY
|
|
78
|
+
|
|
79
|
+
security:
|
|
80
|
+
name: Security Scan
|
|
81
|
+
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v5
|
|
86
|
+
|
|
87
|
+
- name: Run Trivy security scanner
|
|
88
|
+
uses: aquasecurity/trivy-action@master
|
|
89
|
+
with:
|
|
90
|
+
scan-type: 'fs'
|
|
91
|
+
scan-ref: '.'
|
|
92
|
+
format: 'sarif'
|
|
93
|
+
output: 'trivy-results.sarif'
|
|
94
|
+
|
|
95
|
+
- name: Upload Trivy results to GitHub Security
|
|
96
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
97
|
+
if: always()
|
|
98
|
+
with:
|
|
99
|
+
sarif_file: 'trivy-results.sarif'
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
name: Build and Publish Application
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build Application
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
env:
|
|
16
|
+
SERVER_NAME: io.github.alex-feel/mcp-context-server
|
|
17
|
+
PACKAGE_NAME: mcp-context-server
|
|
18
|
+
outputs:
|
|
19
|
+
dist-path: ${{ steps.build.outputs.dist-path }}
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v5
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version-file: pyproject.toml
|
|
29
|
+
|
|
30
|
+
- name: Install uv
|
|
31
|
+
uses: astral-sh/setup-uv@v6
|
|
32
|
+
with:
|
|
33
|
+
enable-cache: true
|
|
34
|
+
cache-dependency-glob: 'pyproject.toml'
|
|
35
|
+
|
|
36
|
+
- name: Refresh uv.lock for this release
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
# Recreate lock so it captures the project version from the tagged commit
|
|
40
|
+
uv lock
|
|
41
|
+
test -f uv.lock || { echo 'uv.lock was not created' >&2; exit 1; }
|
|
42
|
+
|
|
43
|
+
- name: Assert uv.lock contains the release version
|
|
44
|
+
run: |
|
|
45
|
+
set -euo pipefail
|
|
46
|
+
tag='${{ github.event.release.tag_name }}'
|
|
47
|
+
version="${tag#v}" # strip leading 'v' if present
|
|
48
|
+
# Check that the version string exists in uv.lock
|
|
49
|
+
if grep -Eq "version\\s*=\\s*\"${version}\"" uv.lock; then
|
|
50
|
+
echo "OK: uv.lock references version ${version}"
|
|
51
|
+
else
|
|
52
|
+
echo "uv.lock does not reference version ${version}" >&2
|
|
53
|
+
echo 'Dumping first 80 lines for debugging:'
|
|
54
|
+
head -n 80 uv.lock || true
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
- name: Build component
|
|
59
|
+
id: build
|
|
60
|
+
run: |
|
|
61
|
+
uv build
|
|
62
|
+
echo "dist-path=dist" >> "$GITHUB_OUTPUT"
|
|
63
|
+
|
|
64
|
+
- name: Upload artifacts
|
|
65
|
+
uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: python-dists
|
|
68
|
+
path: ${{ steps.build.outputs.dist-path }}/
|
|
69
|
+
|
|
70
|
+
publish-to-pypi:
|
|
71
|
+
name: Publish Application to PyPI
|
|
72
|
+
needs: build
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write
|
|
76
|
+
environment:
|
|
77
|
+
name: pypi
|
|
78
|
+
url: https://pypi.org/project/mcp-context-server/${{ github.event.release.tag_name }}
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- name: Download artifacts
|
|
82
|
+
uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: python-dists
|
|
85
|
+
path: dist/
|
|
86
|
+
|
|
87
|
+
- name: Publish to PyPI
|
|
88
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
89
|
+
with:
|
|
90
|
+
packages-dir: dist/
|
|
91
|
+
|
|
92
|
+
publish-to-mcp-registry:
|
|
93
|
+
name: Publish Application to MCP Registry
|
|
94
|
+
needs: publish-to-pypi
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
permissions:
|
|
97
|
+
id-token: write
|
|
98
|
+
env:
|
|
99
|
+
SERVER_NAME: io.github.alex-feel/mcp-context-server
|
|
100
|
+
PACKAGE_NAME: mcp-context-server
|
|
101
|
+
|
|
102
|
+
steps:
|
|
103
|
+
- name: Checkout code
|
|
104
|
+
uses: actions/checkout@v5
|
|
105
|
+
|
|
106
|
+
- name: Install tools
|
|
107
|
+
run: |
|
|
108
|
+
sudo apt-get update
|
|
109
|
+
sudo apt-get install -y jq
|
|
110
|
+
|
|
111
|
+
- name: Set up Go
|
|
112
|
+
uses: actions/setup-go@v5
|
|
113
|
+
with:
|
|
114
|
+
go-version: '1.22'
|
|
115
|
+
|
|
116
|
+
- name: Build mcp-publisher from source
|
|
117
|
+
run: |
|
|
118
|
+
set -eux
|
|
119
|
+
git clone https://github.com/modelcontextprotocol/registry mcp-registry
|
|
120
|
+
cd mcp-registry
|
|
121
|
+
go build -o ../mcp-publisher ./cmd/publisher
|
|
122
|
+
cd ..
|
|
123
|
+
./mcp-publisher --help
|
|
124
|
+
|
|
125
|
+
- name: Wait for PyPI to serve this release
|
|
126
|
+
run: |
|
|
127
|
+
set -euo pipefail
|
|
128
|
+
tag='${{ github.event.release.tag_name }}'
|
|
129
|
+
version="${tag#v}" # срезаем префикс v, если есть
|
|
130
|
+
for i in {1..30}; do
|
|
131
|
+
if curl -sf https://pypi.org/pypi/${PACKAGE_NAME}/json | jq -e --arg v "$version" '.releases[$v]'; then
|
|
132
|
+
echo "PyPI has version $version"
|
|
133
|
+
exit 0
|
|
134
|
+
fi
|
|
135
|
+
echo "Waiting for PyPI to serve $version, attempt $i"
|
|
136
|
+
sleep 10
|
|
137
|
+
done
|
|
138
|
+
echo "Version $version not visible on PyPI yet"
|
|
139
|
+
exit 1
|
|
140
|
+
|
|
141
|
+
- name: Login to MCP Registry using GitHub OIDC
|
|
142
|
+
run: ./mcp-publisher login github-oidc
|
|
143
|
+
|
|
144
|
+
- name: Publish to MCP Registry
|
|
145
|
+
run: ./mcp-publisher publish --file server.json
|
|
146
|
+
|
|
147
|
+
- name: Verify in MCP Registry
|
|
148
|
+
run: |
|
|
149
|
+
curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=${SERVER_NAME}" | jq .
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
name: Release Please
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
outputs:
|
|
18
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
19
|
+
steps:
|
|
20
|
+
- id: release
|
|
21
|
+
uses: googleapis/release-please-action@v4
|
|
22
|
+
with:
|
|
23
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
24
|
+
config-file: release-please-config.json
|
|
25
|
+
manifest-file: .release-please-manifest.json
|
|
26
|
+
|
|
27
|
+
update-uv-lock:
|
|
28
|
+
name: Update uv.lock file
|
|
29
|
+
needs: release-please
|
|
30
|
+
if: ${{ needs.release-please.outputs.release_created }}
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout code
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
ref: main
|
|
37
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
38
|
+
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version-file: pyproject.toml
|
|
43
|
+
|
|
44
|
+
- name: Install uv
|
|
45
|
+
uses: astral-sh/setup-uv@v6
|
|
46
|
+
|
|
47
|
+
- name: Update uv.lock file
|
|
48
|
+
run: uv lock
|
|
49
|
+
|
|
50
|
+
- name: Commit and push updated uv.lock
|
|
51
|
+
run: |
|
|
52
|
+
git config --global user.name "GitHub Actions Bot"
|
|
53
|
+
git config --global user.email "actions@github.com"
|
|
54
|
+
git add uv.lock
|
|
55
|
+
git commit -m "chore: update uv.lock after version bump [skip ci]" || echo "No changes to commit"
|
|
56
|
+
git remote set-url origin https://x-access-token:${{ secrets.RELEASE_PLEASE_TOKEN }}@github.com/${GITHUB_REPOSITORY}
|
|
57
|
+
git push
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Test & Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
checks: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Test
|
|
15
|
+
if: ${{ ! startsWith(github.head_ref, 'release-please--branches--') }}
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout code
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version-file: pyproject.toml
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v6
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
cache-dependency-glob: "pyproject.toml"
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: uv sync --dev
|
|
35
|
+
|
|
36
|
+
- name: Run pytest with coverage
|
|
37
|
+
run: uv run pytest -v --cov=app --cov-report=term-missing --cov-report=xml --cov-report=html --junit-xml=test-results.xml tests/
|
|
38
|
+
|
|
39
|
+
- name: Upload test results
|
|
40
|
+
if: always()
|
|
41
|
+
uses: actions/upload-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: test-results
|
|
44
|
+
path: test-results.xml
|
|
45
|
+
|
|
46
|
+
- name: Upload coverage reports
|
|
47
|
+
uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: coverage-report
|
|
50
|
+
path: |
|
|
51
|
+
coverage.xml
|
|
52
|
+
htmlcov/
|
|
53
|
+
|
|
54
|
+
- name: Surface test results
|
|
55
|
+
if: always()
|
|
56
|
+
uses: pmeier/pytest-results-action@main
|
|
57
|
+
with:
|
|
58
|
+
path: test-results.xml
|
|
59
|
+
summary: true
|
|
60
|
+
display-options: fEX
|
|
61
|
+
fail-on-empty: true
|
|
62
|
+
|
|
63
|
+
- name: Coverage comment
|
|
64
|
+
if: github.event_name == 'pull_request'
|
|
65
|
+
uses: py-cov-action/python-coverage-comment-action@v3
|
|
66
|
+
with:
|
|
67
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
68
|
+
MINIMUM_GREEN: 80
|
|
69
|
+
MINIMUM_ORANGE: 60
|
|
70
|
+
|
|
71
|
+
# Summary job
|
|
72
|
+
summary:
|
|
73
|
+
name: Test Summary
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
needs: [test]
|
|
76
|
+
if: ${{ always() && ! startsWith(github.head_ref, 'release-please--branches--') }}
|
|
77
|
+
|
|
78
|
+
steps:
|
|
79
|
+
- name: Summary
|
|
80
|
+
run: |
|
|
81
|
+
echo "## Test Summary" >> $GITHUB_STEP_SUMMARY
|
|
82
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
83
|
+
echo "✅ All tests completed successfully!" >> $GITHUB_STEP_SUMMARY
|
|
84
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
85
|
+
echo "### Platform" >> $GITHUB_STEP_SUMMARY
|
|
86
|
+
echo "- ✅ Ubuntu" >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
### IDE
|
|
2
|
+
.idea
|
|
3
|
+
.claude
|
|
4
|
+
|
|
5
|
+
### Python template
|
|
6
|
+
# Byte-compiled / optimized / DLL files
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*$py.class
|
|
10
|
+
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
.installed.cfg
|
|
31
|
+
*.egg
|
|
32
|
+
MANIFEST
|
|
33
|
+
|
|
34
|
+
# PyInstaller
|
|
35
|
+
# Usually these files are written by a python script from a template
|
|
36
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
37
|
+
*.manifest
|
|
38
|
+
*.spec
|
|
39
|
+
|
|
40
|
+
# Installer logs
|
|
41
|
+
pip-log.txt
|
|
42
|
+
pip-delete-this-directory.txt
|
|
43
|
+
|
|
44
|
+
# Linting
|
|
45
|
+
.ruff_cache/
|
|
46
|
+
|
|
47
|
+
# Unit / coverage reports
|
|
48
|
+
htmlcov/
|
|
49
|
+
.tox/
|
|
50
|
+
.nox/
|
|
51
|
+
.coverage
|
|
52
|
+
.coverage.*
|
|
53
|
+
.cache
|
|
54
|
+
nosetests.xml
|
|
55
|
+
coverage.xml
|
|
56
|
+
*.cover
|
|
57
|
+
*.py,cover
|
|
58
|
+
.hypothesis/
|
|
59
|
+
.pytest_cache/
|
|
60
|
+
cover/
|
|
61
|
+
report.xml
|
|
62
|
+
|
|
63
|
+
# Translations
|
|
64
|
+
*.mo
|
|
65
|
+
*.pot
|
|
66
|
+
|
|
67
|
+
# Django stuff:
|
|
68
|
+
*.log
|
|
69
|
+
local_settings.py
|
|
70
|
+
db.sqlite3
|
|
71
|
+
db.sqlite3-journal
|
|
72
|
+
|
|
73
|
+
# Flask stuff:
|
|
74
|
+
instance/
|
|
75
|
+
.webassets-cache
|
|
76
|
+
|
|
77
|
+
# Scrapy stuff:
|
|
78
|
+
.scrapy
|
|
79
|
+
|
|
80
|
+
# Sphinx documentation
|
|
81
|
+
docs/_build/
|
|
82
|
+
|
|
83
|
+
# PyBuilder
|
|
84
|
+
.pybuilder/
|
|
85
|
+
target/
|
|
86
|
+
|
|
87
|
+
# Jupyter Notebook
|
|
88
|
+
.ipynb_checkpoints
|
|
89
|
+
|
|
90
|
+
# IPython
|
|
91
|
+
profile_default/
|
|
92
|
+
ipython_config.py
|
|
93
|
+
|
|
94
|
+
# pyenv
|
|
95
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
96
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
97
|
+
# .python-version
|
|
98
|
+
|
|
99
|
+
# pipenv
|
|
100
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
101
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
102
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
103
|
+
# install all needed dependencies.
|
|
104
|
+
#Pipfile.lock
|
|
105
|
+
|
|
106
|
+
# poetry
|
|
107
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
108
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
109
|
+
# commonly ignored for libraries.
|
|
110
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
111
|
+
#poetry.lock
|
|
112
|
+
|
|
113
|
+
# pdm
|
|
114
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
115
|
+
#pdm.lock
|
|
116
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
117
|
+
# in version control.
|
|
118
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
119
|
+
.pdm.toml
|
|
120
|
+
|
|
121
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
122
|
+
__pypackages__/
|
|
123
|
+
|
|
124
|
+
# Celery stuff
|
|
125
|
+
celerybeat-schedule
|
|
126
|
+
celerybeat.pid
|
|
127
|
+
|
|
128
|
+
# SageMath parsed files
|
|
129
|
+
*.sage.py
|
|
130
|
+
|
|
131
|
+
# Environments
|
|
132
|
+
.env
|
|
133
|
+
.venv
|
|
134
|
+
env/
|
|
135
|
+
venv/
|
|
136
|
+
ENV/
|
|
137
|
+
env.bak/
|
|
138
|
+
venv.bak/
|
|
139
|
+
|
|
140
|
+
# Spyder project settings
|
|
141
|
+
.spyderproject
|
|
142
|
+
.spyproject
|
|
143
|
+
|
|
144
|
+
# Rope project settings
|
|
145
|
+
.ropeproject
|
|
146
|
+
|
|
147
|
+
# mkdocs documentation
|
|
148
|
+
/site
|
|
149
|
+
|
|
150
|
+
# mypy
|
|
151
|
+
.mypy_cache/
|
|
152
|
+
.dmypy.json
|
|
153
|
+
dmypy.json
|
|
154
|
+
|
|
155
|
+
# Pyre type checker
|
|
156
|
+
.pyre/
|
|
157
|
+
|
|
158
|
+
# pytype static type analyzer
|
|
159
|
+
.pytype/
|
|
160
|
+
|
|
161
|
+
# Cython debug symbols
|
|
162
|
+
cython_debug/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.13.1
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-check
|
|
6
|
+
name: Ruff (lint + autofix)
|
|
7
|
+
description: Fast Python linter (Flake8, isort, quotes, etc.) with --fix enabled
|
|
8
|
+
args: [--fix, .]
|
|
9
|
+
pass_filenames: false
|
|
10
|
+
always_run: true
|
|
11
|
+
|
|
12
|
+
- repo: local
|
|
13
|
+
hooks:
|
|
14
|
+
- id: mypy
|
|
15
|
+
name: Mypy (uv)
|
|
16
|
+
language: system
|
|
17
|
+
entry: uv
|
|
18
|
+
args: ['run', '--frozen', '--group', 'dev', '--', 'mypy', '--config-file=pyproject.toml']
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
always_run: true
|
|
21
|
+
types_or: [python, pyi]
|
|
22
|
+
|
|
23
|
+
- repo: local
|
|
24
|
+
hooks:
|
|
25
|
+
- id: pyright
|
|
26
|
+
name: Pyright (uv)
|
|
27
|
+
language: system
|
|
28
|
+
entry: uv
|
|
29
|
+
args: ['run', '--frozen', '--group', 'dev', '--', 'pyright']
|
|
30
|
+
pass_filenames: false
|
|
31
|
+
always_run: true
|
|
32
|
+
|
|
33
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
34
|
+
rev: v6.0.0
|
|
35
|
+
hooks:
|
|
36
|
+
- id: end-of-file-fixer
|
|
37
|
+
name: End-of-file fixer (non-Python)
|
|
38
|
+
description: Ensures every *non-Python* file is empty or ends with a single newline
|
|
39
|
+
exclude: ^.*\.(json|pyi?|py)$
|
|
40
|
+
|
|
41
|
+
- id: trailing-whitespace
|
|
42
|
+
name: Trailing-whitespace (non-Python)
|
|
43
|
+
description: Trims trailing whitespace in non-Python text files
|
|
44
|
+
exclude: ^.*\.(pyi?|py)$
|
|
45
|
+
|
|
46
|
+
- id: check-shebang-scripts-are-executable
|
|
47
|
+
name: Check shebang scripts
|
|
48
|
+
description: Check that text files with a shebang are executable
|
|
49
|
+
|
|
50
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
51
|
+
rev: 0.8.19
|
|
52
|
+
hooks:
|
|
53
|
+
- id: uv-lock
|
|
54
|
+
name: Make sure uv.lock file is up to date
|
|
55
|
+
|
|
56
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
57
|
+
rev: v4.9.1
|
|
58
|
+
hooks:
|
|
59
|
+
- id: commitizen
|