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

Vignette building error in check-standard workflow #319

Closed
pakjiddat opened this issue Jun 15, 2021 · 6 comments
Closed

Vignette building error in check-standard workflow #319

pakjiddat opened this issue Jun 15, 2021 · 6 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@pakjiddat
Copy link

The "Check" step in the check-standard workflow fails with this error:

Screenshot from 2021-06-15 12-24-13

See the attached log archive.
logs_102.zip

The error is in the vignette building process. All 4 operating systems mentioned in the workflow give the same error.

The workflow has a step called "Upload check results". It is used to upload the "check" directory as a workflow artifact. But the check directory is not found, so I cannot view the log files.

I ran devtools:check on my local computer and it worked without problems. I also ran devtools::check_rhub() on Windows, Ubuntu, Fedora, MacOs and Solaris. The check passed on all platforms without error. Maybe its an issue with the knitr or rmarkdown version number.

@pakjiddat pakjiddat added the bug an unexpected problem or unintended behavior label Jun 15, 2021
@pakjiddat pakjiddat changed the title check-standard workflow fails Vignette building error in check-standard workflow Jun 15, 2021
@jimhester
Copy link
Member

jimhester commented Jun 15, 2021

I get the same error as github actions locally when cloning your https://github.com/pakjiddat/word-predictor repo and running rcmdcheck::rcmdcheck(). I would guess you have forgotten to commit a necessary file.

Also please re-read the pre-populated issue text, perhaps you misread it.

If you are debugging a failed build or have a question about GitHub Actions in
general do NOT open an issue here. Either post on the Actions sections of
the GitHub Community or the RStudio Community forums.

If you have further questions about failed builds please open them in RStudio community along with a link to the failed build on your repository.

@jimhester
Copy link
Member

In particular you are trying to read data files in the vignette that don't exist at https://github.com/pakjiddat/word-predictor/blob/1b6a99102cdc5ace8ffdb1836d92469e17e217dc/vignettes/features.Rmd#L65-L68.

You need to include these in your repository if you use them in the vignette.

@pakjiddat
Copy link
Author

I had added the folder inst/extdata to .gitignore. So the required data files were not added to the GitHub repo. I had added the entry to .gitignore because the data files take up a lot of space in the repo.

But I reduced the size of the data files as suggested by CRAN policies. So it should not be a problem with adding the data files to the repo. However I forgot to remove the inst/extdata entry from .gitignore. After removing the entry from .gitignore I committed the changes and the check-standard workflow ran without problems. Thanks for your help !.

@pakjiddat
Copy link
Author

pakjiddat commented Jun 18, 2021

After uploading the missing data files, the check-standard workflow passed for Ubuntu (devel), Ubuntu (release) and Windows (release), but failed for MacOs (release). It gives the following error on MacOs:

Screenshot from 2021-06-18 10-35-30

See the downloaded log file.
logs_110.zip

The error message suggests that a file cannot be opened. But this error only shows on MacOs and not the other platforms. So it may be an issue with the environment setup.

I posted a related issue for the check-release workflow on RStudio Community but have not received a reply.

Also the check-standard workflow takes about 21 min to run on Windows and 13 min to run on Ubuntu (devel). Almost all the time is spent in the "Install Dependencies" step. But on Ubuntu (release) it takes about 5 min. It would be useful to have the workflow complete in less time.

@pakjiddat
Copy link
Author

I finally managed to fix the error in check-standard workflow on MacOs. Now the check-standard workflow runs fine. It also takes much less time than before. All other workflows are also working fine.

The problem was that the code in lines 223-242 in features.Rmd file was displaying a ggplot object using print command. I updated the method so it first saves the ggplot object to a file and then displays the file as a normal image.

I think the problem was that the print command requires access to a temporary folder. But on MacOs, the file could not be saved because of folder permissions.

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants