ropensci / software-review

rOpenSci Software Peer Review.
286 stars 104 forks source link

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

Open jmaspons opened 3 months ago

jmaspons commented 3 months ago

Submitting Author Name: Joan Maspons Submitting Author Github Handle: !--author1-->@jmaspons<!--end-author1-- Repository: https://github.com/jmaspons/osmapiR Version submitted: 0.0.0.22 Submission type: Standard Editor: !--editor-->@adamhsparks<!--end-editor-- Reviewers: @jonthegeek, @ccamara

Due date for @jonthegeek: 2024-05-20 Due date for @ccamara: 2024-06-11

Archive: TBD Version accepted: TBD Language: en


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

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

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.

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

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](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) 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 commented 3 months ago

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

ropensci-review-bot commented 3 months ago

:rocket:

Editor check started

:wave:

ldecicco-USGS commented 3 months ago

@ropensci-review-bot check package

ropensci-review-bot commented 3 months ago

Thanks, about to send the query.

ropensci-review-bot commented 3 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 3 months ago

Checks for osmapiR (v0.0.0.22)

git hash: 5878c081

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()', 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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](https://github.com/jmaspons/osmapiR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) [![pkgdown.yaml](https://github.com/jmaspons/osmapiR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) **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](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 84.69 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/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](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/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 :heavy_multiplication_x: have been resolved.

ldecicco-USGS commented 3 months ago

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

jmaspons commented 3 months ago

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 commented 3 months ago

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

ldecicco-USGS commented 3 months ago

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 commented 3 months ago

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

ldecicco-USGS commented 3 months ago

@ropensci-review-bot check package

ropensci-review-bot commented 3 months ago

Thanks, about to send the query.

ropensci-review-bot commented 3 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 3 months ago

Checks for osmapiR (v0.0.0.23)

git hash: c75f5c03

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()', 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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](https://github.com/jmaspons/osmapiR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) [![pkgdown.yaml](https://github.com/jmaspons/osmapiR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) **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](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 85.78 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/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](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/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 :heavy_multiplication_x: have been resolved.

ldecicco-USGS commented 3 months ago

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

ldecicco-USGS commented 2 months ago

@ropensci-review-bot assign @adamhsparks as editor

ropensci-review-bot commented 2 months ago

Assigned! @adamhsparks is now the editor

adamhsparks commented 2 months ago

Editor checks:


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 commented 2 months ago

@ropensci-review-bot assign jonthegeek as reviewer

ropensci-review-bot commented 2 months ago

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 commented 2 months ago

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

ropensci-review-bot commented 1 month ago

:calendar: jonthegeek you have 2 days left before the due date for your review (2024-05-20).

jonthegeek commented 1 month ago

I'm so sorry for the delay! I presented at NYR this past week. I'm finally digging into this today!

jonthegeek commented 1 month ago

@ropensci-review-bot check package

ropensci-review-bot commented 1 month ago

I'm sorry @jonthegeek, I'm afraid I can't do that. That's something only editors, author1, author-others and reviewers-list are allowed to do.

jonthegeek commented 1 month ago

@adamhsparks There have been a bunch of commits since the package was checked, so I wanted to get that processing... and it looks like I'm not able to do so. I'll push forward with my review regardless, but it looks like things might not be fully configured.

maurolepore commented 1 month ago

@ropensci-review-bot check package

ropensci-review-bot commented 1 month ago

Thanks, about to send the query.

ropensci-review-bot commented 1 month ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 1 month ago

Checks for osmapiR (v0.0.0.32)

git hash: 054a021e

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 | 890| |internal |osmapiR | 205| |internal |utils | 26| |internal |stats | 11| |internal |graphics | 6| |imports |xml2 | 286| |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()', and examining the 'external_calls' table.

base

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

xml2

