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

CRAN message about broken reverse dependency checks #235

Closed
jsta opened this issue May 24, 2021 · 8 comments · Fixed by #236
Closed

CRAN message about broken reverse dependency checks #235

jsta opened this issue May 24, 2021 · 8 comments · Fixed by #236
Labels
Milestone

Comments

@jsta
Copy link

jsta commented May 24, 2021

Subject: CRAN packages archiveRetriever dbhydroR deepdep hlidacr intensegRid weathercan
Today's vcr update 1.0.0 has broken the checks of these.

All tests pass locally for me (running devtools::test) but fail running as part of devtools::check. The error I get is the same as CRAN:

Error: No root directory found in /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/dbhydroR.Rcheck/tests/testthat or its parent directories. Root criterion: contains a file "DESCRIPTION" with contents matching "^Package: "

I was able to pass check associated tests by removing the call to vcr_test_path in the autogenerated "setup" file and hardcoding the path to the fixtures directory.

@jsta jsta changed the title CRAN message about broken dependency checks CRAN message about broken reverse dependency checks May 24, 2021
@jsta
Copy link
Author

jsta commented May 24, 2021

dir = vcr::vcr_test_path("fixtures") -> dir = "../fixtures"

@sckott
Copy link
Collaborator

sckott commented May 24, 2021

Thanks. Was going to send an email to people this morning. I did run revdep checks and didn't get any issues (and I don't personally use the function in my own http pkgs), but I should have emailed about this issue, sorry about that. Looking into it

@dpprdan
Copy link
Member

dpprdan commented May 24, 2021

👋🏻 My PR #230 probably caused this. Sorry for the trouble this is causing!

I can reproduce with https://github.com/ropensci/opencage/tree/devel. devtools::check()/R CMD check apparently moves the test dir outside the pkg dir:

.
+-- 00check.log
+-- 00install.out
+-- 00_pkg_src
|   \-- opencage
+-- opencage
|   +-- data
|   +-- DESCRIPTION
|   +-- doc
|   +-- extdata
|   +-- help
|   +-- html
|   +-- INDEX
|   +-- Meta
|   +-- NAMESPACE
|   +-- NEWS.md
|   \-- R
+-- opencage-Ex.pdf
+-- opencage-Ex.R
+-- opencage-Ex.Rout
+-- opencage-Ex.timings
\-- tests
    +-- startup.Rs
    +-- testthat
    +-- testthat.R
    +-- testthat.Rout.fail
    \-- vcr_cassettes

(vcr_cassettes is what is usually called fixtures)

I looking into ways how to catch this. Maybe rprojroot::has_dir("tests")?

dpprdan added a commit to dpprdan/vcr that referenced this issue May 24, 2021
- DESCRIPTION is not available for tests run by R CMD check, ropensci#235
@dpprdan
Copy link
Member

dpprdan commented May 24, 2021

Using rprojroot::has_dir("tests") in vcr_test_path() seems to work in general, i.e. both devtools::test() and devtools::check() run successfully with this change on https://github.com/ropensci/opencage/tree/devel.

However, since has_dir() is starting to look up the tests dir from ./tests/testthat/, it will use ./tests/testthat/tests/ or ./tests/tests/ as a "root" dir should those exist. The tests still run, though.

@sckott
Copy link
Collaborator

sckott commented May 24, 2021

@dpprdan Thanks for the quick response

@jsta can you try again after installing the change @dpprdan made above remotes::install_github("dpprdan/vcr@2881b588fe3eabac2c7a371f199aaad407b7bddf")

@sckott
Copy link
Collaborator

sckott commented May 24, 2021

(p.s. @dpprdan ultimately responsibility is with me as the lead maintainer, so no worries)

@dpprdan
Copy link
Member

dpprdan commented May 24, 2021

Thanks! Still sucks though to have this go to CRAN and causing revdeps to fail. Apparently I didn't run R CMD check on opencage since #230 got merged (or I didn't install that change locally?) or else I would have caught it. Strange.

@jsta
Copy link
Author

jsta commented May 24, 2021

Works with that fork!

@sckott sckott added this to the v1.0.2 milestone May 24, 2021
@sckott sckott added the bug label May 24, 2021
sckott pushed a commit that referenced this issue May 31, 2021
- DESCRIPTION is not available for tests run by R CMD check, #235
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.

3 participants