Skip to content
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

fix R CMD CHECK notes #272

Closed
shajoezhu opened this issue Oct 14, 2024 · 2 comments · Fixed by #274
Closed

fix R CMD CHECK notes #272

shajoezhu opened this issue Oct 14, 2024 · 2 comments · Fixed by #274
Assignees
Labels

Comments

@shajoezhu
Copy link
Contributor

  • checking for hidden files and directories ... NOTE
    Found the following hidden files and directories:
    tests/testthat/_book/assets/www/.gitkeep
    tests/testthat/_book/assets/www/lock/.gitkeep
    tests/testthat/_data/.rbuildkeep
    These were most likely included in error. See section ‘Package
    structure’ in the ‘Writing R Extensions’ manual.
  • checking for portable file names ... NOTE
    Found the following non-portable file paths:
    tlg.catalog.pkg/tests/testthat/_book/_extensions/coatless/webr/qwebr-document-engine-initialization.js
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/css/latex-fontsize.css
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-brands-400.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-brands-400.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-regular-400.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-regular-400.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-solid-900.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-solid-900.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-v4compatibility.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/fa-v4compatibility.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Brands-Regular-400.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Brands-Regular-400.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Free-Regular-400.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Free-Regular-400.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Free-Solid-900.ttf
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts/FontAwesome6Free-Solid-900.woff2
    tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/shinylive/resources/css/shinylive-quarto.css
@shajoezhu shajoezhu added the sme label Oct 14, 2024
shajoezhu added a commit that referenced this issue Oct 14, 2024
@pawelru
Copy link
Contributor

pawelru commented Oct 14, 2024

All in all - I don't think these notes could be solved - or I don't have a good idea how to do this. May I ask you why this brought your attention. These should not fail our CI.

Please have a look at the current error:

ERROR: NotFound: No such file or directory (os error 2): lstat '/__w/tlg-catalog/tlg-catalog/tlg.catalog.pkg.Rcheck/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/css/all.css'

If you build-ignore some of the quarto extension files then these won't be added to the .tar.gz bundle. Then we are running tests on the .tar.gz bundle. During tests we are re-generating the whole book to compare the snapshots. If files are missing then quarto process complains.

That's just one mechanism. There is also a tests/testthat/_data/.rbuildkeep file which name indicates not to ignore it. During the tests - we are writting the files. We want to write it to some dir. The role of that dummy empty file is just to keep the dir not empty. If it's empty - you are going to see another note during R CMD BUILD (see last entry):

* checking for empty or unneeded directories
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets/webfonts’
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/fontawesome/assets’
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_book/_extensions/quarto-ext/shinylive/resources’
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_book/assets/www/lock’
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_book/assets/www’
Removed empty directory ‘tlg.catalog.pkg/tests/testthat/_data’

@shajoezhu
Copy link
Contributor Author

these was raised as notes in our integration test

@pawelru pawelru changed the title update rbuildignore fix R CMD CHECK notes Oct 16, 2024
@pawelru pawelru self-assigned this Oct 16, 2024
pawelru added a commit that referenced this issue Oct 25, 2024
fix #272

move `quarto render` into R CMD BUILD:
```
❯ R CMD BUILD .
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘tlg.catalog.pkg’:
* checking DESCRIPTION meta-information ... OK
* running ‘cleanup’                                                            <<<<------ HERE!
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘tlg.catalog.pkg_0.1.0.9029.tar.gz’
```

After `quarto render` we remove the symlink to the book.
As a result, we have refreshed files for snapshot tests and also we
don't have a book files that R CMD CHECK complains about.

---------

Co-authored-by: Marcin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants