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

Improve file path management when data already downloaded #137

Open
brunj7 opened this issue Jan 6, 2022 · 3 comments
Open

Improve file path management when data already downloaded #137

brunj7 opened this issue Jan 6, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@brunj7
Copy link
Collaborator

brunj7 commented Jan 6, 2022

Originally, we decided to stop the execution of the download function when the data set had already been downloaded. However, this design is not convenient when using R markdown, especially when you want to knit a document.

Fix: In addition to the warning message, we should also return the path to the existing data. This should allow the code to run even when the dataset has already been downloaded

@brunj7 brunj7 added the enhancement New feature or request label Jan 6, 2022
@brunj7 brunj7 self-assigned this Jan 6, 2022
@mbjones
Copy link
Member

mbjones commented Jan 6, 2022

Julien -- you might consider using contentid as a caching mechanism, which will seamlessly allow your rmarkdowns to knit from either the cache or the original URL source. See: https://learning.nceas.ucsb.edu/2021-11-delta/session-3-programmatic-metadata-and-data-access.html for some examples.

@brunj7
Copy link
Collaborator Author

brunj7 commented Jan 6, 2022

Ooh that looks promising, thanks @mbjones ! Let me think about how I can best integrate this into the current workflow

@njlyon0
Copy link
Member

njlyon0 commented Apr 16, 2024

Pivot

Currently "solved" by adding _copy# to the end of the created folder if the data already exist. Need to instead provide an option to the user about whether to (A) skip the download if the data already exist or (B) download a copy in the way the function currently behaves.

Julien and I feel the better default behavior is to skip the download because this lets uses of the function in Quarto/Rmarkdown contexts work on the same data without editing the code chunks to fight a new argument.

@njlyon0 njlyon0 added this to the Submit to CRAN (`v 0.3.0`) milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants