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

osmapiR: an implementation of OpenStreetMap API v0.6 for R #633

Open
12 of 29 tasks
jmaspons opened this issue Mar 17, 2024 · 22 comments
Open
12 of 29 tasks

osmapiR: an implementation of OpenStreetMap API v0.6 for R #633

jmaspons opened this issue Mar 17, 2024 · 22 comments
Assignees

Comments

@jmaspons
Copy link

jmaspons commented Mar 17, 2024

Submitting Author Name: Joan Maspons
Submitting Author Github Handle: @jmaspons
Repository: https://github.com/jmaspons/osmapiR
Version submitted: 0.0.0.22
Submission type: Standard
Editor: @adamhsparks
Reviewers: jonthegeek

Due date for jonthegeek: 2024-05-20

Archive: TBD
Version accepted: TBD
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Type: Package
Package: osmapiR
Title: OpenStreetMap API
Version: 0.0.0.22
Authors@R: 
    person("Joan", "Maspons", , "joanmaspons@gmail.com", role = c("aut", "cre"),
           comment = c(ORCID = "0000-0003-2286-8727"))
Maintainer: Joan Maspons <joanmaspons@gmail.com>
Description: Implements OpenStreetMap API v0.6
    (<https://wiki.openstreetmap.org/wiki/API_v0.6>).
License: GPL (>= 3)
URL: https://jmaspons.github.io/osmapiR https://github.com/jmaspons/osmapiR
BugReports: https://github.com/jmaspons/osmapiR/issues
Imports: 
    curl,
    httr2,
    xml2
Suggests: 
    httptest2,
    httpuv,
    knitr,
    rmarkdown,
    testthat (>= 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
X-schema.org-keywords: open street map, openstreetmap, OSM, openstreetmap-api, osmapi, API
VignetteBuilder: knitr

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • data retrieval
    • data extraction
    • data munging
    • data deposition
      • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • text analysis
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences):

osmapiR allows retrieving all kind of data from the OpenStreetMap project.

  • Who is the target audience and what are scientific applications of this package?

Useful for people working in OSM and to study the evolution of the map.

osmapiR is the only package to access other OpenStreetMap data than the maps data (map notes, GPS traces, changelogs and users). It can be also useful to get the history of the OSM objects and is the only package that allows editing and upload any kind of data.

To access the OSM map data for purposes other than editing or exploring the history of the objects, perhaps is better to use the other packages that implements the Overpass API (osmdata) or that works with .pbf files (osmexcract).

The package allows accessing all the public data from www.openstreetmap.org. All calls use https and OAuth2 is used for authenticated calls. I redirect the user to osmdata or osmecract in the README and in the documentation of the functions to get map data as recommended by the OSM policies.

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.

  • Explain reasons for any pkgcheck items which your package is unable to pass.

Some functions implement API calls restricted to users with moderator role and are not well documented in the OSM wiki. These functions lack a return value in docs. Some functions that cause editions in the OSM servers don't have examples to avoid that the user accidentally run it.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • Do you intend for this package to go on CRAN?

  • Do you intend for this package to go on Bioconductor?

  • Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:

MEE Options
  • The package is novel and will be of interest to the broad readership of the journal.
  • The manuscript describing the package is no longer than 3000 words.
  • You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

@ropensci-review-bot
Copy link
Collaborator

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ldecicco-USGS
Copy link

@ropensci-review-bot check package

@ropensci-review-bot
Copy link
Collaborator

Thanks, about to send the query.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for osmapiR (v0.0.0.22)

git hash: 5878c081

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✖️ The following functions have no documented return values: [osm_delete_note, osm_hide_comment_changeset_discussion, osm_redaction_object]
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✖️ These functions do not have examples: [osm_create_gpx, osm_delete_gpx, osm_delete_note, osm_hide_comment_changeset_discussion, osm_redaction_object, osm_update_gpx].
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 84.7%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: GPL (>= 3)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 861
internal osmapiR 199
internal utils 26
internal stats 16
internal graphics 5
imports xml2 270
imports httr2 112
imports curl NA
suggests httptest2 NA
suggests httpuv NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

character (118), c (57), lapply (53), version (50), data.frame (43), names (36), do.call (27), for (26), format (26), vapply (26), integer (25), seq_len (25), list (23), nrow (21), paste (20), length (18), as.POSIXct (16), comment (16), Sys.time (16), logical (14), rbind (14), attr (11), row.names (10), unique (10), structure (9), return (8), apply (7), getOption (7), objects (7), url (7), gsub (6), open (6), t (6), search (5), switch (5), drop (4), if (4), inherits (4), sort (4), split (4), I (3), mapply (3), match (3), paste0 (3), print (3), unlist (3), as.character (2), attributes (2), cbind (2), date (2), dimnames (2), file (2), ifelse (2), intersect (2), is.null (2), matrix (2), ncol (2), options (2), order (2), sapply (2), setdiff (2), tempfile (2), UseMethod (2), all (1), all.equal (1), any (1), as.Date (1), body (1), colnames (1), duplicated (1), is.na (1), isTRUE (1), range (1), rm (1), seq_along (1), try (1), vector (1), which (1)

xml2

xml_child (59), xml_add_child (45), xml_new_root (37), xml_attrs (28), xml_find_all (23), xml_text (23), xml_children (19), xml_name (15), xml_attr (8), xml_set_attr (6), xml_contents (4), xml_length (2), as_list (1)

osmapiR

osmapi_request (48), changeset_xml2DF (7), get_osmapi_url (5), note_xml2DF (5), osm_fetch_objects (5), changeset_create_xml (3), comments_as_text (3), gpx_meta_xml2DF (3), members_as_text (3), object_xml2DF (3), tags_as_text (3), empty_object (2), error_body (2), gpx_xml2list (2), new_osmapi_objects (2), new_relation_members (2), new_tags_df (2), oauth_client_osmapi (2), osm_details_logged_user (2), osm_details_user (2), osm_full_object (2), osm_get_metadata_gpx (2), osm_permissions (2), osm_read_changeset (2), osm_read_note (2), osmchange_upload_response_xml2DF (2), tags_xml2mat_wide (2), authenticate_osmapi (1), comments_as_text.changeset_comments (1), comments_as_text.comments (1), comments_as_text.default (1), comments_as_text.note_comments (1), empty_changeset (1), empty_gpx (1), empty_notes (1), empty_user (1), fix_duplicated_columns (1), logged_user_details_xml2list (1), logout_osmapi (1), members_as_text.default (1), members_as_text.relation_members (1), members_as_text.way_members (1), new_way_members (1), node_2xml (1), node_create_2xml (1), node_new_2xml (1), node_update_2xml (1), oauth_request (1), object_DF2xml (1), object_new_DF2xml (1), object_update_DF2xml (1), osm_api_versions (1), osm_bbox_objects (1), osm_capabilities (1), osm_close_changeset (1), osm_close_note (1), osm_comment_changeset_discussion (1), osm_create_changeset (1), osm_create_comment_note (1), osm_create_gpx (1), osm_create_note (1), osm_create_object (1), osm_delete_gpx (1), osm_delete_note (1), osm_delete_object (1), osm_details_users (1), osm_diff_upload_changeset (1), osm_download_changeset (1), osm_feed_notes (1), osm_get_changesets (1), osm_get_data_gpx (1), osm_get_gpx_metadata (1), osm_get_notes (1), osm_get_objects (1), osm_get_points_gps (1), osm_get_preferences_user (1), osm_get_user_details (1), osm_hide_comment_changeset_discussion (1), osm_history_object (1), osm_list_gpxs (1), osm_query_changesets (1), osm_read_bbox_notes (1), osm_read_object (1), osm_redaction_object (1), osm_relations_object (1), osm_reopen_note (1), osm_search_notes (1), osm_subscribe_changeset_discussion (1), osm_unhide_comment_changeset_discussion (1), osm_unsubscribe_changeset_discussion (1), osm_update_changeset (1), osm_update_gpx (1), osm_update_object (1), osm_version_object (1), osm_ways_node (1), osmapi_objects (1), osmcha_DF2xml (1), osmchange_create (1), osmchange_delete (1), osmchange_modify (1), osmchange_xml2DF (1), parse_html_error (1), print.osmapi_changesets (1), print.osmapi_map_notes (1), print.osmapi_objects (1), print.osmapi_OsmChange (1)

httr2

req_perform (46), resp_body_xml (37), request (7), req_url_query (6), resp_body_string (6), req_url_path (2), oauth_client (1), obfuscated (1), req_body_form (1), req_error (1), req_retry (1), req_user_agent (1), resp_body_html (1), resp_content_type (1)

utils

timestamp (25), page (1)

stats

na.omit (10), df (3), pt (2), time (1)

graphics

text (5)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 23 files) and
  • 1 authors
  • 1 vignette
  • no internal data file
  • 3 imported packages
  • 54 exported functions (median 20 lines of code)
  • 199 non-exported functions in R (median 15 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 23 84.5
files_vignettes 1 68.4
files_tests 95 99.8
loc_R 2515 88.1
loc_vignettes 123 32.1
loc_tests 7844 99.0 TRUE
num_vignettes 1 64.8
n_fns_r 253 92.6
n_fns_r_exported 54 89.0
n_fns_r_not_exported 199 93.2
n_fns_per_file_r 6 73.2
num_params_per_fn 2 11.9
loc_per_fn_r 16 49.2
loc_per_fn_r_exp 20 46.7
loc_per_fn_r_not_exp 15 49.5
rel_whitespace_R 33 94.3
rel_whitespace_vignettes 36 34.5
rel_whitespace_tests 5 92.7
doclines_per_fn_exp 40 49.8
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 164 86.3

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

R-CMD-check.yaml
pkgdown.yaml

GitHub Workflow Results

id name conclusion sha run_number date
8341149817 pages build and deployment success d12973 69 2024-03-19
8341198216 pkgcheck failure 5b622a 3 2024-03-19
8341198514 pkgdown success 5b622a 97 2024-03-19
8341198510 R-CMD-check success 5b622a 95 2024-03-19
8341198515 test-coverage success 5b622a 95 2024-03-19

3b. goodpractice results

R CMD check with rcmdcheck

rcmdcheck found no errors, warnings, or notes

Test coverage with covr

Package coverage: 84.69

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
osm_get_objects 45
osmchange_modify 31
osm_query_changesets 19
set_osmapi_connection 15

Static code analyses with lintr

lintr found the following 1167 potential issues:

message number of times
Avoid using sapply, consider vapply instead, that's type safe 2
Lines should not be more than 80 characters. 1165


Package Versions

package version
pkgstats 0.1.3.11
pkgcheck 0.1.2.21


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@ldecicco-USGS
Copy link

Thanks for the submission @jmaspons! Once you've fixed the above "X", you can trigger the review-bot to re-check the package.

@jmaspons
Copy link
Author

Hi! Some failing checks are difficult to address. The missing return values in the documentation of [osm_delete_note, osm_hide_comment_changeset_discussion, osm_redaction_object] correspond to functions with API calls restricted to moderators of OpenStreetMap. I don't have this perms and the wiki doesn't define the returned values. The same for the missing examples of these functions.

For the missing examples in the documentation of [osm_create_gpx, osm_delete_gpx, osm_update_gpx], I can try to build a vignette similar to the one explaining how to edit OSM objects, but I prefer to do it later. These are functions that result in editions in the OpenStreetMap servers and I think it's better to put and extra step to avoid editions just for testing the functions.

The missing examples correspond to simple enough functions. If I find some moderator wanting to help with the package I will complete the missing parts.

Can we go ahead with the review despite the remaining "X", @ldecicco-USGS ?

@jmaspons
Copy link
Author

I've got moderator permissions for the testing server! I will complete the docs in the next days.

@ldecicco-USGS
Copy link

Just to be clear, the "return" documentation in the R package just needs a description of what is coming back. So for example, for the function osm_hide_comment_changeset_discussion , you could add:

#' @return xml output from the osm service

The small functions with no examples are fine.

@jmaspons
Copy link
Author

All returns are now documented. Some requests return nothing, others an xml that is parsed to a data.frame + package classes

@ldecicco-USGS
Copy link

@ropensci-review-bot check package

@ropensci-review-bot
Copy link
Collaborator

Thanks, about to send the query.

@ropensci-review-bot
Copy link
Collaborator

🚀

Editor check started

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for osmapiR (v0.0.0.23)

git hash: c75f5c03

  • ✔️ Package name is available
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✖️ These functions do not have examples: [osm_create_gpx, osm_delete_gpx, osm_redaction_object, osm_update_gpx].
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 85.8%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: GPL (>= 3)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 861
internal osmapiR 200
internal utils 26
internal stats 16
internal graphics 6
imports xml2 270
imports httr2 111
imports curl NA
suggests httptest2 NA
suggests httpuv NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

character (118), c (57), lapply (53), version (50), data.frame (43), names (36), do.call (27), for (26), format (26), vapply (26), integer (25), seq_len (25), list (23), nrow (21), paste (20), length (18), as.POSIXct (16), comment (16), Sys.time (16), logical (14), rbind (14), attr (11), row.names (10), unique (10), structure (9), return (8), apply (7), getOption (7), objects (7), url (7), gsub (6), open (6), t (6), search (5), switch (5), drop (4), if (4), inherits (4), sort (4), split (4), I (3), mapply (3), match (3), paste0 (3), print (3), unlist (3), as.character (2), attributes (2), cbind (2), date (2), dimnames (2), file (2), ifelse (2), intersect (2), is.null (2), matrix (2), ncol (2), options (2), order (2), sapply (2), setdiff (2), tempfile (2), UseMethod (2), all (1), all.equal (1), any (1), as.Date (1), body (1), colnames (1), duplicated (1), is.na (1), isTRUE (1), range (1), rm (1), seq_along (1), try (1), vector (1), which (1)

xml2

xml_child (59), xml_add_child (45), xml_new_root (37), xml_attrs (28), xml_find_all (23), xml_text (23), xml_children (19), xml_name (15), xml_attr (8), xml_set_attr (6), xml_contents (4), xml_length (2), as_list (1)

osmapiR

osmapi_request (48), changeset_xml2DF (7), note_xml2DF (6), get_osmapi_url (5), osm_fetch_objects (5), changeset_create_xml (3), comments_as_text (3), gpx_meta_xml2DF (3), members_as_text (3), object_xml2DF (3), tags_as_text (3), empty_object (2), error_body (2), gpx_xml2list (2), new_osmapi_objects (2), new_relation_members (2), new_tags_df (2), oauth_client_osmapi (2), osm_details_logged_user (2), osm_details_user (2), osm_full_object (2), osm_get_metadata_gpx (2), osm_permissions (2), osm_read_changeset (2), osm_read_note (2), osmchange_upload_response_xml2DF (2), tags_xml2mat_wide (2), authenticate_osmapi (1), comments_as_text.changeset_comments (1), comments_as_text.comments (1), comments_as_text.default (1), comments_as_text.note_comments (1), empty_changeset (1), empty_gpx (1), empty_notes (1), empty_user (1), fix_duplicated_columns (1), logged_user_details_xml2list (1), logout_osmapi (1), members_as_text.default (1), members_as_text.relation_members (1), members_as_text.way_members (1), new_way_members (1), node_2xml (1), node_create_2xml (1), node_new_2xml (1), node_update_2xml (1), oauth_request (1), object_DF2xml (1), object_new_DF2xml (1), object_update_DF2xml (1), osm_api_versions (1), osm_bbox_objects (1), osm_capabilities (1), osm_close_changeset (1), osm_close_note (1), osm_comment_changeset_discussion (1), osm_create_changeset (1), osm_create_comment_note (1), osm_create_gpx (1), osm_create_note (1), osm_create_object (1), osm_delete_gpx (1), osm_delete_note (1), osm_delete_object (1), osm_details_users (1), osm_diff_upload_changeset (1), osm_download_changeset (1), osm_feed_notes (1), osm_get_changesets (1), osm_get_data_gpx (1), osm_get_gpx_metadata (1), osm_get_notes (1), osm_get_objects (1), osm_get_points_gps (1), osm_get_preferences_user (1), osm_get_user_details (1), osm_hide_comment_changeset_discussion (1), osm_history_object (1), osm_list_gpxs (1), osm_query_changesets (1), osm_read_bbox_notes (1), osm_read_object (1), osm_redaction_object (1), osm_relations_object (1), osm_reopen_note (1), osm_search_notes (1), osm_subscribe_changeset_discussion (1), osm_unhide_comment_changeset_discussion (1), osm_unsubscribe_changeset_discussion (1), osm_update_changeset (1), osm_update_gpx (1), osm_update_object (1), osm_version_object (1), osm_ways_node (1), osmapi_objects (1), osmcha_DF2xml (1), osmchange_create (1), osmchange_delete (1), osmchange_modify (1), osmchange_xml2DF (1), parse_html_error (1), print.osmapi_changesets (1), print.osmapi_map_notes (1), print.osmapi_objects (1), print.osmapi_OsmChange (1)

httr2

req_perform (45), resp_body_xml (37), request (7), req_url_query (6), resp_body_string (6), req_url_path (2), oauth_client (1), obfuscated (1), req_body_form (1), req_error (1), req_retry (1), req_user_agent (1), resp_body_html (1), resp_content_type (1)

utils

timestamp (25), page (1)

stats

na.omit (10), df (3), pt (2), time (1)

graphics

text (6)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 23 files) and
  • 1 authors
  • 1 vignette
  • no internal data file
  • 3 imported packages
  • 54 exported functions (median 20 lines of code)
  • 199 non-exported functions in R (median 15 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 23 84.5
files_vignettes 1 68.4
files_tests 100 99.8
loc_R 2519 88.1
loc_vignettes 123 32.1
loc_tests 7857 99.0 TRUE
num_vignettes 1 64.8
n_fns_r 253 92.6
n_fns_r_exported 54 89.0
n_fns_r_not_exported 199 93.2
n_fns_per_file_r 6 73.2
num_params_per_fn 2 11.9
loc_per_fn_r 16 49.2
loc_per_fn_r_exp 20 46.7
loc_per_fn_r_not_exp 15 49.5
rel_whitespace_R 33 94.3
rel_whitespace_vignettes 36 34.5
rel_whitespace_tests 5 92.9
doclines_per_fn_exp 40 49.8
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 165 86.4

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

R-CMD-check.yaml
pkgdown.yaml

GitHub Workflow Results

id name conclusion sha run_number date
8373775236 pages build and deployment success be2551 71 2024-03-21
8341198216 pkgcheck failure 5b622a 3 2024-03-19
8373753017 pkgdown success c75f5c 99 2024-03-21
8373753024 R-CMD-check success c75f5c 97 2024-03-21
8373753016 test-coverage success c75f5c 97 2024-03-21

3b. goodpractice results

R CMD check with rcmdcheck

rcmdcheck found no errors, warnings, or notes

Test coverage with covr

Package coverage: 85.78

Cyclocomplexity with cyclocomp

The following functions have cyclocomplexity >= 15:

function cyclocomplexity
osm_get_objects 45
osmchange_modify 31
osm_query_changesets 19
set_osmapi_connection 15

Static code analyses with lintr

lintr found the following 1182 potential issues:

message number of times
Avoid using sapply, consider vapply instead, that's type safe 2
Lines should not be more than 80 characters. 1180


Package Versions

package version
pkgstats 0.1.3.11
pkgcheck 0.1.2.21


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with ✖️ have been resolved.

@ldecicco-USGS
Copy link

Sorry for the delay. I'll begin searching for an editor, thanks for the submission!

@ldecicco-USGS
Copy link

@ropensci-review-bot assign @adamhsparks as editor

@ropensci-review-bot
Copy link
Collaborator

Assigned! @adamhsparks is now the editor

@adamhsparks
Copy link
Member

adamhsparks commented Apr 18, 2024

Editor checks:

  • Fit: The package meets criteria for fit and overlap
  • Automated tests: Package has a testing suite and is tested via GitHub Actions
  • License: The package has a CRAN accepted license
  • Repository: The repository link resolves correctly

Editor comments

Hi there.

I've found a few issues flagged by the initial editor checks:

Missing @examples

You have a few empty #' @examples tags that need to be provided

osmapi_gps_traces.R:180: @examples requires a value.osmapi_gps_traces.R:222: @examples requires a value.osmapi_gps_traces.R:250: @examples requires a value.

goodpractice::gp output

── GP osmapiR ───────────────────────────────────────────────────────────────────────────────────────────────────────

It is good practice to

  ✖ write unit tests for all functions, and all package code in general. 86% of code lines are
    covered by test cases.

    R/osm_get_changesets.R:97:NA
    R/osm_get_changesets.R:98:NA
    R/osm_get_changesets.R:99:NA
    R/osm_get_objects.R:65:NA
    R/osm_get_objects.R:68:NA
    ... and 251 more lines

  ✖ avoid long code lines, it is bad for readability. Also, many people prefer editor windows
    that are about 80 characters wide. Try make your lines shorter than 80 characters

    inst/httptest2/redact.R:19:81
    inst/httptest2/redact.R:20:81
    inst/httptest2/redact.R:31:81
    R/oauth2.R:28:81
    R/oauth2.R:29:81
    ... and 1330 more lines

  ✖ avoid sapply(), it is not type safe. It might return a vector, or a list, depending on the
    input data. Consider using vapply() instead.

    tests/testthat/test-osmapiR_objects.R:60:21

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Reviewers note highlighted coverage gaps and please inspect what is not covered to see if you think important areas are missed.

devtools::spell_check()

You might consider adding the 'Language' field to your DESCRIPTION file.

DESCRIPTION does not contain 'Language' field. Defaulting to 'en-US'.
No spelling errors found.

Comments on Documentation

I noted the use of '', I would use dQuote{}, myself, and <code>, here I would use `` to denote code blocks, among other things in the ROxygen headers.
I would suggest reviewing the ROxygen documentation https://roxygen2.r-lib.org/index.html and possibly enabling Markdown support for formatting the Rd output.

The README has a misspelled R Package name, it should be ({osmextract})[https://github.com/ropensci/osmextract].
I'd also suggest linking to the other OSM packages everywhere they are listed, e.g. {osmdata}, referred to in the README rather than just leaving them as plain text.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Happy to start looking for reviewers. I recommend using this time to try and address some of the issues raised so they can be checked during review rather that be reflagged.

Let me know if anything is unclear!

@adamhsparks
Copy link
Member

@ropensci-review-bot assign jonthegeek as reviewer

@ropensci-review-bot
Copy link
Collaborator

jonthegeek added to the reviewers list. Review due date is 2024-05-20. Thanks jonthegeek for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

@ropensci-review-bot
Copy link
Collaborator

@jonthegeek: If you haven't done so, please fill this form for us to update our reviewers records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants