welfare-state-analytics / riksdagen-corpus

Swedish parliamentary proceedings - Riksdagens protokoll 1867-today
Other
26 stars 5 forks source link

All "paragraphs" have an ID : unit test. #363

Closed BobBorges closed 11 months ago

BobBorges commented 11 months ago

Here's a unit test to check all elements with text, (the expected ones u, seg, and note, as well as any w/ an elem.text value) have an ID attribute.

167

I also found that pyriksdagen.utils.elem_iter() doesn't yield seg elements, so included here is an updated doc string and commented lines that look like they should return seg elems. Lets delete them fully when we know it doesn't break anything.

BobBorges commented 11 months ago

The unit test passes locally. Here's evidence that it does what it's supposed to do (duplicated FAIL-- protocols with ID elems removed from the three elems we want to have IDs). forced-failure

ninpnin commented 11 months ago

@BobBorges You probably want to add this to .github/workflows/push.yml too?