-
Notifications
You must be signed in to change notification settings - Fork 6
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
pkgdown build error #62
Comments
Happy to help if needed! |
Dear Maëlle, apologise for my late replay! In the next days we release the new version, also with the resolution of the error. Thanks!! |
Thank you! |
Error I see in the vignette siteGeneral <- ReLTER::get_site_info(
deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe",
category = "General"
)
#> Warning: Unknown or uninitialised column: `generalInfo.keywords`.
#> Error in `colnames<-`(`*tmp*`, value = c("keywordsLabel", "keywordsURI")): attempt to set 'colnames' on an object with less than two dimensions Created on 2022-10-11 with reprex v2.0.2 |
I have updated to the last version all packages and I can't reproduce the error.
|
I still get the error, I added session info in case it is relevant. Does this function need authentication? siteGeneral <- ReLTER::get_site_info(
deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe",
category = "General"
)
#> Warning: Unknown or uninitialised column: `generalInfo.keywords`.
#> Error in `colnames<-`(`*tmp*`, value = c("keywordsLabel", "keywordsURI")): attempt to set 'colnames' on an object with less than two dimensions Created on 2022-10-20 with reprex v2.0.2 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.2.0 (2022-04-22)
#> os Ubuntu 20.04.4 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_US.utf8
#> collate en_US.utf8
#> ctype en_US.utf8
#> tz Europe/Paris
#> date 2022-10-20
#> pandoc 2.18 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> abind 1.4-5 2016-07-21 [1] RSPM
#> ape 5.6-2 2022-03-02 [1] RSPM
#> assertthat 0.2.1 2019-03-21 [1] RSPM (R 4.2.0)
#> base64enc 0.1-3 2015-07-28 [1] RSPM (R 4.2.0)
#> bold 1.2.0 2021-05-11 [1] RSPM
#> class 7.3-20 2022-01-16 [2] CRAN (R 4.2.0)
#> classInt 0.4-8 2022-09-29 [1] RSPM
#> cli 3.4.1 2022-09-23 [1] RSPM
#> codetools 0.2-18 2020-11-04 [2] CRAN (R 4.2.0)
#> colorspace 2.0-3 2022-02-21 [1] RSPM (R 4.2.0)
#> conditionz 0.1.0 2019-04-24 [1] RSPM
#> crayon 1.5.2 2022-09-29 [1] RSPM
#> crosstalk 1.2.0 2021-11-04 [1] RSPM
#> crul 1.3 2022-09-03 [1] CRAN (R 4.2.0)
#> curl 4.3.3 2022-10-06 [1] RSPM
#> data.table 1.14.4 2022-10-17 [1] CRAN (R 4.2.0)
#> DBI 1.1.3.9000 2022-06-20 [1] Github (r-dbi/DBI@5f632ae)
#> dichromat 2.0-0.1 2022-05-02 [1] RSPM
#> digest 0.6.30 2022-10-18 [1] RSPM
#> dplyr 1.0.10 2022-09-01 [1] CRAN (R 4.2.0)
#> dtplyr 1.2.2 2022-08-20 [1] RSPM
#> e1071 1.7-11 2022-06-07 [1] RSPM
#> evaluate 0.17 2022-10-07 [1] CRAN (R 4.2.0)
#> extrafont 0.18 2022-04-12 [1] RSPM (R 4.2.0)
#> extrafontdb 1.0 2012-06-11 [1] RSPM (R 4.2.0)
#> fansi 1.0.3 2022-03-24 [1] RSPM (R 4.2.0)
#> farver 2.1.1 2022-07-06 [1] CRAN (R 4.2.0)
#> fastmap 1.1.0 2021-01-25 [1] RSPM (R 4.2.0)
#> foreach 1.5.2 2022-02-02 [1] RSPM
#> fs 1.5.2 2021-12-08 [1] RSPM (R 4.2.0)
#> generics 0.1.3 2022-07-05 [1] RSPM
#> ggforce 0.4.1 2022-10-04 [1] RSPM
#> ggplot2 3.3.6 2022-05-03 [1] RSPM
#> glue 1.6.2 2022-02-24 [1] RSPM (R 4.2.0)
#> gridExtra 2.3 2017-09-09 [1] RSPM
#> gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.0)
#> highr 0.9 2021-04-16 [1] RSPM (R 4.2.0)
#> htmltools 0.5.3.9000 2022-09-29 [1] Github (rstudio/htmltools@5fa01e7)
#> htmlwidgets 1.5.4 2021-09-08 [1] RSPM (R 4.2.0)
#> httpcode 0.3.0 2020-04-10 [1] RSPM (R 4.2.0)
#> httr 1.4.4 2022-08-17 [1] RSPM
#> iterators 1.0.14 2022-02-05 [1] RSPM
#> jqr 1.2.3 2022-03-10 [1] RSPM
#> jsonlite 1.8.2 2022-10-02 [1] CRAN (R 4.2.0)
#> KernSmooth 2.23-20 2021-05-03 [2] CRAN (R 4.2.0)
#> knitr 1.40 2022-08-24 [1] RSPM
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.2.0)
#> lazyeval 0.2.2 2019-03-15 [1] RSPM (R 4.2.0)
#> leafem 0.2.0 2022-04-16 [1] RSPM
#> leaflet 2.1.1 2022-03-23 [1] RSPM
#> leafsync 0.1.0 2019-03-05 [1] RSPM
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.0)
#> lwgeom 0.2-9 2022-10-01 [1] CRAN (R 4.2.0)
#> magrittr 2.0.3 2022-03-30 [1] RSPM (R 4.2.0)
#> MASS 7.3-58.1 2022-08-03 [1] RSPM
#> munsell 0.5.0 2018-06-12 [1] RSPM (R 4.2.0)
#> nlme 3.1-160 2022-10-10 [1] CRAN (R 4.2.0)
#> pillar 1.8.1 2022-08-19 [1] RSPM
#> pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.2.0)
#> plyr 1.8.7 2022-03-24 [1] RSPM
#> png 0.1-7 2013-12-03 [1] RSPM
#> polyclip 1.10-0 2019-03-14 [1] RSPM
#> proxy 0.4-27 2022-06-09 [1] RSPM
#> purrr 0.3.5 2022-10-06 [1] CRAN (R 4.2.0)
#> qrcode 0.1.4 2021-10-13 [1] RSPM
#> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0)
#> R.methodsS3 1.8.2 2022-06-13 [1] RSPM
#> R.oo 1.25.0 2022-06-12 [1] RSPM
#> R.utils 2.12.0 2022-06-28 [1] RSPM
#> R6 2.5.1 2021-08-19 [1] RSPM (R 4.2.0)
#> raster 3.6-3 2022-09-18 [1] RSPM
#> RColorBrewer 1.1-3 2022-04-03 [1] RSPM (R 4.2.0)
#> Rcpp 1.0.9 2022-07-08 [1] RSPM (R 4.2.0)
#> ReLTER 1.1.0 2022-10-20 [1] local
#> reprex 2.0.2 2022-08-17 [1] RSPM
#> reshape 0.8.9 2022-04-12 [1] RSPM
#> rgeos 0.5-9 2021-12-15 [1] RSPM
#> rlang 1.0.6 2022-09-24 [1] RSPM (R 4.2.0)
#> rmarkdown 2.17 2022-10-07 [1] CRAN (R 4.2.0)
#> rosm 0.2.6 2022-06-09 [1] RSPM
#> rstudioapi 0.14 2022-08-22 [1] RSPM
#> Rttf2pt1 1.3.11 2022-10-08 [1] CRAN (R 4.2.0)
#> scales 1.2.1 2022-08-20 [1] RSPM
#> sessioninfo 1.2.2 2021-12-06 [1] RSPM (R 4.2.0)
#> sf 1.0-8 2022-07-14 [1] RSPM
#> sp 1.5-0 2022-06-05 [1] RSPM
#> stars 0.5-6 2022-07-21 [1] CRAN (R 4.2.0)
#> stringi 1.7.8 2022-07-11 [1] RSPM (R 4.2.0)
#> stringr 1.4.1 2022-08-20 [1] RSPM
#> styler 1.7.0.9001 2022-05-31 [1] https://r-lib.r-universe.dev (R 4.2.0)
#> taxize 0.9.100 2022-04-22 [1] RSPM
#> terra 1.6-17 2022-09-10 [1] RSPM (R 4.2.0)
#> tibble 3.1.8 2022-07-22 [1] CRAN (R 4.2.0)
#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.0)
#> tmap 3.3-3 2022-03-02 [1] RSPM
#> tmaptools 3.1-1 2021-01-19 [1] RSPM
#> tweenr 2.0.2 2022-09-06 [1] RSPM
#> units 0.8-0 2022-02-05 [1] CRAN (R 4.2.0)
#> utf8 1.2.2 2021-07-24 [1] RSPM (R 4.2.0)
#> uuid 1.1-0 2022-04-19 [1] RSPM (R 4.2.0)
#> vctrs 0.4.2 2022-09-29 [1] RSPM
#> viridisLite 0.4.1 2022-08-22 [1] RSPM
#> waffle 0.7.0 2017-01-07 [1] RSPM
#> withr 2.5.0 2022-03-03 [1] RSPM (R 4.2.0)
#> worrms 0.4.2 2020-07-08 [1] RSPM
#> xfun 0.34 2022-10-18 [1] RSPM
#> XML 3.99-0.11 2022-10-03 [1] RSPM
#> xml2 1.3.3 2021-11-30 [1] RSPM (R 4.2.0)
#> xslt 1.4.3 2021-05-05 [1] RSPM (R 4.2.0)
#> yaml 2.3.6 2022-10-18 [1] RSPM
#> zoo 1.8-11 2022-09-17 [1] RSPM
#>
#> [1] /home/maelle/R/x86_64-pc-linux-gnu-library/4.2
#> [2] /opt/R/4.2.0/lib/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
You could pre-build the vignette https://ropensci.org/blog/2019/12/08/precompute-vignettes/ (and set a reminder for yourself in a But we should still find out why I can't run the code I suppose 😅 |
thanks!
And please can execute also
|
Did you forget to push updates? These functions aren't exported (I'm using a clone of this repository) |
I push all currently in the dev branch. May be is this the problem? Do you have clone main branch? |
yes I was using the main branch, and that is what the pkgdown building infrastructure uses. |
Ahhh ok the error is about the function because I don't already done the PR from dev to main. I think to solve all the issue (e.g. ERROR: dependency ‘SPARQL’ is not available for package ReLTER) in the dev branch and after merge this in the main. Isn't that right? |
Now I also get the error about SPARQL. It has been archived on CRAN https://cran.r-project.org/web/packages/SPARQL/ However see https://discuss.ropensci.org/t/optional-suggests-dependency-that-has-been-archived-on-cran/3071 |
yes it makes sense! |
Regarding SPARQL you could also stop using it by making the API calls with httr2 or httr, example in https://github.com/lvaudor/glitter/blob/3fe7c9f90258a4ac9892f832a05da9e5b1d6e8e1/R/send_sparql.R#L34 (please tell me if you'd prefer me to make a PR, or have any question!) |
do you have some suggestion about this error? |
We're both too fast answering 😂 So I think the best would be to remove the dependency on SPARQL by using httr2 or httr see #62 (comment) |
In that package I'm giving as an example we had removed the SPARQL dependency, reasoning in lvaudor/glitter#19 |
(httr might be a better choice since ReLTER already imports it, unless you switch everything to httr2 🤪 ) |
Yes httr is already imported. But before to remove SPARQL and use httr, can you tell me how to use httr in this case (
I want understand because I am a fan of sparql queries. 🤪 |
Here's a reprex with both httr2 and httr solutions (I haven't checked the encoding, but it might help as a starting point) ireaEndpoint <- "http://fuseki1.get-it.it/directory/query"
ireaQuery <- paste0(
"PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX qudt: <http://qudt.org/schema/qudt/>
SELECT ?c ?l ?code ?s
WHERE {
SERVICE <http://vocab.nerc.ac.uk/sparql/sparql> {
?c rdf:type skos:Concept .
<http://vocab.nerc.ac.uk/collection/P06/current/> skos:member ?c .
OPTIONAL {
?c skos:altLabel ?l .
?c owl:sameAs ?s .
}
FILTER(?l = 'degC')
FILTER(REGEX(STR(?s), 'qudt'))
}
SERVICE <https://www.qudt.org/fuseki/qudt/query> {
?s qudt:udunitsCode ?code
}
}
ORDER BY ASC(?l)
LIMIT 1"
)
library("magrittr")
resp <- httr2::request(ireaEndpoint) %>%
httr2::req_url_query(query = ireaQuery) %>%
httr2::req_method("POST") %>%
httr2::req_headers(Accept = "application/sparql-results+json") %>%
httr2::req_user_agent("ReLTER dev") %>%
httr2::req_retry(max_tries = 3, max_seconds = 120) %>%
httr2::req_perform()
httr2::resp_check_status(resp)
httr2::resp_body_json(resp)
#> $head
#> $head$vars
#> $head$vars[[1]]
#> [1] "c"
#>
#> $head$vars[[2]]
#> [1] "l"
#>
#> $head$vars[[3]]
#> [1] "code"
#>
#> $head$vars[[4]]
#> [1] "s"
#>
#>
#>
#> $results
#> $results$bindings
#> $results$bindings[[1]]
#> $results$bindings[[1]]$c
#> $results$bindings[[1]]$c$type
#> [1] "uri"
#>
#> $results$bindings[[1]]$c$value
#> [1] "http://vocab.nerc.ac.uk/collection/P06/current/UPAA/"
#>
#>
#> $results$bindings[[1]]$l
#> $results$bindings[[1]]$l$type
#> [1] "literal"
#>
#> $results$bindings[[1]]$l$value
#> [1] "degC"
#>
#>
#> $results$bindings[[1]]$code
#> $results$bindings[[1]]$code$type
#> [1] "literal"
#>
#> $results$bindings[[1]]$code$value
#> [1] "°C"
#>
#>
#> $results$bindings[[1]]$s
#> $results$bindings[[1]]$s$type
#> [1] "uri"
#>
#> $results$bindings[[1]]$s$value
#> [1] "http://qudt.org/vocab/unit/DEG_C"
qudtUOM <- httr::GET(
url = ireaEndpoint,
query = list(query = ireaQuery)
)
httr::parsed_content(qudtUOM)
#> text_content() deprecated. Use content(x, as = 'parsed')
#> $head
#> $head$vars
#> $head$vars[[1]]
#> [1] "c"
#>
#> $head$vars[[2]]
#> [1] "l"
#>
#> $head$vars[[3]]
#> [1] "code"
#>
#> $head$vars[[4]]
#> [1] "s"
#>
#>
#>
#> $results
#> $results$bindings
#> $results$bindings[[1]]
#> $results$bindings[[1]]$c
#> $results$bindings[[1]]$c$type
#> [1] "uri"
#>
#> $results$bindings[[1]]$c$value
#> [1] "http://vocab.nerc.ac.uk/collection/P06/current/UPAA/"
#>
#>
#> $results$bindings[[1]]$l
#> $results$bindings[[1]]$l$type
#> [1] "literal"
#>
#> $results$bindings[[1]]$l$value
#> [1] "degC"
#>
#>
#> $results$bindings[[1]]$code
#> $results$bindings[[1]]$code$type
#> [1] "literal"
#>
#> $results$bindings[[1]]$code$value
#> [1] "°C"
#>
#>
#> $results$bindings[[1]]$s
#> $results$bindings[[1]]$s$type
#> [1] "uri"
#>
#> $results$bindings[[1]]$s$value
#> [1] "http://qudt.org/vocab/unit/DEG_C" Created on 2022-10-20 with reprex v2.0.2 |
(as a side note you might be interested in https://github.com/lvaudor/glitter since you like SPARQL queries 😉) |
(I had seen this package, but didn't have time to look at it. Better than httr or httr2?) |
sounds very good!! ... and could be possible also obtain a tibble as |
It is not a replacement for them, it's a package (not stable yet) that should help write SPARQL queries (well in your case you already know, but that can also help people who read the code) |
not via httr/httr2, at least I don't think so? which means, you'd need to add parsing code 🤔 |
yes for sure I can parse the code ... just to know |
I have changed the code using httr2 with this commit a72e1ee |
Cool! Is the number of Imports becoming too high? CRAN has a limit, and you'd get a NOTE. Maybe the other httr code can be switched to httr2? |
currently the imported packages are 45. Is it more the limit of CRAN? The httr code has been wrote by my colleague and I would like to wait for changes or suggestions from him. |
oh yeah definitely, it's about 20 if I remember correctly. |
the limit is for packages listed in |
45 are only in the How can I actually know whether a package is imported or suggested? Just from the fact that it is used in a function? In that case, do I have to import it and not suggests it? |
imported = listed in Imports. Now, a package has to be listed in Imports when you call it from your code. I'd suggest reading https://r-pkgs.org/dependencies.html To limit the number of dependencies, you might need to
|
Hi @oggioniale Best regards, |
Hi @micha-silver We have to work in terms of consolidation. Someone have idea about the rarer in the actions (https://github.com/ropensci/ReLTER/actions/runs/3378798361)? |
Hi @oggioniale |
👋 @oggioniale @micha-silver is any help needed here? |
Dear @micha-silver, |
wave @oggioniale @micha-silver Happy New Year! Is any help needed? |
Hi @maelle, Happy New Year to you too. Nothing at the moment. I thinking … soon |
Hi @oggioniale |
@maelle |
Hello @oggioniale @micha-silver, any update? 😸 |
wave @oggioniale @micha-silver |
👋 @oggioniale @micha-silver -- what's the current status? Any help needed? |
Hi @maelle |
yes! if you submit ReLTER to CRAN you'll need to put it in Suggests though, see https://discuss.ropensci.org/t/optional-suggests-dependency-that-has-been-archived-on-cran/3071/6 |
any update? any help needed? 😸 |
The text was updated successfully, but these errors were encountered: