Skip to content

modif doc of refresh function#111

Merged
TanguyBarthelemy merged 2 commits intorjdverse:developfrom
annasmyk:develop
Apr 10, 2026
Merged

modif doc of refresh function#111
TanguyBarthelemy merged 2 commits intorjdverse:developfrom
annasmyk:develop

Conversation

@annasmyk
Copy link
Copy Markdown
Member

@annasmyk annasmyk commented Apr 8, 2026

No description provided.

@TanguyBarthelemy
Copy link
Copy Markdown
Contributor

TanguyBarthelemy commented Apr 9, 2026

Currently, the new error arises at line:

https://github.com/annasmyk/rjd3x13/blob/2c620d38c30dcffff5ed5408beadbbfb346e4739/R/x13.R#L517

spotted by GHA:

https://github.com/annasmyk/rjd3x13/actions/runs/24189288323/job/70601915403#step:10:179

Explanation

The object y_new is not found because the part where it's created is in the \donttest{} block and the current check dont run the \donttest{} block in examples:

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
error-on: '"note"'

unlike the package {rjd3toolkit}:

https://github.com/rjdverse/rjd3toolkit/blob/bc51547deb6197e001ef63fdb1b2cf76c889fa7b/.github/workflows/R-CMD-check.yaml#L81

Action

Currently, what we can do is:

  • Ensure that the code running in the examples works both with and without the code in the \donttest sections.

(with running:

devtools::document()
devtools::run_examples()
devtools::run_examples(run_donttest = TRUE)

)

  • Add the "--run-donttest" argument to the check-r-package action

Future and other pbs

Example with only a \donttest block

I noticed that when the entire example is inside the donttest block, the following error can occur:

devtools::run_examples(pkg = "/home/onyxia/rjd3x13")
#> Error in srcrefs[[1L]] : subscript out of bounds

Created on 2026-04-09 with reprex v2.1.1

Currently, the only solution I’ve found is to place part of the code (e.g. library("rjd3toolkit")) outside the donttest function so that there is something to test...

Note: I don’t get any errors when running R CMD check in RStudio or via GHA...

I reported the issue in r-lib/pkgload#329.

Loading libraries

Another issue (resolved by @clemasso): when loading the package, you also need to load the JARs using rJava::.jaddClassPath().

I proposed a solution in this commit

https://github.com/TanguyBarthelemy/rjd3x13/blob/7074dccebbefd9e488bcb0bd6e2c38e5d996100f/R/zzz.R#L18-L21

@TanguyBarthelemy TanguyBarthelemy merged commit 36cd8d9 into rjdverse:develop Apr 10, 2026
2 of 8 checks passed
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.

2 participants