document test generation

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi 2025-04-14 11:18:54 +02:00
parent 5a8fa9d1a1
commit 5919c57a55

View File

@ -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. 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. 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 ## Documentation
We use [MkDocs](https://www.mkdocs.org/) to write documentation. We use [MkDocs](https://www.mkdocs.org/) to write documentation.