ropensci / software-review

rOpenSci Software Peer Review.
294 stars 104 forks source link

SPARQLChunks : query SPARQL endpoints and run SPARQL chunks in R-markdown files. #656

Open aourednik opened 2 months ago

aourednik commented 2 months ago

Submitting Author Name: André Ourendik Submitting Author Github Handle: !--author1-->@aourednik<!--end-author1-- Repository: https://github.com/aourednik/SPARQLchunks Version submitted:0.2.1 Submission type: Standard Editor: TBD Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en


Package: SPARQLchunks
Title: Run SPARQL Chunks and Inline Functions to Retrieve Data
Version: 0.3.0
Authors@R: 
    person("Andre", "Ourednik", , "andre.ourednik@epfl.ch", role = c("aut", "cre"),
           comment = c(ORCID = "0000-0002-0309-8715"))
Description: Allows to run SPARQL chunks in R-markdown files. Also provides inline functions to send a SPARQL query to an endpoint and retrieve data in data frame or list form. 
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports: 
    curl,
    httr,
    knitr,
    magrittr,
    xml2
VignetteBuilder: knitr
Suggests: 
    rmarkdown
URL: https://github.com/aourednik/SPARQLchunks
BugReports: https://github.com/aourednik/SPARQLchunks/issues

Scope

SPARQL is a major language for accessing, extracting and munging RDF data. While RStudio provides a number of convenient ways to access to write SQL code chunks in Rmarkdown, to run these chunks and to assign the value of the query result directly to a variable of your choice. No such thing is available out of the box for SPARQL queries. This is where the SPARQLchunks package steps in. It allows you to query SPARQL endpoints in two different ways: (1) run SPARQL chunks in Rmarkdown files. (2) run inline functions to send SPARQL queries to a user-defined endpoint and retrieve data in dataframe form (sparql2df) or list form (sparql2list). Endpoints can also be reached from behind corporate firewalls on Windows machines thanks to automatic proxy detection.

All scientists working with RDF data repositories

Not really, there used to be a "SPARQL" package, but it is deprecated. There is also the more genereic rdflib. No package except SPARQLChunks allows to write chunks of SPARQL in RMarkdown and retrieve the data directly into a data.frame or list object.

The package does not pass the automatic CRAN checks, as storing the result of a chunk requires assigning to the global environment to store the query result in the output.var. Example:

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

Code of conduct

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

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 2 months ago

Checks for SPARQLchunks (v0.2.1)

git hash: bcc65993

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 | 33| |internal |SPARQLchunks | 10| |internal |utils | 2| |internal |stats | 1| |imports |httr | 7| |imports |xml2 | 2| |imports |magrittr | 1| |imports |curl | NA| |imports |knitr | NA| |suggests |rmarkdown | 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

paste (5), tempfile (5), c (3), url (3), file.path (2), gsub (2), list (2), readLines (2), tempdir (2), tryCatch (2), ifelse (1), is.null (1), length (1), return (1), textConnection (1)

SPARQLchunks

autoproxyconfig (3), get_outcontent (3), sparql2list (2), eng_sparql (1), sparql2df (1)

httr

use_proxy (3), add_headers (2), content (1), GET (1)

utils

download.file (1), read.csv (1)

xml2

as_list (1), read_xml (1)

magrittr

%>% (1)

stats

df (1)

**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 2 files) and - 1 authors - 1 vignette - no internal data file - 5 imported packages - 5 exported functions (median 18 lines of code) - 7 non-exported functions in R (median 18 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 | 2| 11.1| | |files_vignettes | 1| 62.0| | |files_tests | 0| 0.0|TRUE | |loc_R | 155| 17.9| | |loc_vignettes | 102| 24.4| | |num_vignettes | 1| 59.0| | |n_fns_r | 12| 17.0| | |n_fns_r_exported | 5| 25.4| | |n_fns_r_not_exported | 7| 16.5| | |n_fns_per_file_r | 6| 75.5| | |num_params_per_fn | 4| 51.1| | |loc_per_fn_r | 18| 55.2| | |loc_per_fn_r_exp | 18| 42.6| | |loc_per_fn_r_not_exp | 18| 58.6| | |rel_whitespace_R | 4| 6.3| | |rel_whitespace_vignettes | 36| 26.4| | |doclines_per_fn_exp | 22| 18.0| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 6| 24.5| | ---

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)

--- #### 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: 0.8 The following files are not completely covered by tests: file | coverage --- | --- R/sparqlchunks.R | 0.8% #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found no issues with this package!


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.6.17 | |pkgcheck |0.1.2.58 |


Editor-in-Chief Instructions:

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

adamhsparks commented 1 month ago

Hi @aourednik, have you made any progress addressing the issues that the bot flagged?

