From 01fbfd565204258acb2986dcaefad3a328626c66 Mon Sep 17 00:00:00 2001 From: Michele Dolfi <97102151+dolfim-ibm@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:31:48 +0200 Subject: [PATCH] docs: Add testing in the docs (#1379) * add testing to CONTRIBUTING Signed-off-by: Michele Dolfi * document test generation Signed-off-by: Michele Dolfi * typo Signed-off-by: Michele Dolfi --------- Signed-off-by: Michele Dolfi --- CONTRIBUTING.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5146de1..afc10f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,6 +83,23 @@ pre-commit run --all-files Note: Checks like `Black` and `isort` will "fail" if they modify files. This is because `pre-commit` doesn't like to see files modified by its hooks. In these cases, `git add` the modified files and `git commit` again. +## Tests + +When submitting a new feature or fix, please consider adding a short test for it. + +### Reference test documents + +When a change improves the conversion results, multiple reference documents must be regenerated and reviewed. + +The reference data can be regenerated with + +```sh +DOCLING_GEN_TEST_DATA=1 poetry run pytest +``` + +All PRs modifying the reference test data require a double review to guarantee we don't miss edge cases. + + ## Documentation We use [MkDocs](https://www.mkdocs.org/) to write documentation.