Skip to content

Commit 21cfd79

Browse files
author
Zvi Fried
committed
feat/general-refinement - Upgrade to Python 3.13.5 and improve coverage configuration
- Upgrade Python version from 3.12 to 3.13.5 across all configurations: * Update .python-version, pyproject.toml, and all GitHub workflows * Update Dockerfile to use python:3.13-slim base images * Update README badge and CONTRIBUTING.md requirements * Regenerate uv.lock with Python 3.13 dependencies - Add Python 3.13+ to system prerequisites in README - Improve coverage configuration in pyproject.toml: * Add comprehensive source and omit patterns * Configure exclude_lines for better coverage reporting * Set XML output configuration - Update CI workflow for better Codecov integration: * Set fail_ci_if_error to false for more reliable CI * Add verbose output for better debugging * Ensure CODECOV_TOKEN environment variable is properly set - All 37 tests passing on Python 3.13.5 - MyPy type checking clean with Python 3.13
1 parent a8faee1 commit 21cfd79

File tree

9 files changed

+142
-169
lines changed

9 files changed

+142
-169
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ on:
77
branches: [ main, develop ]
88

99
env:
10-
PYTHON_VERSION: "3.12"
10+
PYTHON_VERSION: "3.13"
1111

1212
jobs:
1313
test:
1414
name: Test Suite
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ["3.12", "3.13"]
18+
python-version: ["3.13"]
1919

2020
steps:
2121
- name: Checkout code
@@ -50,8 +50,11 @@ jobs:
5050
uses: codecov/codecov-action@v4
5151
with:
5252
file: ./coverage.xml
53-
fail_ci_if_error: true
53+
fail_ci_if_error: false
54+
verbose: true
5455
token: ${{ secrets.CODECOV_TOKEN }}
56+
env:
57+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5558

5659
security:
5760
name: Security Scan

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'v*'
77

88
env:
9-
PYTHON_VERSION: "3.12"
9+
PYTHON_VERSION: "3.13"
1010
REGISTRY: ghcr.io
1111
IMAGE_NAME: ${{ github.repository }}
1212

.github/workflows/semantic-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
env:
10-
PYTHON_VERSION: "3.12"
10+
PYTHON_VERSION: "3.13"
1111

1212
jobs:
1313
semantic-release:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MCP as a Judge aims to revolutionize software development by preventing bad codi
1010

1111
### **Prerequisites**
1212

13-
- Python 3.12.10+ (latest secure version)
13+
- Python 3.13.5+ (latest secure version)
1414
- uv (recommended) or pip
1515
- Git
1616
- A compatible MCP client for testing

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Multi-stage build for production-ready MCP as a Judge server
2-
FROM python:3.12-slim AS builder
2+
FROM python:3.13-slim AS builder
33

44

55

@@ -32,7 +32,7 @@ RUN .venv/bin/pip install uv
3232
RUN .venv/bin/uv pip install -e .
3333

3434
# Production stage
35-
FROM python:3.12-slim AS production
35+
FROM python:3.13-slim AS production
3636

3737
# Set environment variables
3838
ENV PYTHONUNBUFFERED=1 \

