Skip to content

add claude MD file - #298

Open
osenan wants to merge 8 commits into
mainfrom
claude_md@main
Open

osenan wants to merge 8 commits into
mainfrom
claude_md@main

Conversation

@osenan

@osenan osenan commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Closes #290

@github-actions

Copy link
Copy Markdown
Contributor


🎉 Thank you for your contribution! Before this PR can be accepted, we require that you read and agree to our Contributor License Agreement.
You can digitally sign the CLA by posting a comment on this Pull Request in the format shown below. This agreement will apply to this PR as well as all future contributions on this repository.


I have read the CLA Document and I hereby sign the CLA


osenan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@osenan

osenan commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@llrs-roche

Copy link
Copy Markdown
Contributor

@osenan the problem with the CLA is that the first commit is not tied to your account. You will need to rewrite the commit history to change the email to associate to your account.

@osenan
osenan marked this pull request as ready for review September 25, 2026 11:08
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  -------------
R/qenv-c.R                          55       0  100.00%
R/qenv-class.R                      13       0  100.00%
R/qenv-concat.R                      7       0  100.00%
R/qenv-constructor.R                 1       0  100.00%
R/qenv-errors.R                      4       4  0.00%    6-9
R/qenv-eval_code.R                  63       1  98.41%   40
R/qenv-extract.R                    30       0  100.00%
R/qenv-get_code.R                   24       0  100.00%
R/qenv-get_env.R                     3       1  66.67%   27
R/qenv-get_messages.r                5       0  100.00%
R/qenv-get_outputs.R                 6       0  100.00%
R/qenv-get_var.R                    13       1  92.31%   13
R/qenv-get_warnings.R                5       0  100.00%
R/qenv-join.R                        1       1  0.00%    13
R/qenv-length.R                      2       1  50.00%   2
R/qenv-show.R                       29      29  0.00%    19-50
R/qenv-within.R                      8       0  100.00%
R/utils-get_code_dependency.R      258       3  98.84%   160, 258, 326
R/utils.R                           42       0  100.00%
TOTAL                              569      41  92.79%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 77f24d2

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   14 suites   7s ⏱️
189 tests 185 ✅ 4 💤 0 ❌
273 runs  269 ✅ 4 💤 0 ❌

Results for commit e70a4fb.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   14 suites   6s ⏱️
189 tests 185 ✅ 4 💤 0 ❌
273 runs  269 ✅ 4 💤 0 ❌

Results for commit 77f24d2.

♻️ This comment has been updated with latest results.

@llrs-roche llrs-roche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave some comments below but I think the specific part for the package is too shallow. Isn't there something more deep that could guide better the AI? Like how we parse the code and extract calls to infer how an object is created, how we handle errors and warnings or how we join different qenvs.

Comment thread CLAUDE.Rmd
Comment on lines +49 to +55
# remove CI gitlab content and github section comments
gitlab_starts <- grep("gitlab starts here", common_claude_shared)
gitlab_ends <- grep("gitlab ends here", common_claude_shared)
common_claude_shared <- common_claude_shared[-1 * seq(gitlab_starts, gitlab_ends)]
github_starts <- grep("github starts here", common_claude_shared)
github_ends <- grep("github ends here", common_claude_shared)
common_claude_shared <- common_claude_shared[-1 * c(github_starts, github_ends)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both should stay as packages go through both CIs and any agent should be aware of the context there. I'm sure they "know" what those file are though, so I'm sure that removing the sections won't make them delete or point out those folders/files

Comment thread CLAUDE.Rmd

- `teal.reporter`: Integrates reports with reproducible code in teal applications. Its reporter functions accept `qenv`
objects as inputs.
- `teal`: Provides the core architecture for teal Shiny applications. Teal modules should use `qenv` objects to ensure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It misses mentioning teal.data for join_keys.

Comment thread CLAUDE.Rmd

- When creating a `qenv`, favor readability over concise code.
- For simple `qenv` objects, favor `within()`, as it supports more readable code.
- When creating a `qenv` that uses functions with side effects, such as `runif()`, always use `eval_code()`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- When creating a `qenv` that uses functions with side effects, such as `runif()`, always use `eval_code()`.
- When creating a `qenv` that uses functions with side effects, such as `runif()`, `library` or `options` always use `eval_code()`. Use the appropriate comment to link side effects to objects

Comment thread CLAUDE.Rmd
Comment on lines +37 to +39
- When fixing bugs or adding features, avoid changing the core principles of `qenv`. Check whether an issue already
exists. If the expected behavior is unclear, request that an issue be created before making changes that could have
unexpected consequences.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On github the spacing looks odd. Maybe breaking at the end of each sentence is better for the diff and complies with the line length linter:

Suggested change
- When fixing bugs or adding features, avoid changing the core principles of `qenv`. Check whether an issue already
exists. If the expected behavior is unclear, request that an issue be created before making changes that could have
unexpected consequences.
- When fixing bugs or adding features, avoid changing the core principles of `qenv`.
Check whether an issue already exists.
If the expected behavior is unclear, request that an issue be created before making changes that could have unexpected consequences.

@llrs-roche

Copy link
Copy Markdown
Contributor

I noticed that AI (and humans) we fail to note the boundaries of the qenv: Defining a function outside the qenv and then using it inside one will fail. We need to bring in the function definition. This might not be practical or easy in some cases where the function is complex and have different helpers!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLAUDE.md

2 participants