docs: Add testing in the docs (#1379)

* add testing to CONTRIBUTING

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* document test generation

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* typo

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

---------

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi 2025-04-14 12:31:48 +02:00 committed by GitHub
parent d9c3999175
commit 01fbfd5652
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.