Add Cloud Agent development environment for caret - #1
Draft
oujonsin wants to merge 2 commits into
Draft
Conversation
Co-authored-by: oujonsin <oujonsin@users.noreply.github.com>
Co-authored-by: oujonsin <oujonsin@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a repository-managed Cloud Agent development environment so the
caretR package (source inpkg/caret) is fully buildable, loadable, and testable in a fresh VM. Because.cursor/environment.jsonis committed, it becomes the highest-precedence environment source and activates for future Cloud Agents once merged — no dashboard Save required.What's included
.cursor/environment.json— declares the environment and its idempotentinstallcommand. Nostart/terminalssince caret is a library, not a service..cursor/install.sh— a self-contained, idempotent bootstrap that:.travis.yml).Notable detail
caret's
src/caret.c(derived from the legacyclasspackage) uses theSinttype andDOUBLE_XMAXconstant, both removed from modern R headers. Rather than modifying package source, the environment restores their historical definitions (Sint == int,DOUBLE_XMAX == DBL_MAX) via a~/.R/Makevarscompiler flag, keeping the repository pristine.Validation
R CMD INSTALL pkg/caretsucceeds;library(caret)loads v6.0-80.train()/predict(): knn 5-fold CV on iris (bestk=7, 97.3% accuracy, exercising the compiled C code) and rpart regression on mtcars.recipesbake()semantics, factor preservation,pROCnumeric tolerance) — not environment defects.install.shis idempotent (runs cleanly repeatedly).bld-...07c5b9d1) — booted in a fresh agent: R 4.6.1, caret loads, all CI deps present, 75/4/32 tests.bld-...88558c1e) — proves the committed config is self-contained: installs R from scratch on the default base image and builds caret successfully (exit 0).