Skip to content

Commit 9ba267e

Browse files
committed
snap to larger list of whitelisted R packages via views, bug fixes
1 parent 0b7fa12 commit 9ba267e

36 files changed

Lines changed: 4710 additions & 521 deletions

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,26 @@ jobs:
295295
library(styler)
296296
files_to_check <- list.files(c('R', 'scripts'), pattern='[.]R\$', recursive=TRUE, full.names=TRUE)
297297
if (length(files_to_check) > 0) {
298-
style_results <- styler::style_file(files_to_check, dry='on', include_roxygen_examples = FALSE)
299-
if (any(style_results\$changed)) {
300-
cat('❌ R code style issues found\\n')
298+
cat('Checking style for', length(files_to_check), 'R files...\\n')
299+
tryCatch({
300+
style_results <- styler::style_file(files_to_check, dry='on', include_roxygen_examples = FALSE)
301+
if (!is.null(style_results) && !any(is.na(style_results\$changed))) {
302+
if (any(style_results\$changed)) {
303+
cat('❌ R code style issues found\\n')
304+
quit(status=1)
305+
} else {
306+
cat('✅ R code style check passed\\n')
307+
}
308+
} else {
309+
cat('❌ R code style check encountered errors\\n')
310+
quit(status=1)
311+
}
312+
}, error = function(e) {
313+
cat('❌ R styling error:', e\$message, '\\n')
301314
quit(status=1)
302-
} else {
303-
cat('✅ R code style check passed\\n')
304-
}
315+
})
316+
} else {
317+
cat('✅ No R files found to check\\n')
305318
}
306319
"
307320

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- JSON configuration file support (`~/.rmcp/config.json`, `/etc/rmcp/config.json`)
1414
- Command-line option overrides with `--config` and `--debug` flags
1515
- Type-safe configuration validation with detailed error messages
16-
- Full documentation in `docs/configuration.md`
16+
- Auto-generated documentation in `docs/configuration/` via Sphinx autodoc
1717

1818
- **🔧 Enhanced CLI Interface**: Improved command-line experience
1919
- Global `--config` option to specify custom configuration files

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Documentation](https://github.com/finite-sample/rmcp/actions/workflows/docs.yml/badge.svg)](https://finite-sample.github.io/rmcp/)
77
[![License](https://img.shields.io/github/license/finite-sample/rmcp)](https://github.com/finite-sample/rmcp/blob/main/LICENSE)
88

9-
**Turn conversations into comprehensive statistical analysis** - A Model Context Protocol (MCP) server with 44 statistical analysis tools across 11 categories. RMCP enables AI assistants to perform sophisticated statistical modeling, econometric analysis, machine learning, time series analysis, and data science tasks through natural conversation.
9+
**Turn conversations into comprehensive statistical analysis** - A Model Context Protocol (MCP) server with 44 statistical analysis tools across 11 categories and **429 R packages** from systematic CRAN task views. RMCP enables AI assistants to perform sophisticated statistical modeling, econometric analysis, machine learning, time series analysis, and data science tasks through natural conversation.
1010

1111
## 🚀 Quick Start (30 seconds)
1212

@@ -77,17 +77,22 @@ Formula building, error recovery, example datasets → *"Help me build a regress
7777

7878
### Prerequisites
7979
- **Python 3.10+**
80-
- **R 4.4.0+** with packages: Install all at once:
80+
- **R 4.4.0+** with **comprehensive package ecosystem**: RMCP uses a systematic 429-package whitelist from CRAN task views organized into 19+ categories:
8181

8282
```r
83+
# Core packages (install these first)
8384
install.packages(c(
84-
"jsonlite", "plm", "lmtest", "sandwich", "AER", "dplyr",
85-
"forecast", "vars", "urca", "tseries", "nortest", "car",
86-
"rpart", "randomForest", "ggplot2", "gridExtra", "tidyr",
87-
"rlang", "knitr", "broom"
85+
"jsonlite", "dplyr", "ggplot2", "broom", "plm", "forecast",
86+
"randomForest", "rpart", "caret", "AER", "vars", "mgcv"
8887
))
88+
89+
# Full ecosystem automatically available: Machine Learning (61 packages),
90+
# Econometrics (55 packages), Time Series (48 packages),
91+
# Bayesian Analysis (32 packages), and more
8992
```
9093

94+
**Package Selection**: Evidence-based using CRAN task views, download statistics, and 4-tier security assessment
95+
9196
### Install RMCP
9297

9398
```bash
@@ -165,17 +170,18 @@ rmcp start
165170
docker run -e RMCP_HTTP_HOST=0.0.0.0 -e RMCP_HTTP_PORT=8000 rmcp:latest
166171
```
167172

168-
**📖 [Complete Configuration Guide →](docs/configuration.md)**
173+
**📖 [Complete Configuration Guide →](docs/configuration/index.rst)** (auto-generated from code)
169174

170175
## 🔥 Key Features
171176

172177
- **🎯 Natural Conversation**: Ask questions in plain English, get statistical analysis
178+
- **📚 Comprehensive Package Ecosystem**: 429 R packages from systematic CRAN task views with 4-tier security system
173179
- **📊 Professional Output**: Formatted results with markdown tables and inline visualizations
174180
- **🔒 Production Ready**: Full MCP protocol compliance with HTTP transport and SSE
175181
- **⚙️ Flexible Configuration**: Environment variables, config files, and CLI options
176182
- **⚡ Fast & Reliable**: 100% test success rate across all scenarios
177183
- **🌐 Multiple Transports**: stdio (Claude Desktop) and HTTP (web applications)
178-
- **🛡️ Secure**: Controlled R execution with configurable permissions
184+
- **🛡️ Secure**: Evidence-based package selection with security-conscious permission tiers
179185

180186
## 📚 Documentation
181187

docs/conf.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@
2121
version = __version__
2222
release = __version__
2323
except ImportError:
24-
version = "0.3.7"
25-
release = "0.3.7"
24+
version = "0.5.0"
25+
release = "0.5.0"
2626

2727
# -- General configuration ---------------------------------------------------
2828
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2929

3030
extensions = [
3131
"sphinx.ext.autodoc",
32-
"sphinx.ext.autosummary",
32+
"sphinx.ext.autosummary",
3333
"sphinx.ext.viewcode",
3434
"sphinx.ext.napoleon",
35+
"sphinx.ext.intersphinx",
36+
"sphinx.ext.autosectionlabel",
3537
"myst_parser",
3638
]
3739

@@ -74,10 +76,16 @@
7476
"special-members": "__init__",
7577
"undoc-members": True,
7678
"exclude-members": "__weakref__",
79+
"show-inheritance": True,
7780
}
81+
autodoc_typehints = "both"
82+
autodoc_typehints_description_target = "documented"
83+
autodoc_preserve_defaults = True
7884

7985
# autosummary
8086
autosummary_generate = True
87+
autosummary_generate_overwrite = True
88+
autosummary_imported_members = False
8189

8290
# napoleon - for Google/NumPy style docstrings
8391
napoleon_google_docstring = True
@@ -96,8 +104,13 @@
96104
"deflist",
97105
"tasklist",
98106
"colon_fence",
107+
"attrs_inline",
108+
"attrs_block",
99109
]
100110

111+
# autosectionlabel
112+
autosectionlabel_prefix_document = True
113+
101114
# Copy button configuration
102115
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
103116
copybutton_prompt_is_regexp = True

0 commit comments

Comments
 (0)