Please let me know how I can assist you in correcting any of these issues.

adamhsparks commented 3 weeks ago

@ropensci-review-bot check package

ropensci-review-bot commented 3 weeks ago

Thanks, about to send the query.

ropensci-review-bot commented 3 weeks ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 3 weeks ago

Checks for SPARQLchunks (v0.2.1)

git hash: e89ea3ff

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 | 33| |internal |SPARQLchunks | 10| |internal |utils | 2| |internal |stats | 1| |imports |httr | 7| |imports |xml2 | 2| |imports |magrittr | 1| |imports |curl | NA| |imports |knitr | NA| |suggests |rmarkdown | 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

paste (5), tempfile (5), c (3), url (3), file.path (2), gsub (2), list (2), readLines (2), tempdir (2), tryCatch (2), ifelse (1), is.null (1), length (1), return (1), textConnection (1)

SPARQLchunks

autoproxyconfig (3), get_outcontent (3), sparql2list (2), eng_sparql (1), sparql2df (1)

httr

use_proxy (3), add_headers (2), content (1), GET (1)

utils

download.file (1), read.csv (1)

xml2

as_list (1), read_xml (1)

magrittr

%>% (1)

stats

df (1)

**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 2 files) and - 1 authors - 1 vignette - no internal data file - 5 imported packages - 5 exported functions (median 18 lines of code) - 7 non-exported functions in R (median 18 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 | 2| 11.1| | |files_vignettes | 1| 61.9| | |files_tests | 0| 0.0|TRUE | |loc_R | 155| 17.9| | |loc_vignettes | 102| 24.4| | |num_vignettes | 1| 58.8| | |n_fns_r | 12| 17.0| | |n_fns_r_exported | 5| 25.3| | |n_fns_r_not_exported | 7| 16.4| | |n_fns_per_file_r | 6| 75.7| | |num_params_per_fn | 4| 51.2| | |loc_per_fn_r | 18| 55.1| | |loc_per_fn_r_exp | 18| 42.5| | |loc_per_fn_r_not_exp | 18| 58.5| | |rel_whitespace_R | 4| 6.2| | |rel_whitespace_vignettes | 36| 26.2| | |doclines_per_fn_exp | 22| 18.0| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 6| 24.5| | ---

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)

--- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following warning: 1. checking package subdirectories ... WARNING Invalid citation information in ‘inst/CITATION’: Error in (function (bibtype, textVersion, header = NULL, footer = NULL, key = NULL, ..., other = list()) { bibtype <- as.character(bibtype) stopifnot(length(bibtype) == 1L) pos <- match(tolower(bibtype), tolower(BibTeX_names)) if (is.na(pos)) stop(gettextf("%s has to be one of %s", sQuote("bibtype"), paste(BibTeX_names, collapse = ", ")), domain = NA) bibtype <- BibTeX_names[pos] rval <- c(list(...), other) rval <- rval[!vapply(rval, .is_not_nonempty_text, NA)] fields <- tolower(names(rval)) names(rval) <- fields attr(rval, "bibtype") <- bibtype .bibentry_check_bibentry1(rval) pos <- fields %in% c("author", "editor") if (any(pos)) { for (i in which(pos)) rval[[i]] <- as.person(rval[[i]]) } if (any(!pos)) { for (i in which(!pos)) { s <- trimws(as.character(rval[[i]])) rval[[i]] <- paste(s[!is.na(s) & nzchar(s)], collapse = " ") } } attr(rval, "key") <- if (is.null(key)) NULL else as.character(key) if (!is.null(textVersion)) attr(rval, "textVersion") <- as.character(textVersion) if (!.is_not_nonempty_text(header)) attr(rval, "header") <- paste(header, collapse = "\n") if (!.is_not_nonempty_text(footer)) attr(rval, "footer") <- paste(footer, collapse = "\n") return(rval)})(bibtype = "Software", textVersion = NULL, header = NULL, footer = NULL, key = NULL, title = "SPARQLChunks", author = "André Ourednik", url = "https://github.com/aourednik/SPARQLchunks", year = "2024", other = list()): ‘bibtype’ has to be one of Article, Book, Booklet, InBook, InCollection, InProceedings, Manual, MastersThesis, Misc, PhdThesis, Proceedings, TechReport, Unpublished #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 0.8 The following files are not completely covered by tests: file | coverage --- | --- R/sparqlchunks.R | 0.8% #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found no issues with this package!


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.2.0.46 | |pkgcheck |0.1.2.63 |


Editor-in-Chief Instructions:

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

emilyriederer commented 1 week ago

Hey @aourednik - I'm replacing @adamhsparks as Editor in Chief this quarter. Wanted to check in with you: are you still interested in resolving the issues flagged by the bot and moving forward with the review?