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

Remove explicit doc links to osmdata pkg #13

Closed
mpadge opened this issue Mar 18, 2024 · 2 comments
Closed

Remove explicit doc links to osmdata pkg #13

mpadge opened this issue Mar 18, 2024 · 2 comments

Comments

@mpadge
Copy link

mpadge commented Mar 18, 2024

Hi @jmaspons, congratulations on submitting this package to rOpenSci! It'll be a great addition to the OSM ecosystem there. I was trying to debug why checks for this package didn't appear, and discovered that the following lines refer to functions from osmdata, yet that package is neither imported nor suggested here:

#' @note
#' For downloading data for purposes other than editing or exploring the history of the objects, perhaps is better to
#' use the Overpass API. A similar function to download OSM objects by `type` and `id` using Overpass, is implemented in
#' [osmdata::opq_osm_id()].

osmapiR/R/osmapi_elements.R

Lines 679 to 682 in 6589fc3

#' @note
#' For downloading data for purposes other than editing or exploring the history of the objects, perhaps is better to
#' use the Overpass API. A similar function to download OSM objects by `type` and `id` using Overpass, is implemented in
#' [osmdata::opq_osm_id()].

osmapiR/R/osmapi_elements.R

Lines 906 to 909 in 6589fc3

#' @note
#' For downloading data for purposes other than editing or exploring the history of the objects, perhaps is better to
#' use the Overpass API. A similar function to download OSM objects by `type` and `id` using Overpass, is implemented in
#' [osmdata::opq_osm_id()].

#' @note
#' For downloading data for purposes other than editing or exploring the history of the objects, perhaps is better to
#' use the Overpass API. A similar function to download OSM objects using Overpass, is implemented in [osmdata::opq()].

These become errors because the rOpenSci systems runs roxygen2::roxygenise() or the equivalent devtools::document(), while those are not called in standard rcmdcheck, which is why those checks all pass. roxygen2 has to then parse the function name from the package, which requires the package to be installed. My preferred way around this is to replace, for example,

The function [osmdata::opq()]

with

The \pkg{osmdata} function opq()

The \pkg{...} tag is resolved by roxygen simply by examining available.packages(), regardless of whether or not they are installed, and so does not error. The function name is then just plain code that requires no interpretation. When you've fixed those, feel free to ping the bot to run checks again.

@mpadge
Copy link
Author

mpadge commented Mar 18, 2024

And BTW, installing the pkgcheck-action in this repo would have helped diagnose that. I'm sure it will help you progress through review if you have that workflow running here too.

@jmaspons
Copy link
Owner

Thanks, fixed! I will have a look to the pkgcheck-action

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

No branches or pull requests

2 participants