Skip to content

Commit de0254d

Browse files
committed
nuke useless scripts
1 parent 48347ab commit de0254d

15 files changed

Lines changed: 307 additions & 498 deletions

.github/workflows/ci.yml

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,82 @@
11
name: CI
2+
23
on:
34
push:
4-
branches: [ main ]
5+
branches: [ main, develop ]
56
pull_request:
67
branches: [ main ]
8+
79
jobs:
8-
build-and-test:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up R
20+
uses: r-lib/actions/setup-r@v2
21+
with:
22+
r-version: 'release'
23+
24+
- name: Install R packages
25+
run: |
26+
R -e "install.packages(c('plm', 'lmtest', 'sandwich', 'AER', 'jsonlite', 'forecast', 'dplyr', 'tseries', 'nortest', 'car', 'rpart', 'randomForest', 'vars', 'ggplot2', 'gridExtra', 'tidyr', 'rlang', 'urca'), repos='https://cran.rstudio.com/')"
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install click jsonschema
37+
pip install -e .
38+
39+
- name: Test CLI works
40+
run: |
41+
rmcp --version
42+
rmcp list-capabilities > /dev/null
43+
44+
- name: Run basic tests
45+
run: |
46+
python tests/test_server_basic.py
47+
48+
- name: Run MCP interface tests
49+
run: |
50+
python tests/test_mcp_interface.py
51+
52+
- name: Run realistic scenarios
53+
run: |
54+
python tests/realistic_scenarios.py
55+
56+
lint:
957
runs-on: ubuntu-latest
1058
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@v3
13-
- name: Set up Python 3.10
14-
uses: actions/setup-python@v4
15-
with:
16-
python-version: '3.10'
17-
- name: Install Python dependencies
18-
run: |
19-
pip install --upgrade pip
20-
pip install pytest
21-
pip install -r requirements.txt
22-
- name: Build Docker image
23-
run: docker build -t mcp-r .
24-
# Run unit tests inside the Docker container where R is available
25-
- name: Run unit tests in container
26-
run: docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcp-r python tests/test_mcp_interface.py
27-
# End-to-end test using the container
28-
- name: End-to-end test via Docker
29-
run: |
30-
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcp-r python tests/test_direct_capabilities.py
59+
- uses: actions/checkout@v4
60+
61+
- name: Set up Python
62+
uses: actions/setup-python@v4
63+
with:
64+
python-version: "3.11"
65+
66+
- name: Install linting tools
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install black isort flake8 mypy click jsonschema
70+
pip install -e .
71+
72+
- name: Run black
73+
run: black --check rmcp tests
74+
75+
- name: Run isort
76+
run: isort --check-only rmcp tests
77+
78+
- name: Run flake8
79+
run: flake8 rmcp tests
80+
81+
- name: Run mypy
82+
run: mypy rmcp

CLAUDE.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,43 @@ The server implements comprehensive econometric and statistical tools as Python
5555

5656
## Development Commands
5757

58+
### Setup with Poetry
59+
```bash
60+
# Install dependencies
61+
poetry install
62+
63+
# Install with all optional groups
64+
poetry install --all-extras
65+
66+
# Install development dependencies
67+
poetry install --with dev
68+
69+
# Activate virtual environment
70+
poetry shell
71+
```
72+
5873
### CLI Commands
5974
```bash
6075
# Check version
61-
rmcp version
76+
poetry run rmcp version
6277

6378
# Start server (auto-detects MCP protocol vs legacy JSON)
64-
rmcp start
79+
poetry run rmcp start
6580

6681
# Run development server
67-
rmcp dev [optional_dev_server_file]
82+
poetry run rmcp dev [optional_dev_server_file]
83+
```
84+
85+
### Development Scripts (via Poetry)
86+
```bash
87+
# Format code (black + isort)
88+
poetry run format
89+
90+
# Run linting and type checking
91+
poetry run lint
92+
93+
# Run test suite
94+
poetry run test
6895
```
6996

7097
### Testing
@@ -78,26 +105,29 @@ rmcp dev [optional_dev_server_file]
78105
# Run CLI tests
79106
./tests/run_cli_tests.sh
80107

81-
# Run pytest tests (if available)
82-
pytest
108+
# Run MCP interface tests
109+
poetry run python tests/test_mcp_interface.py
110+
111+
# Run realistic scenarios
112+
poetry run python tests/realistic_scenarios.py
83113
```
84114

85115
### Running the Server
86116
```bash
87-
# Install in development mode
88-
pip install -e .
117+
# Install in development mode with Poetry
118+
poetry install
89119

90120
# Start MCP server via CLI (supports both MCP protocol and legacy JSON)
91-
rmcp start
121+
poetry run rmcp start
92122

93123
# Direct Python execution
94-
python -m rmcp
124+
poetry run python -m rmcp
95125

