mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 03:55:00 +00:00
* fix artifacts path Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add docling-models utility Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * missing formatting Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * rename utility to docling-tools Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * rename download methods and deprecation warnings Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * propagate artifacts path usage for ocr models Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * move function to utils Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * remove unused file Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * update docs Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * simplify downloading specific model(s) Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> * minor refactor Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> --------- Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> Co-authored-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
run-checks:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install tesseract
|
|
run: sudo apt-get update && sudo apt-get install -y tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra tesseract-ocr-deu tesseract-ocr-spa tesseract-ocr-script-latn libleptonica-dev libtesseract-dev pkg-config
|
|
- name: Set TESSDATA_PREFIX
|
|
run: |
|
|
echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV"
|
|
- uses: ./.github/actions/setup-poetry
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Run styling check
|
|
run: poetry run pre-commit run --all-files
|
|
- name: Install with poetry
|
|
run: poetry install --all-extras
|
|
- name: Testing
|
|
run: |
|
|
poetry run pytest -v tests
|
|
- name: Run examples
|
|
run: |
|
|
for file in docs/examples/*.py; do
|
|
# Skip batch_convert.py
|
|
if [[ "$(basename "$file")" =~ ^(batch_convert|minimal|export_multimodal|custom_convert|develop_picture_enrichment|rapidocr_with_custom_models|offline_convert).py ]]; then
|
|
echo "Skipping $file"
|
|
continue
|
|
fi
|
|
|
|
echo "Running example $file"
|
|
poetry run python "$file" || exit 1
|
|
done
|
|
- name: Build with poetry
|
|
run: poetry build
|