README.md

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> **Prevent bad coding practices with AI-powered evaluation and user-driven decision making**
44
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6-
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
6+
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
77
[![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)
88

99
[![CI](https://github.com/hepivax/mcp-as-a-judge/workflows/CI/badge.svg)](https://github.com/hepivax/mcp-as-a-judge/actions/workflows/ci.yml)
@@ -80,6 +80,10 @@ MCP as a Judge is heavily dependent on **MCP Sampling** and **MCP Elicitation**
8080
- **[MCP Sampling](https://modelcontextprotocol.io/docs/learn/client-concepts#sampling)** - Required for AI-powered code evaluation and judgment
8181
- **[MCP Elicitation](https://modelcontextprotocol.io/docs/learn/client-concepts#elicitation)** - Required for interactive user decision prompts
8282

83+
#### **System Prerequisites**
84+
85+
- **Python 3.13+** - Required for running the MCP server
86+
8387
#### **Supported AI Assistants**
8488

8589
| AI Assistant | Platform | MCP Support | Status | Notes |
@@ -96,53 +100,41 @@ MCP as a Judge is heavily dependent on **MCP Sampling** and **MCP Elicitation**
96100

97101
> **Note**: MCP servers communicate via stdio (standard input/output), not HTTP ports. No network configuration is needed.
98102
99-
### **Installation**
100-
101-
#### **Method 1: Using uv (Recommended)**
102-
103-
```bash
104-
# Install uv if you don't have it
105-
pip install uv
106103

107-
# Install from PyPI
108-
uv add mcp-as-a-judge
109104

110-
# Run the server
111-
mcp-as-a-judge
112-
```
105+
## 🔧 **Visual Studio Code Configuration**
113106

114-
#### **Method 2: Using pip (Alternative)**
107+
Configure MCP as a Judge in Visual Studio Code with GitHub Copilot:
115108

116-
```bash
117-
# Install from PyPI
118-
pip install mcp-as-a-judge
109+
### **Method 1: Using uv (Recommended)**
119110

120-
# Run the server
121-
mcp-as-a-judge
122-
```
123-
124-
#### **Method 3: From Source (Development)**
111+
1. **Install the package:**
125112

126-
```bash
127-
# Clone the repository for development
128-
git clone https://github.com/hepivax/mcp-as-a-judge.git
129-
cd mcp-as-a-judge
113+
```bash
114+
uv add mcp-as-a-judge
115+
```
130116

131-
# Install with uv
132-
uv sync --all-extras --dev
117+
2. **Configure Visual Studio Code MCP settings:**
133118

134-
# Run the server
135-
uv run mcp-as-a-judge
136-
```
119+
Add this to your Visual Studio Code MCP configuration file:
137120

138-
## 🔧 **Visual Studio Code Configuration**
121+
```json
122+
{
123+
"servers": {
124+
"mcp-as-a-judge": {
125+
"command": "uv",
126+
"args": ["run", "mcp-as-a-judge"]
127+
}
128+
}
129+
}
130+
```
139131

140-
Configure MCP as a Judge in Visual Studio Code with GitHub Copilot:
132+
### **Method 2: Using Docker**
141133

142-
1. **Install the package:**
134+
1. **Pull the Docker image:**
143135

144136
```bash
145-
uv add mcp-as-a-judge
137+
docker pull ghcr.io/hepivax/mcp-as-a-judge:latest
146138
```
147139

148140
2. **Configure Visual Studio Code MCP settings:**
@@ -153,8 +145,8 @@ Configure MCP as a Judge in Visual Studio Code with GitHub Copilot:
153145
{
154146
"servers": {
155147
"mcp-as-a-judge": {
156-
"command": "uv",
157-
"args": ["run", "mcp-as-a-judge"]
148+
"command": "docker",
149+
"args": ["run", "--rm", "-i", "ghcr.io/hepivax/mcp-as-a-judge:latest"]
158150
}
159151
}
160152
}

codecov.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 80%
6+
threshold: 1%
7+
if_not_found: success
8+
patch:
9+
default:
10+
target: 80%
11+
threshold: 1%
12+
if_not_found: success
13+
14+
comment:
15+
layout: "reach,diff,flags,tree"
16+
behavior: default
17+
require_changes: false
18+
19+
ignore:
20+
- "tests/"
21+
- "scripts/"
22+
- "**/__pycache__/"
23+
- "**/*.pyc"

pyproject.toml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ classifiers = [
1616
"Intended Audience :: Developers",
1717
"License :: OSI Approved :: MIT License",
1818
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.12",
2019
"Programming Language :: Python :: 3.13",
2120
"Topic :: Software Development :: Quality Assurance",
2221
"Topic :: Software Development :: Code Generators",
@@ -26,7 +25,7 @@ classifiers = [
2625
"Environment :: Console",
2726
"Typing :: Typed",
2827
]
29-
requires-python = ">=3.12"
28+
requires-python = ">=3.13"
3029
dependencies = [
3130
"jinja2>=3.1.6",
3231
"mcp[cli]>=1.13.0",
@@ -113,7 +112,7 @@ skip-magic-trailing-comma = false
113112
line-ending = "auto"
114113

115114
[tool.mypy]
116-
python_version = "3.12"
115+
python_version = "3.13"
117116
warn_return_any = true
118117
warn_unused_configs = true
119118
disallow_untyped_defs = true
@@ -142,3 +141,30 @@ markers = [
142141
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
143142
"integration: marks tests as integration tests",
144143
]
144+
145+
[tool.coverage.run]
146+
source = ["src"]
147+
omit = [
148+
"tests/*",
149+
"*/tests/*",
150+
"*/__pycache__/*",
151+
"*/venv/*",
152+
"*/.venv/*",
153+
]
154+
155+
[tool.coverage.report]
156+
exclude_lines = [
157+
"pragma: no cover",
158+
"def __repr__",
159+
"if self.debug:",
160+
"if settings.DEBUG",
161+
"raise AssertionError",
162+
"raise NotImplementedError",
163+
"if 0:",
164+
"if __name__ == .__main__.:",
165+
"class .*\\bProtocol\\):",
166+
"@(abc\\.)?abstractmethod",
167+
]
168+
169+
[tool.coverage.xml]
170+
output = "coverage.xml"

0 commit comments

Comments
 (0)