bundestag / gesetze-tools

Scripts to maintain German law git repository
GNU Lesser General Public License v3.0
113 stars 21 forks source link

🚀 [Feature] Add tests to detect and visualize changes in markdown converter #39

Open darkdragon-001 opened 3 years ago

darkdragon-001 commented 3 years ago

:rocket: Feature

We should add tests for xml to markdown conversion. This way, every code changes producing a different conversion needs to modify the tests, too. This way, a reviewer can easily see the visual changes a certain pull request introduces.

darkdragon-001 commented 3 years ago

We should create a list of features together with good example laws.

Suggestion:

ulfgebhardt commented 3 years ago

What you can do is:

  1. Copy 5 good examples of a law
  2. Provide it as input for the 2markdown Converter
  3. save the expected markdown output
  4. On test compare those two
darkdragon-001 commented 3 years ago

@ulfgebhardt That's the idea. I added my suggestions in https://github.com/bundestag/gesetze-tools/issues/39#issuecomment-821851041. Any additional suggestions for those good examples of law?

ulfgebhardt commented 3 years ago

Nah I do not have a big knowledge on the data output of this repo. So having such a system in place with your examples is sufficient to have more examples going. Just remember to make it as generic as you can: Have a folder with rawdata containing law1.rawdata - have a folder with md output data. Expect a file law1.md so its sufficient to just drop those two files in the corresponding folders.