From 5919c57a55548df42cdbf1dd3d7df699e411c973 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Mon, 14 Apr 2025 11:18:54 +0200 Subject: [PATCH] document test generation Signed-off-by: Michele Dolfi --- CONTRIBUTING.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e101a5e7..0fe76dab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,10 +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. -## Unit tests +## 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 regenrated 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.