96126
# Test with legacy JSON format
97-
cat tests/test_request.json | rmcp start
127+
cat tests/test_request.json | poetry run rmcp start
98128

99129
# Test with MCP protocol format
100-
cat tests/test_mcp_protocol.json | rmcp start
130+
cat tests/test_mcp_protocol.json | poetry run rmcp start
101131
```
102132

103133
### Docker Development

pyproject.toml

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
[build-system]
2-
requires = ["setuptools>=61.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
4-
5-
[project]
1+
[tool.poetry]
62
name = "rmcp"
73
version = "0.3.4"
84
description = "Comprehensive Model Context Protocol server with 33 statistical analysis tools across 8 categories"
9-
authors = [{name = "Gaurav Sood", email = "gsood07@gmail.com"}]
10-
license = {text = "MIT"}
5+
authors = ["Gaurav Sood <gsood07@gmail.com>"]
6+
license = "MIT"
117
readme = "README.md"
128
keywords = ["mcp", "r", "statistics", "econometrics", "model-context-protocol", "data-analysis"]
139
classifiers = [
@@ -27,46 +23,43 @@ classifiers = [
2723
"Topic :: Software Development :: Libraries :: Python Modules",
2824
"Topic :: System :: Distributed Computing",
2925
]
30-
requires-python = ">=3.8"
31-
dependencies = [
32-
"click>=8.1.0",
33-
"jsonschema>=4.0.0",
34-
]
26+
packages = [{include = "rmcp"}]
27+
28+
[tool.poetry.dependencies]
29+
python = ">=3.8"
30+
click = ">=8.1.0"
31+
jsonschema = ">=4.0.0"
32+
# R integration dependencies
33+
subprocess32 = {version = ">=3.5.0", python = "<3.3"}
34+
35+
[tool.poetry.group.dev.dependencies]
36+
pytest = ">=8.0.0"
37+
pytest-cov = ">=5.0.0"
38+
pytest-mock = ">=3.12.0"
39+
pytest-asyncio = ">=0.21.0"
40+
black = ">=23.0.0"
41+
isort = ">=5.12.0"
42+
flake8 = ">=6.0.0"
43+
mypy = ">=1.5.0"
44+
pre-commit = ">=3.0.0"
45+
46+
[tool.poetry.group.http.dependencies]
47+
fastapi = ">=0.100.0"
48+
uvicorn = ">=0.20.0"
49+
sse-starlette = ">=1.6.0"
50+
51+
[tool.poetry.scripts]
52+
rmcp = "rmcp.cli:cli"
3553

36-
[project.urls]
54+
[tool.poetry.urls]
3755
Homepage = "https://github.com/gojiplus/rmcp"
3856
Repository = "https://github.com/gojiplus/rmcp"
3957
Documentation = "https://github.com/gojiplus/rmcp#readme"
4058
Issues = "https://github.com/gojiplus/rmcp/issues"
4159

42-
[project.optional-dependencies]
43-
dev = [
44-
"pytest>=8.0.0",
45-
"pytest-cov>=5.0.0",
46-
"pytest-mock>=3.12.0",
47-
"pytest-asyncio>=0.21.0",
48-
"black>=23.0.0",
49-
"isort>=5.12.0",
50-
"flake8>=6.0.0",
51-
"mypy>=1.5.0",
52-
"pre-commit>=3.0.0",
53-
]
54-
http = [
55-
"fastapi>=0.100.0",
56-
"uvicorn>=0.20.0",
57-
"sse-starlette>=1.6.0",
58-
]
59-
r = [
60-
# R integration dependencies
61-
"subprocess32>=3.5.0; python_version<'3.3'",
62-
]
63-
64-
[project.scripts]
65-
rmcp = "rmcp.cli:cli"
66-
67-
# Package discovery for standard layout
68-
[tool.setuptools.packages.find]
69-
where = ["."]
60+
[build-system]
61+
requires = ["poetry-core"]
62+
build-backend = "poetry.core.masonry.api"
7063

7164
# Tool configurations
7265
[tool.pytest.ini_options]

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

rmcp/core/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ async def _handle_initialize(self, params: Dict[str, Any]) -> Dict[str, Any]:
299299
logger.info(f"Initializing MCP connection with client: {client_info.get('name', 'unknown')}")
300300

301301
return {
302-
"protocolVersion": "2024-11-05",
302+
"protocolVersion": "2025-06-18",
303303
"capabilities": {
304304
"tools": {
305305
"listChanged": False

scripts/__init__.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/format.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

scripts/lint.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

scripts/test.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/realistic_scenarios.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import sys
1515
from pathlib import Path
1616

17-
# Add src to path
18-
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
17+
# Add rmcp to path
18+
sys.path.insert(0, str(Path(__file__).parent.parent))
1919

2020
from rmcp.tools.regression import linear_model, correlation_analysis, logistic_regression
2121
from rmcp.core.context import Context, LifespanState

0 commit comments

Comments
 (0)