The GoT challenge

オープン
#254 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
data

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

help wanted :heart: tidy-dev-day :nerd_face:

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.

https://github.com/jennybc/repurrrsive/blob/7ecc79f9a6b1925996ec20d78f0291d91451db31/data-raw/got_pov-chars-wrangle.R#L5-L7

https://github.com/jennybc/repurrrsive/blob/7ecc79f9a6b1925996ec20d78f0291d91451db31/data-raw/got_pov-chars-wrangle.R#L116-L120

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

主要言語
R
スター
227
フォーク
86
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

r-lib/xml2 のほかの issue

r-lib/xml2 の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。