Skip to content

Commit 9efe1a7

Browse files
author
Zvi Fried
committed
feat/initial-release-infrastructure - feat: initial release infrastructure with comprehensive CI/CD
- Add GitHub Actions workflows for CI, release, and semantic versioning - Configure automated PyPI publishing with semantic-release - Setup Docker image publishing to GitHub Container Registry - Add pre-commit hooks for code quality enforcement - Configure Dependabot for automated dependency updates - Update project configuration for modern Python packaging - Add comprehensive documentation for installation and development - Setup conventional commits for automated versioning - Add PR templates and issue templates for better collaboration - Configure Codecov integration for test coverage tracking BREAKING CHANGE: Initial release - no previous versions to break
0 parents  commit 9efe1a7

34 files changed

+4750
-0
lines changed

.dockerignore

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Virtual environments
25+
.env
26+
.venv
27+
env/
28+
venv/
29+
ENV/
30+
env.bak/
31+
venv.bak/
32+
33+
# IDE
34+
.vscode/
35+
.idea/
36+
*.swp
37+
*.swo
38+
*~
39+
40+
# OS
41+
.DS_Store
42+
.DS_Store?
43+
._*
44+
.Spotlight-V100
45+
.Trashes
46+
ehthumbs.db
47+
Thumbs.db
48+
49+
# Git
50+
.git/
51+
.gitignore
52+
53+
# Testing
54+
.pytest_cache/
55+
.coverage
56+
htmlcov/
57+
.tox/
58+
.nox/
59+
60+
# Documentation
61+
docs/_build/
62+
63+
# Logs
64+
*.log
65+
66+
# Temporary files
67+
*.tmp
68+
*.temp
69+
70+
# Development files
71+
tests/
72+
docs/
73+
examples/
74+
*.md
75+
!README.md
76+
77+
# uv
78+
.uv/
79+
uv.lock

.env.example

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# MCP as a Judge Configuration
2+
# Copy this file to .env and configure your settings
3+
4+
# Transport Configuration
5+
# Options: "stdio" or "sse"
6+
TRANSPORT=stdio
7+
8+
# Server Configuration (for SSE transport)
9+
HOST=0.0.0.0
10+
PORT=8050
11+
12+
# Logging Configuration
13+
LOG_LEVEL=INFO
14+
LOG_FORMAT=json
15+
16+
# Development Settings
17+
DEBUG=false
18+
DEVELOPMENT_MODE=false
19+
20+
# Health Check Configuration
21+
HEALTH_CHECK_ENABLED=true
22+
HEALTH_CHECK_INTERVAL=30
23+
24+
# Performance Settings
25+
MAX_CONCURRENT_REQUESTS=10
26+
REQUEST_TIMEOUT=30
27+
28+
# Security Settings
29+
CORS_ENABLED=false
30+
CORS_ORIGINS=*
31+
32+
# Example MCP Client Configuration
33+
# Add this to your Claude Desktop or Cursor configuration:
34+
#
35+
# For SSE Transport:
36+
# {
37+
# "mcpServers": {
38+
# "mcp-as-a-judge": {
39+
# "transport": "sse",
40+
# "url": "http://localhost:8050/sse"
41+
# }
42+
# }
43+
# }
44+
#
45+
# For Stdio Transport:
46+
# {
47+
# "mcpServers": {
48+
# "mcp-as-a-judge": {
49+
# "command": "uv",
50+
# "args": ["run", "mcp-as-a-judge"],
51+
# "env": {
52+
# "TRANSPORT": "stdio"
53+
# }
54+
# }
55+
# }
56+
# }

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Description
2+
3+
Brief description of the changes in this PR.
4+
5+
## Type of Change
6+
7+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
8+
- [ ] ✨ New feature (non-breaking change which adds functionality)
9+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] 📚 Documentation update
11+
- [ ] 🔧 Maintenance/refactoring
12+
- [ ] ⚡ Performance improvement
13+
- [ ] 🧪 Test improvement
14+
15+
## Testing
16+
17+
- [ ] Tests pass locally with my changes
18+
- [ ] I have added tests that prove my fix is effective or that my feature works
19+
- [ ] New and existing unit tests pass locally with my changes
20+
- [ ] Any dependent changes have been merged and published in downstream modules
21+
22+
## Checklist
23+
24+
- [ ] My code follows the style guidelines of this project
25+
- [ ] I have performed a self-review of my own code
26+
- [ ] I have commented my code, particularly in hard-to-understand areas
27+
- [ ] I have made corresponding changes to the documentation
28+
- [ ] My changes generate no new warnings
29+
- [ ] I have added tests that prove my fix is effective or that my feature works
30+
- [ ] New and existing unit tests pass locally with my changes
31+
- [ ] Any dependent changes have been merged and published in downstream modules
32+
- [ ] I have checked my code and corrected any misspellings
33+
34+
## Related Issues
35+
36+
Closes #(issue number)
37+
38+
## Screenshots (if applicable)
39+
40+
## Additional Notes
41+
42+
Any additional information that reviewers should know.

