-
Notifications
You must be signed in to change notification settings - Fork 339
Add an LLM focussed reporter, and use it when appropriate #2305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Claude finished @hadley's task —— View job Code Review Analysis
Review FeedbackMinor Issues Found:
Code Quality:
No Critical Bugs Found - The implementation appears functionally correct for its intended purpose. |
DavisVaughan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From some interactive testing it seems like it will be appropriate. I haven't fully tried it yet in a claude session.
R/reporter.R
Outdated
| #' * [CheckReporter] for R CMD check; override with `testthat.default_check_reporter` | ||
| #' @description | ||
| #' `default_reporter()` returns the default reporter for [test_dir()]. | ||
| #' If the `CLAUDECODE` env var is set, it uses [LlmReporter]; otherwise if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I actually think this is harder to mentally parse now
I like the original way where you get told about the 90% case first, ProgressReporter, then you get told about increasingly more niche things after that
I also like the bulleted list from before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I rewrote it was that previously it wasn't clear that these are default for three different functions/situations: testing a directory, testing a single file, and testing a package. I'll see if I can get something in the middle.
R/reporter.R
Outdated
| #' * [CheckReporter] for R CMD check; override with `testthat.default_check_reporter` | ||
| #' @description | ||
| #' `default_reporter()` returns the default reporter for [test_dir()]. | ||
| #' If the `CLAUDECODE` env var is set, it uses [LlmReporter]; otherwise if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to say something like "If you are running tests via an llm (which currently means that the CLAUDECODE env var is set)..."
I'm just imagining that is_llm() will get more complex as we go forward, and eventually we could forward the docs as "[running tests via an llm][LlmReporter]", or something like that
Ohhhh, actually we should probably do that now!
So something like
If you are [running tests via an llm][LlmReporter]
Where LlmReporter's docs is the place where you describe when this is activated, i.e. when CLAUDECODE=1 right now, but that will probably expand in the future. That feels like the right place for these docs?
This is a little messy because I needed to refactor
default_reporter().I skipped deprecation on
default_progress_reporter()because I can't imagine why any one would call it, and indeed, there's no usage on CRAN