|
1 | 1 | ## Resubmission
|
2 |
| -This is a resubmission. In this version I have: |
3 |
| - |
4 |
| -* **Updated the `Description` field in the `DESCRIPTION` file** to: |
5 |
| - - Place software names ('Google Drive' and 'Amazon S3') in single quotes as |
6 |
| - per CRAN guidelines. |
7 |
| - - Add links to the respective web services for 'Google Drive' and 'Amazon S3' |
8 |
| - for clarity and compliance. |
9 |
| - |
10 |
| -* **Removed examples from unexported functions.** |
11 |
| - |
12 |
| -In response to the feedback, I have made the following changes to minimize the |
13 |
| -use of the `\dontrun` tag: |
14 |
| - |
15 |
| -* **Examples Updated to Execute Safely**: |
16 |
| - - In `cloud_read_excel.Rd` and `cloud_get_roots.Rd`, I introduced examples |
17 |
| - that can be safely executed and removed the `\dontrun` tags. |
18 |
| - |
19 |
| -* **Limited Use of `\dontrun`**: |
20 |
| - - For `cloud_local_ls.Rd`, I retained the `\dontrun` tag for only one example. |
21 |
| - |
22 |
| -* **Conditional Execution with `\dontshow`**: |
23 |
| - The majority of the functions in the package require the user to associate the |
24 |
| - project directory with a cloud storage, a process that involves inserting a |
25 |
| - URL of a 'Google Drive' or an 'Amazon S3' folder into the console. For these |
26 |
| - functions, I wrapped the examples in `\dontshow` conditional on |
27 |
| - `interactive()`. The affected files include: |
28 |
| - - `cloud_drive_attach.Rd` |
29 |
| - - `cloud_drive_browse.Rd` |
30 |
| - - `cloud_drive_ls.Rd` |
31 |
| - - `cloud_drive_upload.Rd` |
32 |
| - - `cloud_drive_download.Rd` |
33 |
| - - `cloud_drive_write.Rd` |
34 |
| - - `cloud_drive_read.Rd` |
35 |
| - - `cloud_drive_upload_bulk.Rd` |
36 |
| - - `cloud_drive_download_bulk.Rd` |
37 |
| - - `cloud_drive_write_bulk.Rd` |
38 |
| - - `cloud_drive_read_bulk.Rd` |
39 |
| - - `cloud_drive_spreadsheet_autofit.Rd` |
40 |
| - - `cloud_s3_attach.Rd` |
41 |
| - - `cloud_s3_browse.Rd` |
42 |
| - - `cloud_s3_upload.Rd` |
43 |
| - - `cloud_s3_download.Rd` |
44 |
| - - `cloud_s3_read.Rd` |
45 |
| - - `cloud_s3_write.Rd` |
46 |
| - - `cloud_s3_upload_bulk.Rd` |
47 |
| - - `cloud_s3_download_bulk.Rd` |
48 |
| - - `cloud_s3_write_bulk.Rd` |
49 |
| - - `cloud_s3_read_bulk.Rd` |
| 2 | +This is a resubmission. Below are my responses to the feedback received in the |
| 3 | +previous review. |
| 4 | + |
| 5 | +### User options |
| 6 | + |
| 7 | +``` |
| 8 | +Please always make sure to reset to user's options(), working directory or par() after you changed it in examples and vignettes and demos. --> inst/doc/cloudfs.R |
| 9 | +e.g.: |
| 10 | +old <- options(digits = 3) |
| 11 | +... |
| 12 | +options(old) |
| 13 | +``` |
| 14 | + |
| 15 | +I've addressed this by removing the `options(width = 150)` command from the |
| 16 | +beginning of the cloudfs.Rmd vignette. |
| 17 | + |
| 18 | +### User Space Integrity |
| 19 | + |
| 20 | +``` |
| 21 | +Please ensure that your functions do not write by default or in your |
| 22 | +examples/vignettes/tests in the user's home filespace (including the package |
| 23 | +directory and getwd()). This is not allowed by CRAN policies. |
| 24 | +Please omit any default path in writing functions. In your |
| 25 | +examples/vignettes/tests you can write to tempdir(). |
| 26 | +e.g.: man/cloud_drive_spreadsheet_autofit.Rd ; man/cloud_drive_upload.Rd ; ... |
| 27 | +``` |
| 28 | + |
| 29 | +I understand the importance of adhering to CRAN policies and ensuring that there |
| 30 | +are no unintended consequences for the users of the package. However, I have |
| 31 | +chosen not to make the suggested modifications, and I'd like to explain the |
| 32 | +rationale behind this decision and why in my opinion the package does not |
| 33 | +violate the policies. |
| 34 | + |
| 35 | +One of the key features of the package is that it enables the use of concise |
| 36 | +relative paths for both the current working directory and associated cloud |
| 37 | +project folders. For instance, consider the task of uploading a local file, |
| 38 | +"models/glm.rds", to a project's S3 folder. Using `aws.s3`, the code would be: |
| 39 | + |
| 40 | +```R |
| 41 | +aws.s3::put_object( |
| 42 | + file = "models/glm.rds", |
| 43 | + bucket = "project-data", |
| 44 | + object = "project-1/models/glm.rds" |
| 45 | +) |
| 46 | +``` |
| 47 | + |
| 48 | +With `cloudfs`, it can be achieved with a significantly simpler syntax: |
| 49 | + |
| 50 | +```R |
| 51 | +cloud_s3_upload("models/glm.rds") |
| 52 | +``` |
| 53 | + |
| 54 | +Applying `cloud_s3_upload()` to a file located in a temporary folder goes |
| 55 | +against its design intent. Its main objective is to upload files while mirroring |
| 56 | +the folder structure between the current directory and the project's S3. |
| 57 | +Demonstrating this with a temp folder file would misrepresent the function's |
| 58 | +typical application. |
| 59 | + |
| 60 | +That being said I've taken comprehensive measures to ensure no accidental or |
| 61 | +default file writing occurs in the current working directory: |
| 62 | + |
| 63 | +- **Initial Setup**: Most functions, including all `*read*`, `*write*`, |
| 64 | +`*upload*`, `*download*` require users to link their project directory with |
| 65 | +cloud storage during the package's inaugural use. This entails obtaining |
| 66 | +explicit user consent. |
| 67 | + |
| 68 | +- **dontshow**: Consequently, examples where this linkage would activate are |
| 69 | +wrapped in `\dontshow` conditional on `interactive()`. |
| 70 | + |
| 71 | +- **Read Functions**: These initially pull files from the cloud to a temp folder |
| 72 | +for reading, leaving the working directory untouched. In examples, the working |
| 73 | +directory is also untouched. |
| 74 | + |
| 75 | +- **Write Functions**: Files are first created in a temp folder, then sent to |
| 76 | +the cloud. The working directory remains untouched. |
| 77 | + |
| 78 | +- **Download Functions**: These do pull files into the working directory, but |
| 79 | +this is their primary purpose and they cannot write anywhere outside of it. |
| 80 | +Also, in examples (shielded with `\dontshow`), I've added code to remove the |
| 81 | +donloaded files. |
| 82 | + |
| 83 | +- **Upload Functions**: In examples, files are generated files in the working |
| 84 | +directory for uploading purposes. Still, cleanup code ensures their removal |
| 85 | +afterward. |
| 86 | + |
| 87 | +- **Vignettes**: Chunks using `cloudfs` functions aren't executed; they're all |
| 88 | +tagged with `eval=FALSE`. |
| 89 | + |
| 90 | +- **Tests**: These only operate when Google Drive or S3 tokens are available, |
| 91 | +excluding execution on CRAN. When testing, I use temporary folders for project |
| 92 | +creation and employ `withr::with_dir` to execute `cloudfs` code — a strategy |
| 93 | +suitable for testing but not for example clarity. |
50 | 94 |
|
51 | 95 | ## R CMD check results
|
52 | 96 |
|
|
0 commit comments