Skip to content

Change the default download directory from tempdir to R_user_dir("osmextract", "data") - #310

Merged
agila5 merged 10 commits into
masterfrom
R_user_dir
Jul 12, 2025
Merged

Change the default download directory from tempdir to R_user_dir("osmextract", "data")#310
agila5 merged 10 commits into
masterfrom
R_user_dir

Conversation

@agila5

@agila5 agila5 commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

Fixes #302.

@agila5
agila5 marked this pull request as ready for review July 11, 2025 10:03
@agila5
agila5 requested a review from Copilot July 11, 2025 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the default download directory from tempdir() to tools::R_user_dir("osmextract", "data"), adjusts related documentation and examples, and bumps the R version requirement.

  • Switches download directory logic and ensures recursive creation
  • Updates docs, READMEs, and NEWS entries to reflect the new default
  • Increases minimum R version to 4.1.0 and updates CI matrix

Reviewed Changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
man/oe_download_directory.Rd Update doc to reference new default directory
man/oe_download.Rd Minor doc adjustment around basename() usage
README.md Update example outputs and instructions for setting directory
README.Rmd Mirror README changes in RMarkdown vignette
R/utils.R Implement tools::R_user_dir(), recursive directory creation
R/download.R Doc tweak around basename() in download description
NEWS.md Add changelog entries for default directory change and R bump
DESCRIPTION Bump R dependency to ≥ 4.1.0
.github/workflows/R-CMD-check.yaml Update tested R versions to align with new dependency
Comments suppressed due to low confidence (2)

man/oe_download.Rd:62

  • Documentation should reference the function call as \code{basename()} for clarity and consistency.
provider (which may be inferred from the URL) and the \code{basename} of the

R/download.R:11

  • Documentation should reference the function as basename() to accurately reflect the function call.
#'   provider (which may be inferred from the URL) and the `basename` of the

Comment thread R/utils.R Outdated
Comment thread NEWS.md Outdated
Comment thread NEWS.md Outdated
agila5 and others added 3 commits July 11, 2025 12:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@agila5
agila5 requested a review from Robinlovelace July 11, 2025 10:07
@agila5

agila5 commented Jul 11, 2025

Copy link
Copy Markdown
Contributor Author

Hi Robin! Can you please check here, especially the description included in the README file? The old comments regarding tempdir do not make sense any more, and I'm not sure whether the new wording is appropriate. Thanks 🙇‍♂️.

@Robinlovelace

Copy link
Copy Markdown
Member

I've had a quick read and the new wording is perfect. Will this prevent the situation in which identical pbf files are downloaded multiple times for users who didn't set the download directory? That's most users so thus will save internet resources!

@agila5

agila5 commented Jul 12, 2025

Copy link
Copy Markdown
Contributor Author

I've had a quick read and the new wording is perfect. Will this prevent the situation in which identical pbf files are downloaded multiple times for users who didn't set the download directory? That's most users so thus will save internet resources!

Hopefully yes. I'm not sure about unintended consequences, but I guess we'll see 😅

@agila5
agila5 merged commit e462346 into master Jul 12, 2025
3 checks passed
@agila5
agila5 deleted the R_user_dir branch July 12, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Replace tempdir() with R_user_dir()

3 participants