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

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

Open
15 of 26 tasks
aourednik opened this issue Sep 10, 2024 · 9 comments
Open
15 of 26 tasks
Assignees

Comments

@aourednik
Copy link

Submitting Author Name: André Ourendik
Submitting Author Github Handle: @aourednik
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


  • Paste the full DESCRIPTION file inside a code block below:
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

  • 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):

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.

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

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.

  • 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.

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

  • 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:

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

👋

@ropensci-review-bot
Copy link
Collaborator

Checks for SPARQLchunks (v0.2.1)

git hash: bcc65993

  • ✔️ Package name is available
  • ✖️ does not have a 'codemeta.json' file.
  • ✖️ does not have a 'contributing' file.
  • ✖️ The following functions have no documented return values: [autoproxyconfig, get_outcontent, sparql2df, sparql2list]
  • ✔️ 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: [autoproxyconfig, get_outcontent].
  • ✖️ Package has no continuous integration checks.
  • ✖️ Package coverage is 0.8% (should be at least 75%).
  • ✔️ 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 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(<path/to/repo>)', 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

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

rcmdcheck found no errors, warnings, or notes

Test coverage with covr

Package coverage: 0.8

The following files are not completely covered by tests:

file coverage
R/sparqlchunks.R 0.8%

Cyclocomplexity with cyclocomp

No functions have cyclocomplexity >= 15

Static code analyses with lintr

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 ✖️ have been resolved.

@adamhsparks
Copy link
Member

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
Copy link
Member

@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 SPARQLchunks (v0.2.1)

git hash: e89ea3ff

  • ✔️ Package name is available
  • ✖️ does not have a 'codemeta.json' file.
  • ✖️ does not have a 'contributing' file.
  • ✖️ The following functions have no documented return values: [autoproxyconfig, get_outcontent, sparql2df, sparql2list]
  • ✔️ 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: [autoproxyconfig, get_outcontent].
  • ✖️ Package has no continuous integration checks.
  • ✖️ Package coverage is 0.8% (should be at least 75%).
  • ✔️ R CMD check found no errors.
  • ✖️ R CMD check found 1 warning.

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(<path/to/repo>)', 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

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

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

Package coverage: 0.8

The following files are not completely covered by tests:

file coverage
R/sparqlchunks.R 0.8%

Cyclocomplexity with cyclocomp

No functions have cyclocomplexity >= 15

Static code analyses with lintr

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 ✖️ have been resolved.

@emilyriederer
Copy link

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?

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