.github/dependabot.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Python dependencies
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "hepivax"
13+
assignees:
14+
- "hepivax"
15+
commit-message:
16+
prefix: "deps"
17+
include: "scope"
18+
labels:
19+
- "dependencies"
20+
- "python"
21+
22+
# Enable version updates for GitHub Actions
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
day: "monday"
28+
time: "09:00"
29+
open-pull-requests-limit: 5
30+
reviewers:
31+
- "hepivax"
32+
assignees:
33+
- "hepivax"
34+
commit-message:
35+
prefix: "ci"
36+
include: "scope"
37+
labels:
38+
- "dependencies"
39+
- "github-actions"
40+
41+
# Enable version updates for Docker
42+
- package-ecosystem: "docker"
43+
directory: "/"
44+
schedule:
45+
interval: "weekly"
46+
day: "monday"
47+
time: "09:00"
48+
open-pull-requests-limit: 5
49+
reviewers:
50+
- "hepivax"
51+
assignees:
52+
- "hepivax"
53+
commit-message:
54+
prefix: "docker"
55+
include: "scope"
56+
labels:
57+
- "dependencies"
58+
- "docker"

.github/workflows/ci.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
PYTHON_VERSION: "3.12"
11+
12+
jobs:
13+
test:
14+
name: Test Suite
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.12", "3.13"]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v4
26+
with:
27+
version: "latest"
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
run: uv python install ${{ matrix.python-version }}
31+
32+
- name: Install dependencies
33+
run: |
34+
uv sync --all-extras --dev
35+
36+
- name: Run linting
37+
run: |
38+
uv run ruff check src tests
39+
uv run ruff format --check src tests
40+
41+
- name: Run type checking
42+
run: |
43+
uv run mypy src
44+
45+
- name: Run tests
46+
run: |
47+
uv run pytest --cov=src/mcp_as_a_judge --cov-report=xml --cov-report=term-missing
48+
49+
- name: Upload coverage to Codecov
50+
uses: codecov/codecov-action@v4
51+
with:
52+
file: ./coverage.xml
53+
fail_ci_if_error: true
54+
token: ${{ secrets.CODECOV_TOKEN }}
55+
56+
security:
57+
name: Security Scan
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v4
63+
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@v4
66+
with:
67+
version: "latest"
68+
69+
- name: Set up Python
70+
run: uv python install ${{ env.PYTHON_VERSION }}
71+
72+
- name: Install dependencies
73+
run: uv sync --all-extras --dev
74+
75+
- name: Run safety check
76+
run: |
77+
uv add --dev safety
78+
uv run safety check
79+
80+
- name: Run bandit security linter
81+
run: |
82+
uv add --dev bandit
83+
uv run bandit -r src/
84+
85+
build:
86+
name: Build Package
87+
runs-on: ubuntu-latest
88+
needs: [test, security]
89+
90+
steps:
91+
- name: Checkout code
92+
uses: actions/checkout@v4
93+
94+
- name: Install uv
95+
uses: astral-sh/setup-uv@v4
96+
with:
97+
version: "latest"
98+
99+
- name: Set up Python
100+
run: uv python install ${{ env.PYTHON_VERSION }}
101+
102+
- name: Install dependencies
103+
run: uv sync --all-extras --dev
104+
105+
- name: Build package
106+
run: |
107+
uv build --no-sources
108+
109+
- name: Check package
110+
run: |
111+
uv add --dev twine
112+
uv run twine check dist/*
113+
114+
- name: Upload build artifacts
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: dist
118+
path: dist/
119+
retention-days: 7
120+
121+
docker:
122+
name: Build Docker Image
123+
runs-on: ubuntu-latest
124+
needs: [test, security]
125+
126+
steps:
127+
- name: Checkout code
128+
uses: actions/checkout@v4
129+
130+
- name: Set up Docker Buildx
131+
uses: docker/setup-buildx-action@v3
132+
133+
- name: Build Docker image
134+
uses: docker/build-push-action@v5
135+
with:
136+
context: .
137+
push: false
138+
tags: mcp-as-a-judge:test
139+
cache-from: type=gha
140+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)