-
Notifications
You must be signed in to change notification settings - Fork 12
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
large files from writing to disk can make a package build too large #164
Comments
sort of related #135 |
Would it work for r cmd check to use inst/ and .Rinstignore? Probably not? |
hmm, maybe, will have a look |
Yeah, this is tricky... Would adding support for transparent compression/decompression help? |
@aaronwolen Thats a good idea. Have not tried it yet, so can't comment on it, but does seem like a harder route potentially. so the commit above in the rnoaa package, I tried @maelle 's approach putting files in There's definitely lots more edge cases to work out to make sure this is a general solution. putting if either of you have http requests that write to disk and can test this out that'd be super helpful. |
the checks for rnoaa for the above setup is mostly working https://travis-ci.org/github/ropensci/rnoaa/jobs/663700897 - i think the failing test is unrelated but still checking into it |
For CRAN, tests will probably need to be turned off anyway? |
I'm about to submit a new version of ropenaq to CRAN and it's quite big because some fixtures are very big. I'm not sure yet how I'll handle that. |
One thing is that I probably don't need the fixtures to be that large but to make them smaller I'll need to edit them by hand. Not sure how much that applies to large files written to disk i.e. can one make them smaller by hand/make fake files instead, without too much hassle. |
btw does the size limit apply to tests? "Packages should be of the minimum necessary size. Reasonable compression should be used for data (not just .rda files) and PDF documentation: CRAN will if necessary pass the latter through qpdf. As a general rule, neither data nor documentation should exceed 5MB (which covers several books). A CRAN package is not an appropriate way to distribute course notes, and authors will be asked to trim their documentation to a maximum of 5MB. " |
depends i think, if the test files don't make the package too big then they could be run |
i guess that would be very case dependent - and tricky: to make sure the hand modified fixture will still work with the rest of the package code |
I don't know actually, all I was looking at was the file size after installing with various configurations. |
* #290 - working on integrating vcr handling writing to disk, not done yet related: ropensci/vcr#81 ropensci/webmockr#57 * playing with buoy tests, check back in #FIXME * cpc_prcp test tweaks * man file updates * arc2 fixes, use new write to disk setup * #290 writing to disk work, not done yet * fixes for lcd and isd tests that also cache files * fixed some tests #290 * fix storms test * use relative paths with new vcr version * move write to disk files to inst/ - test check on travis | ropensci/vcr#164 * try commenting out deleting user cached files for ersst tests * comment out one ersst test, does it work now? * try ersst tests each with different file on disk - was previously using the same file perhaps that was leading to failure if e.g. file was opened but not closed before next test ran amybe * remove .Rinstignore, and try inst/test_files in .Rbuildignore if it works on travis * remove inst/test_files from rbuildignore * move test files back to tests/files/ * add .Rinstignore for ignoring test on disk files * woops, needed to fix write_disk_path
I think we're sorted out on this.
|
@maelle @aaronwolen need your help on this.
So with the support for writing to disk in vcr, the files written to disk especially can be quite large. Fixtures can be large too, but since they're plain text it seems like they generally are pretty small.
Lets say the files recorded to disk are in
tests/files
. If you addtests/files
to.Rbuildignore
tests run fine if you run them withdevtools::test()
, but NOT if you run R CMD CHECK or equivalents.You can not add
tests/files
to.Rbuildignore
- and then R CMD CHECK works - BUT then when you build the package, the files intests/files
are included - and if they are very large, the build can be too large for CRAN's 5 MB max.I'm not sure how to solve this problem
The text was updated successfully, but these errors were encountered: