The GoT challenge
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
Direzione di ricerca
Start with data-raw/got_pov-chars-wrangle.R, especially the linked lines using as_xml_document(), and reproduce the Root nodes must be of length 1 error with the shown pipeline. Compare the generated result with the existing inst/extdata/got_chars.xml; done means the package data can be regenerated with current xml2 functions or the relevant bug or documentation gap is identified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Transferring from Slack convo.
The GoT data in repurrrsive comes from an API but for teaching purposes, after I wrangle it into the list that ships with the package, I transform it back into JSON and XML files that also ship with the package.
The current script below data-raw/ uses an experimental branch of xml2 I created before xml2 had a nice function for this. I implemented as_xml() and the moral equivalent in xml2 today is as_xml_document(). But I can't just drop it in there.
> got_chars %>%
+ #xml2:::as_xml() %>%
+ as_xml_document() %>%
+ as.character() %>% ## workaround to get explicit UTF-8 encoding
+ read_xml() %>%
+ write_xml(here("inst", "extdata", "got_chars.xml"))
Error: Root nodes must be of length 1
I haven't looked at this lately but I think there's either a buglet in as_xml_document() or a UI/documentation gap. It would be nice if I could reproduce the XML already in repurrrsive with current xml2 functions. This is a little detective adventure for someone.
- Lingua principale
- R
- Stelle
- 227
- Fork
- 86
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di r-lib/xml2
-
Export libxml2_version()Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Optimize xml_path() and xml_find_all() for large node setsForse già presa @astruebi l’ha presa 182 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
Bioconductor/BiocParallel#289 ·
-
automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
waldronlab/BugSigDBcuration#2224 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
merliseclyde/BAS#118 ·