@@ -7,13 +7,11 @@ run-name: >-
77 inputs.pipeline,
88 inputs.latest_any_branch && 'Latest branch' ||
99 inputs.all_latest && 'Latest default' ||
10- inputs.mupdf_ref == inputs.pymupdf_ref &&
11- inputs.mupdf_ref == inputs.pymupdf_layout_ref &&
12- inputs.mupdf_ref == inputs.pymupdf4llm_ref &&
13- inputs.mupdf_ref ||
10+ inputs.pymupdf_ref == inputs.pymupdf_layout_ref &&
11+ inputs.pymupdf_ref == inputs.pymupdf4llm_ref &&
12+ inputs.pymupdf_ref ||
1413 format(
15- 'M:{0},P:{1},L:{2},4:{3}',
16- inputs.mupdf_ref,
14+ 'P:{0},L:{1},4:{2}',
1715 inputs.pymupdf_ref,
1816 inputs.pymupdf_layout_ref,
1917 inputs.pymupdf4llm_ref
3028 workflow_dispatch :
3129 inputs :
3230 all_latest :
33- description : " Use latest default-branch commits for MuPDF, PyMuPDF, Layout and PyMuPDF4LLM. Their ref inputs are ignored."
31+ description : " Use default branches for PyMuPDF, Layout and PyMuPDF4LLM. MuPDF follows PyMuPDF. Ref inputs are ignored."
3432 required : true
3533 default : false
3634 type : boolean
3735 latest_any_branch :
38- description : " Use the newest branch-head commit in each of the four source repositories . Cannot be combined with latest default-branch commits ."
36+ description : " Use newest branch heads for PyMuPDF, Layout and PyMuPDF4LLM. MuPDF follows PyMuPDF . Cannot combine with latest default branches ."
3937 required : true
4038 default : false
4139 type : boolean
5654 required : true
5755 default : current
5856 type : string
59- mupdf_ref :
60- description : " MuPDF: latest PyPI release or a current branch name. Ignored by either automatic branch mode."
61- required : true
62- default : " latest"
63- type : string
6457 pymupdf_ref :
6558 description : " PyMuPDF: latest PyPI release or a current branch name. Ignored by either automatic branch mode."
6659 required : true
6760 default : " latest"
6861 type : string
6962 pymupdf_layout_ref :
70- description : " PyMuPDF Layout: latest PyPI release or a current branch name. Ignored by either automatic branch mode."
63+ description : " PyMuPDF Layout: current PyMuPDF release tag or a current branch name. Ignored by either automatic branch mode."
7164 required : true
7265 default : " latest"
7366 type : string
7467 pymupdf4llm_ref :
75- description : " PyMuPDF4LLM: latest PyPI release or a current branch name. Ignored by either automatic branch mode."
68+ description : " PyMuPDF4LLM: current PyMuPDF release tag or a current branch name. Ignored by either automatic branch mode."
7669 required : true
7770 default : " latest"
7871 type : string
@@ -137,7 +130,6 @@ jobs:
137130 DATASET_REF : ${{ inputs.dataset_version }}
138131 GROUP_SELECTION : ${{ inputs.group }}
139132 LATEST_ANY_BRANCH : ${{ inputs.latest_any_branch }}
140- MUPDF_REF : ${{ inputs.mupdf_ref }}
141133 PYMUPDF4LLM_REF : ${{ inputs.pymupdf4llm_ref }}
142134 PYMUPDF_LAYOUT_REF : ${{ inputs.pymupdf_layout_ref }}
143135 PYMUPDF_REF : ${{ inputs.pymupdf_ref }}
@@ -249,64 +241,30 @@ jobs:
249241 run : python3 "$WORKFLOW_SCRIPTS/write_run_summary.py"
250242
251243 - name : Install ParseBench dependencies without selected PyMuPDF packages
252- env :
253- MODERN_RAPIDOCR_PIPELINE : pymupdf4llm_html_tables_rapidocr_v3
254244 run : |
255245 export UV_PROJECT_ENVIRONMENT="$GITHUB_WORKSPACE/.venv"
256- sync_args=(--project tools/version_lab --locked)
257- if [[ "$PIPELINE" == "$MODERN_RAPIDOCR_PIPELINE" ]]; then
258- sync_args+=(--extra rapidocr-modern)
259- fi
260- uv sync "${sync_args[@]}" \
246+ uv sync --project tools/version_lab --locked \
261247 --no-install-package pymupdf \
262248 --no-install-package pymupdf-layout \
263249 --no-install-package pymupdf4llm
264- uv pip install --python .venv "pipcl==12" " swig==4.3.1"
250+ uv pip install --python .venv "swig==4.3.1"
265251 .venv/bin/swig -version
266252
267253 - name : Verify RapidOCR native runtime
268- if : ${{ inputs.pipeline != 'pymupdf4llm_html_tables_rapidocr_v3' }}
269- run : .venv/bin/python -c "from rapidocr_onnxruntime import RapidOCR; print(RapidOCR)"
270-
271- - name : Verify modern RapidOCR native runtime
272- if : ${{ inputs.pipeline == 'pymupdf4llm_html_tables_rapidocr_v3' }}
273254 run : >-
274255 .venv/bin/python -c
275256 "from importlib.metadata import version; from rapidocr import RapidOCR; import onnxruntime;
276257 print(f'rapidocr={version(\"rapidocr\")} onnxruntime={onnxruntime.__version__} engine={RapidOCR}')"
277258
278- - name : Build and install selected PyMuPDF
259+ - name : Build and install integrated PyMuPDF
279260 env :
280261 PACKAGE_DIR : ${{ steps.sources.outputs.pymupdf_dir }}
281262 PYMUPDF_SETUP_MUPDF_BUILD : ${{ steps.sources.outputs.mupdf_build }}
282263 PYMUPDF_SETUP_SWIG : ${{ github.workspace }}/.venv/bin/swig
264+ PYMUPDF_SETUP_PATH_LAYOUT : ${{ steps.sources.outputs.pymupdf_layout_dir }}
265+ PYMUPDF_SETUP_PATH_4LLM : ${{ steps.sources.outputs.pymupdf4llm_dir }}
283266 run : uv pip install --python .venv --reinstall --no-deps "$PACKAGE_DIR"
284267
285- - name : Build and install selected PyMuPDF Layout
286- env :
287- PACKAGE_DIR : ${{ steps.sources.outputs.pymupdf_layout_dir }}
288- PYMUPDF_LAYOUT_SETUP_BUILD_PYMUPDF : " 1"
289- PYMUPDF_LAYOUT_SETUP_SWIG : ${{ github.workspace }}/.venv/bin/swig
290- run : uv pip install --python .venv --reinstall --no-build-isolation --no-deps "$PACKAGE_DIR"
291-
292- - name : Build and install selected PyMuPDF4LLM
293- env :
294- PACKAGE_DIR : ${{ steps.sources.outputs.pymupdf4llm_dir }}
295- run : uv pip install --python .venv --reinstall --no-deps "$PACKAGE_DIR"
296-
297- - name : Verify modern RapidOCR and native HTML capabilities
298- if : ${{ inputs.pipeline == 'pymupdf4llm_html_tables_rapidocr_v3' }}
299- run : >-
300- .venv/bin/python -c
301- "import inspect, pymupdf4llm; from pymupdf4llm.helpers.pymupdf_rag import to_markdown as rag_to_markdown;
302- from pymupdf4llm.ocr.detect_rapidocr import detect_rapidocr_backend;
303- backend = detect_rapidocr_backend(); assert backend == 'rapidocr',
304- f'Expected modern rapidocr backend, received {backend!r}';
305- assert 'table_output' in inspect.signature(rag_to_markdown).parameters and
306- 'table_output' in inspect.getsource(pymupdf4llm.to_markdown),
307- 'Selected PyMuPDF4LLM revision lacks native table_output support';
308- print('modern RapidOCR and native HTML table output are available')"
309-
310268 - name : Check source stack compatibility
311269 env :
312270 MUPDF_REF : ${{ steps.refs.outputs.mupdf_ref }}
0 commit comments