-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: use correct property for labelling HAL, let users enter property #180
Changes from all commits
67c49ed
4232141
d0c3b9d
7ae5dbb
f5ae209
d2a4686
44627ca
edc0142
0daaf11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#' Create the endpoint info object for `spq_init()` | ||
#' | ||
#' @param label_property Property used by the endpoint for labelling. | ||
#' | ||
#' @return A list to be used in `spq_init()`'s `endpoint_info` argument. | ||
#' @export | ||
#' | ||
#' @examples | ||
#' spq_endpoint_info(label_property = "skos:preflabel") | ||
spq_endpoint_info <- function(label_property = "rdfs:prefLabel") { | ||
|
||
# TODO check property more | ||
if (!is.character(label_property)) { | ||
cli::cli_abort("Must provide a character as {.arg label_property}.") | ||
} | ||
|
||
structure( | ||
list( | ||
label_property = label_property | ||
), | ||
class = "glitter_endpoint_info" | ||
) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
withr::with_dir("vignettes/articles", { | ||
knitr::knit("glitter_bibliometry.Rmd.orig", output = "glitter_bibliometry.Rmd") | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,2 @@ | ||
endpoints=tibble::tibble(name=c("wikidata", | ||
"dbpedia", | ||
"databnf", | ||
"isidore", | ||
"hal", | ||
"symogih"), | ||
url=c("https://query.wikidata.org/", | ||
"https://dbpedia.org/sparql", | ||
"https://data.bnf.fr/sparql", | ||
"https://isidore.science/sparql", | ||
"http://sparql.archives-ouvertes.fr/sparql", | ||
"http://bhp-publi.ish-lyon.cnrs.fr:8888/sparql")) | ||
usual_endpoints=readr::read_csv("data-raw/usual_endpoints.csv") | ||
usethis::use_data(usual_endpoints,overwrite=TRUE) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name,url | ||
wikidata,https://query.wikidata.org/sparql | ||
dbpedia,https://dbpedia.org/sparql | ||
databnf,https://data.bnf.fr/sparql | ||
isidore,https://isidore.science/sparql | ||
hal,http://sparql.archives-ouvertes.fr/sparql | ||
name,url,label_property | ||
wikidata,https://query.wikidata.org/sparql,rdfs:label | ||
dbpedia,https://dbpedia.org/sparql,rdfs:label | ||
databnf,https://data.bnf.fr/sparql,rdfs:label | ||
isidore,https://isidore.science/sparql,rdfs:label | ||
hal,http://sparql.archives-ouvertes.fr/sparql,skos:prefLabel |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lvaudor should some of this be rdfs:name instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no I think we're good