xml_child (62), xml_add_child (52), xml_new_root (43), 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 (49), 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), fetch_objects_batches (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_set_preferences_user (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_body (1), print.osmapi_changesets (1), print.osmapi_map_notes (1), print.osmapi_objects (1), print.osmapi_OsmChange (1), relation_2xml (1)

httr2

req_perform (45), resp_body_xml (36), request (7), req_url_query (6), resp_body_string (6), req_url_path (2), oauth_client (1), obfuscated (1), req_body_file (1), req_body_form (1), req_body_raw (1), req_error (1), req_retry (1), req_user_agent (1), resp_body_html (1), resp_header (1)

utils

timestamp (25), page (1)

stats

na.omit (5), 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 - 55 exported functions (median 22 lines of code) - 206 non-exported functions in R (median 16 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](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) 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 | 123| 99.9| | |loc_R | 2712| 89.1| | |loc_vignettes | 123| 32.1| | |loc_tests | 20732| 99.7|TRUE | |num_vignettes | 1| 64.8| | |n_fns_r | 261| 92.9| | |n_fns_r_exported | 55| 89.2| | |n_fns_r_not_exported | 206| 93.5| | |n_fns_per_file_r | 6| 73.8| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 17| 52.0| | |loc_per_fn_r_exp | 22| 50.8| | |loc_per_fn_r_not_exp | 16| 52.7| | |rel_whitespace_R | 32| 94.7| | |rel_whitespace_vignettes | 36| 34.5| | |rel_whitespace_tests | 2| 93.6| | |doclines_per_fn_exp | 41| 51.4| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 175| 87.0| | ---

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](https://github.com/jmaspons/osmapiR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) [![pkgdown.yaml](https://github.com/jmaspons/osmapiR/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jmaspons/osmapiR/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:--------------------------|:----------|:------|----------:|:----------| | 9138886236|pages build and deployment |success |c1045a | 98|2024-05-18 | | 9138872223|pkgdown |success |054a02 | 131|2024-05-18 | | 9138872233|R-CMD-check |success |054a02 | 129|2024-05-18 | | 9138872229|test-coverage |success |054a02 | 129|2024-05-18 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 91.15 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- osm_get_objects | 46 osmchange_modify | 32 osm_query_changesets | 19 osm_set_preferences_user | 19 set_osmapi_connection | 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 1380 potential issues: message | number of times --- | --- Lines should not be more than 80 characters. This line is 100 characters. | 12 Lines should not be more than 80 characters. This line is 101 characters. | 22 Lines should not be more than 80 characters. This line is 102 characters. | 24 Lines should not be more than 80 characters. This line is 103 characters. | 17 Lines should not be more than 80 characters. This line is 104 characters. | 22 Lines should not be more than 80 characters. This line is 105 characters. | 24 Lines should not be more than 80 characters. This line is 106 characters. | 25 Lines should not be more than 80 characters. This line is 107 characters. | 14 Lines should not be more than 80 characters. This line is 108 characters. | 28 Lines should not be more than 80 characters. This line is 109 characters. | 12 Lines should not be more than 80 characters. This line is 110 characters. | 28 Lines should not be more than 80 characters. This line is 111 characters. | 22 Lines should not be more than 80 characters. This line is 112 characters. | 38 Lines should not be more than 80 characters. This line is 113 characters. | 41 Lines should not be more than 80 characters. This line is 114 characters. | 41 Lines should not be more than 80 characters. This line is 115 characters. | 31 Lines should not be more than 80 characters. This line is 116 characters. | 23 Lines should not be more than 80 characters. This line is 117 characters. | 54 Lines should not be more than 80 characters. This line is 118 characters. | 62 Lines should not be more than 80 characters. This line is 119 characters. | 50 Lines should not be more than 80 characters. This line is 120 characters. | 40 Lines should not be more than 80 characters. This line is 121 characters. | 2 Lines should not be more than 80 characters. This line is 122 characters. | 1 Lines should not be more than 80 characters. This line is 123 characters. | 5 Lines should not be more than 80 characters. This line is 124 characters. | 3 Lines should not be more than 80 characters. This line is 125 characters. | 1 Lines should not be more than 80 characters. This line is 127 characters. | 2 Lines should not be more than 80 characters. This line is 128 characters. | 1 Lines should not be more than 80 characters. This line is 129 characters. | 5 Lines should not be more than 80 characters. This line is 12959 characters. | 1 Lines should not be more than 80 characters. This line is 130 characters. | 3 Lines should not be more than 80 characters. This line is 131 characters. | 2 Lines should not be more than 80 characters. This line is 133 characters. | 3 Lines should not be more than 80 characters. This line is 135 characters. | 5 Lines should not be more than 80 characters. This line is 136 characters. | 2 Lines should not be more than 80 characters. This line is 138 characters. | 3 Lines should not be more than 80 characters. This line is 141 characters. | 2 Lines should not be more than 80 characters. This line is 142 characters. | 2 Lines should not be more than 80 characters. This line is 143 characters. | 3 Lines should not be more than 80 characters. This line is 144 characters. | 1 Lines should not be more than 80 characters. This line is 145 characters. | 2 Lines should not be more than 80 characters. This line is 146 characters. | 1 Lines should not be more than 80 characters. This line is 147 characters. | 1 Lines should not be more than 80 characters. This line is 148 characters. | 2 Lines should not be more than 80 characters. This line is 149 characters. | 1 Lines should not be more than 80 characters. This line is 151 characters. | 2 Lines should not be more than 80 characters. This line is 153 characters. | 3 Lines should not be more than 80 characters. This line is 154 characters. | 2 Lines should not be more than 80 characters. This line is 155 characters. | 1 Lines should not be more than 80 characters. This line is 157 characters. | 1 Lines should not be more than 80 characters. This line is 158 characters. | 1 Lines should not be more than 80 characters. This line is 160 characters. | 3 Lines should not be more than 80 characters. This line is 161 characters. | 3 Lines should not be more than 80 characters. This line is 163 characters. | 1 Lines should not be more than 80 characters. This line is 164 characters. | 3 Lines should not be more than 80 characters. This line is 165 characters. | 2 Lines should not be more than 80 characters. This line is 167 characters. | 1 Lines should not be more than 80 characters. This line is 168 characters. | 1 Lines should not be more than 80 characters. This line is 170 characters. | 1 Lines should not be more than 80 characters. This line is 172 characters. | 1 Lines should not be more than 80 characters. This line is 175 characters. | 1 Lines should not be more than 80 characters. This line is 176 characters. | 5 Lines should not be more than 80 characters. This line is 177 characters. | 5 Lines should not be more than 80 characters. This line is 180 characters. | 1 Lines should not be more than 80 characters. This line is 182 characters. | 1 Lines should not be more than 80 characters. This line is 183 characters. | 2 Lines should not be more than 80 characters. This line is 184 characters. | 2 Lines should not be more than 80 characters. This line is 185 characters. | 1 Lines should not be more than 80 characters. This line is 186 characters. | 4 Lines should not be more than 80 characters. This line is 188 characters. | 2 Lines should not be more than 80 characters. This line is 190 characters. | 1 Lines should not be more than 80 characters. This line is 192 characters. | 2 Lines should not be more than 80 characters. This line is 194 characters. | 1 Lines should not be more than 80 characters. This line is 196 characters. | 2 Lines should not be more than 80 characters. This line is 197 characters. | 1 Lines should not be more than 80 characters. This line is 203 characters. | 2 Lines should not be more than 80 characters. This line is 204 characters. | 4 Lines should not be more than 80 characters. This line is 208 characters. | 2 Lines should not be more than 80 characters. This line is 209 characters. | 2 Lines should not be more than 80 characters. This line is 210 characters. | 1 Lines should not be more than 80 characters. This line is 214 characters. | 6 Lines should not be more than 80 characters. This line is 215 characters. | 2 Lines should not be more than 80 characters. This line is 216 characters. | 3 Lines should not be more than 80 characters. This line is 219 characters. | 1 Lines should not be more than 80 characters. This line is 220 characters. | 2 Lines should not be more than 80 characters. This line is 221 characters. | 3 Lines should not be more than 80 characters. This line is 226 characters. | 1 Lines should not be more than 80 characters. This line is 229 characters. | 1 Lines should not be more than 80 characters. This line is 234 characters. | 1 Lines should not be more than 80 characters. This line is 235 characters. | 1 Lines should not be more than 80 characters. This line is 250 characters. | 1 Lines should not be more than 80 characters. This line is 251 characters. | 1 Lines should not be more than 80 characters. This line is 253 characters. | 1 Lines should not be more than 80 characters. This line is 256 characters. | 1 Lines should not be more than 80 characters. This line is 259 characters. | 1 Lines should not be more than 80 characters. This line is 262 characters. | 1 Lines should not be more than 80 characters. This line is 264 characters. | 1 Lines should not be more than 80 characters. This line is 268 characters. | 1 Lines should not be more than 80 characters. This line is 271 characters. | 1 Lines should not be more than 80 characters. This line is 272 characters. | 2 Lines should not be more than 80 characters. This line is 273 characters. | 4 Lines should not be more than 80 characters. This line is 283 characters. | 1 Lines should not be more than 80 characters. This line is 287 characters. | 1 Lines should not be more than 80 characters. This line is 289 characters. | 1 Lines should not be more than 80 characters. This line is 290 characters. | 1 Lines should not be more than 80 characters. This line is 292 characters. | 1 Lines should not be more than 80 characters. This line is 299 characters. | 1 Lines should not be more than 80 characters. This line is 303 characters. | 1 Lines should not be more than 80 characters. This line is 304 characters. | 1 Lines should not be more than 80 characters. This line is 311 characters. | 1 Lines should not be more than 80 characters. This line is 312 characters. | 2 Lines should not be more than 80 characters. This line is 314 characters. | 1 Lines should not be more than 80 characters. This line is 317 characters. | 1 Lines should not be more than 80 characters. This line is 327 characters. | 1 Lines should not be more than 80 characters. This line is 331 characters. | 1 Lines should not be more than 80 characters. This line is 338 characters. | 1 Lines should not be more than 80 characters. This line is 340 characters. | 1 Lines should not be more than 80 characters. This line is 371 characters. | 1 Lines should not be more than 80 characters. This line is 379 characters. | 1 Lines should not be more than 80 characters. This line is 380 characters. | 3 Lines should not be more than 80 characters. This line is 385 characters. | 1 Lines should not be more than 80 characters. This line is 390 characters. | 1 Lines should not be more than 80 characters. This line is 391 characters. | 1 Lines should not be more than 80 characters. This line is 402 characters. | 1 Lines should not be more than 80 characters. This line is 410 characters. | 1 Lines should not be more than 80 characters. This line is 420 characters. | 1 Lines should not be more than 80 characters. This line is 433 characters. | 1 Lines should not be more than 80 characters. This line is 446 characters. | 1 Lines should not be more than 80 characters. This line is 463 characters. | 1 Lines should not be more than 80 characters. This line is 496 characters. | 1 Lines should not be more than 80 characters. This line is 505 characters. | 1 Lines should not be more than 80 characters. This line is 518 characters. | 1 Lines should not be more than 80 characters. This line is 5275 characters. | 1 Lines should not be more than 80 characters. This line is 567 characters. | 1 Lines should not be more than 80 characters. This line is 664 characters. | 4 Lines should not be more than 80 characters. This line is 667 characters. | 2 Lines should not be more than 80 characters. This line is 668 characters. | 2 Lines should not be more than 80 characters. This line is 669 characters. | 4 Lines should not be more than 80 characters. This line is 705 characters. | 3 Lines should not be more than 80 characters. This line is 715 characters. | 1 Lines should not be more than 80 characters. This line is 788 characters. | 1 Lines should not be more than 80 characters. This line is 81 characters. | 40 Lines should not be more than 80 characters. This line is 82 characters. | 29 Lines should not be more than 80 characters. This line is 83 characters. | 39 Lines should not be more than 80 characters. This line is 84 characters. | 19 Lines should not be more than 80 characters. This line is 85 characters. | 25 Lines should not be more than 80 characters. This line is 86 characters. | 41 Lines should not be more than 80 characters. This line is 87 characters. | 33 Lines should not be more than 80 characters. This line is 88 characters. | 24 Lines should not be more than 80 characters. This line is 89 characters. | 21 Lines should not be more than 80 characters. This line is 90 characters. | 19 Lines should not be more than 80 characters. This line is 91 characters. | 34 Lines should not be more than 80 characters. This line is 92 characters. | 43 Lines should not be more than 80 characters. This line is 93 characters. | 30 Lines should not be more than 80 characters. This line is 94 characters. | 28 Lines should not be more than 80 characters. This line is 95 characters. | 19 Lines should not be more than 80 characters. This line is 96 characters. | 25 Lines should not be more than 80 characters. This line is 97 characters. | 22 Lines should not be more than 80 characters. This line is 98 characters. | 25 Lines should not be more than 80 characters. This line is 99 characters. | 23


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.5.2 | |pkgcheck |0.1.2.34 |


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

jonthegeek commented 1 month ago

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality

Estimated hours spent reviewing: 1 hr (so far)


Review Comments

This package looks great! There's a lot of functionality here to dig into!

A few things to clean up:

These functions are still missing @examples in their roxygen blocks: osm_create_gpx, osm_delete_gpx, osm_redaction_object, osm_update_gpx. I know that was discussed previously, but you need to remove the @examples roxygen tag if it is empty. If at all possible, I recommend checking the Examples section of R Packages (2e) for ideas about how to show something for these functions. Users often scroll down to the examples before reading documentation, so having something there to show how the code is intended to work can be helpful, even if it's somewhat contrived (and/or can't actually run).

When I run the tests, there is a lot of "unexpected" output that makes it difficult to see what is happening. It looks like everything is working in the end, but it would be helpful if you could capture or suppress any expected output, and eliminate anything that shouldn't happen. For example, test-user_data.R is interrupted by Error in httr2::req_perform(req) : HTTP 404 Not Found. You deal with that error in osm_get_user_details.R with a try() on lines 67-70. If you use tryCatch(), you could replace those lines and suppress the confusing error message, with something like this:

out <- tryCatch(
  osm_details_user(user_id = user_id, format = format),
  error = function(e) empty_user()
)

If, on the other hand, you intend for the user to see an error in that case, instead I'd wrap the call in expect_error(), so it doesn't trigger confusing prints when the test runs, similar to this:

  with_mock_dir("mock_details_user_empty", {
    expect_error({empty_usr <- osm_get_user_details(user_id = 2)})
  })

I haven't tracked down the source of the data.frames that print in the test output, but they make it even harder to follow the tests. I would definitely prefer for those to be suppressed as well!

If you can clean up those pieces, it will make it much easier to see what is supposed to happen as I work through the review!

adamhsparks commented 1 month ago

@ropensci-review-bot assign ccamara as reviewer

ropensci-review-bot commented 1 month ago

ccamara added to the reviewers list. Review due date is 2024-06-11. Thanks ccamara 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 commented 1 month ago

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

adamhsparks commented 1 month ago

Thank you, @jonthegeek, for your review and thank you @maurolepore for picking up the slack here. I'd missed the conversation on this somehow in my notifications.

@jonthegeek, we'll wait for @ccamara to submit his review so you'll have time to revise yours or add additional thoughts for a while now.

jmaspons commented 1 month ago

Thanks for the feedback, @jonthegeek ! I fixed your comments in https://github.com/jmaspons/osmapiR/pull/21 and found a new issue https://github.com/jmaspons/osmapiR/issues/22

@ropensci-review-bot check package

Robinlovelace commented 1 month ago

Hey all, I (finally) read an email from @adamhsparks about this. Just to say: would be happy to review. Looks really interesting and can provide feedback if that would be useful.

ropensci-review-bot commented 3 weeks ago

:calendar: ccamara you have 2 days left before the due date for your review (2024-06-11).

ccamara commented 2 weeks ago

@ropensci-review-bot check package

ropensci-review-bot commented 2 weeks ago

I'm sorry @ccamara, I'm afraid I can't do that. That's something only editors, author1, author-others and reviewers-list are allowed to do.

ccamara commented 2 weeks ago

@adamhsparks There have been some changes since last review, so I wanted to check the package, but I can't do that. I'm reviewing it nevertheless, and may submit review soon, but worth checking anyway?

ldecicco-USGS commented 2 weeks ago

@ropensci-review-bot check package

ropensci-review-bot commented 2 weeks ago

Thanks, about to send the query.

ropensci-review-bot commented 2 weeks ago

:rocket:

The following problem was found in your submission template:

:wave:

ccamara commented 2 weeks ago

I'm happy to submit my review. Full disclaimer: this is my first package review ever, so I hope this is within the scope of what was expected.

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality

Estimated hours spent reviewing: 3


Review Comments

I want to thank @jmaspons for their excellent job in doing this useful package which (full disclaimer) I am very likely to be using in the future.

The package implements more than 20 functions and has a function matching every OSM API call. All the major functions are well documented, with examples, and have dedicated tests. I couldn't find major issues via automated tools, and I can see that the issues flagged by @jonthegeek's review have been addressed*.

My main concern is on understanding what this package is (and how it differs from other potentially related packages and OSMs APIs, such as osmdata) and what it can do.

While I can see significant efforts in documentation functions and readme, I must say that I've been an active OSM contributor since 2014, I'm familiar with all the concepts (changesets, history, gpx traces...) and other APIs, such as overpass. But even with that, I struggle to get a full picture of what this package can do, and more importantly, when it should be used. IMHO, this is important given that OSM discourages automated edits. It could be argued that the audience of this package should be familiar with OSM API already, and therefore, they know the answers to those questions, and I'd be OK with that. However, my experience is that more often than not, people are not familiar with most of OSM's nuisances and would be looking for a package to "work with OSM" searching on a search engine for "OpenStreetMap R package" or "OSM R package" (or similar queries) and may get here. IMHO, a disclaimer, or note for those people either would be appreciated. This is especially relevant considering the nature of the changes that this tool provides, which may be dangerous if used by non-expert OSM mappers (which may ultimately lead to vandalism).

That links to my next item: I find the example on the readme file is useful, well explained, relevant and reproducible, but I wonder how representative it is, given that osmapiR can do way more than that. Again, I'd suggest having an indication on how to get started, which can be a link to the aforementioned help page.

So, as a wrap up, I would suggest improving the readme file with the following suggestions:

That said, I acknowledge that A) most of it has been addressed in the ?osmapiR, so it could either be adapted from there and indicate prominently that this is the place to get started, and B) I do not think this is a stopper and could be done after the package is reviewed and accepted (I would kindly contribute with the documentation).

* I didn't notice any warnings when running the tests, and I can see empty examples being deleted, but I can see osm_create_gpx . osm_update_gpxand osm_delete_gpx do not include an empty example, pointing to a dedicated vignette instead, which I believe is missing.

adamhsparks commented 2 weeks ago

@ropensci-review-bot submit review https://github.com/ropensci/software-review/issues/633#issuecomment-2121192135 time 1

ropensci-review-bot commented 2 weeks ago

Logged review for jonthegeek (hours: 1)

adamhsparks commented 2 weeks ago

@ropensci-review-bot submit review https://github.com/ropensci/software-review/issues/633#issuecomment-2160182185 time 3

ropensci-review-bot commented 2 weeks ago

Logged review for ccamara (hours: 3)