flowapy 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flowapy-0.4.1 → flowapy-0.4.2}/PKG-INFO +1 -1
- {flowapy-0.4.1 → flowapy-0.4.2}/pyproject.toml +1 -1
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/convert.py +10 -4
- flowapy-0.4.2/src/flowa/pdfium.py +43 -0
- flowapy-0.4.2/tests/test_pdfium.py +47 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/uv.lock +1 -1
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/CODEOWNERS +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/dependabot.yml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/workflows/dependabot-auto-merge.yml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/workflows/lint.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/workflows/release-chat-service.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/workflows/release-flowapy.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.github/workflows/release-react-viewer.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.gitignore +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.markdownlint.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.nvmrc +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.pre-commit-config.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/.prettierignore +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/Dockerfile +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/LICENSE +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/README.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/docs/images/viewer.png +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/.gitkeep +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/.env.example +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/.gitignore +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/README.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/LICENSES.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/aggregation.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1002%2Fhumu.23878.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1016%2Fj.ymgmr.2024.101163.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1038%2Fs41598-022-25914-8.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs12881-019-0878-8.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-01817-1.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-02146-z.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-023-02848-6.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13052-019-0692-0.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2022.1061384.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2023.1261172.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffimmu.2024.1336599.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffped.2021.729824.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffphar.2022.903488.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns11010016.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns6020031.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/query.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/runs/cfc0186a7b7e46eb802a516b86ec207f/progress.jsonl +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/variant_details.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fajmg.a.61481/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/supplements/000_HUMU-40-2146-s001.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/supplements/000_HUMU-40-2146-s001.pdf.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ejmg.2020.103997/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.nmd.2022.02.002/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.tjog.2022.07.008/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/merged.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/supplements/000_mmc1.docx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/merged.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/supplements/000_41598_2022_25914_MOESM1_ESM.docx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1093%2Fhmg%2Fddz218/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1136%2Fjmg-2022-108675/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/merged.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/supplements/000_Table1.docx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/supplements/000_Image_1.PDF +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/supplements/000_Image_1.PDF.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/main.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/main.pdf +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/metadata.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/pdf_index.pkl.zst +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/next-env.d.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/next.config.mjs +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/package.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/postcss.config.cjs +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/public/favicon.svg +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/scripts/chat-service.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/scripts/copy-pdfjs-assets.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/scripts/exercise-llm.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/scripts/start.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/components/literature/LiteratureView.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/components/literature/PaperStatusGroup.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/components/literature/ProgressLog.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/db/migrate.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/db/schema.sql +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/aggregate.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/chatSessionClient.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/citationResolverClient.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/demoConfig.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/paperInvalidation.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/papers.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/progressEvents.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/runs.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/triageBackendClient.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/triageDb.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/lib/variantId.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/_app.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/aggregate/[variantId]/[category].ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/[version].ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/index.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/papers/[doi]/markdown.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/papers/[doi]/pdf.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/papers/[doi]/supplements.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/papers/index.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/runs/[variantId]/[runId]/progress.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/runs/index.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/runs/latest.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/triage/claim.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/triage/comment.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/triage/paper-done.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/triage/snapshot/[variantId]/[category]/[version].ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/index.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/variants/[variantId].tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/viewer/[variantId]/[category].tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/styles/globals.css +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/tailwind.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/LiteratureView.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/ProgressLog.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/aggregate.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/chat-service.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/index-page.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/paper-invalidation.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/papers-pdf-upload.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/papers-route.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/papers-supplements.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/papers.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/progress-route.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/runs-latest-route.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/runs-route.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/runs.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/setup.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/triage.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/test/variantId.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/tsconfig.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/vitest.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/README.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/pyproject.toml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/src/demo_gateway/__init__.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/src/demo_gateway/config.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/src/demo_gateway/main.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/src/demo_gateway/progress.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/src/demo_gateway/runs.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/__init__.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/conftest.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/test_main.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/test_progress.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/test_resolve.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/tests/test_runs.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/examples/demo-gateway/uv.lock +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/package.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/.gitkeep +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/Dockerfile +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/LICENSE +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/README.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/package.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/artifact.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/audit.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/auth/jwt.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/auth/oidc.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/chat.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/cli.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/index.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/instrumentation.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/anthropic.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/bedrock.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/factory.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/google-gla.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/google-vertex.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/interface.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/llm/openai.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/prompts.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/server.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/session.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage/factory.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage/fs.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage/gcs.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage/interface.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage/s3.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/storage-keys.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/telemetry.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/text.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/src/yaml.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/chat.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/generic-prompt.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/llm-factory.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/oidc.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/paper-cache.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/storage-fs.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/storage-gcs.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/storage-s3.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/text.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/test/yaml.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/tsconfig.build.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/tsconfig.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/chat-service/vitest.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/LICENSE +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/README.md +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/package.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/citations/sanitize.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/citations/sanitize.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/citations/types.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/index.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/llm-content/LlmContent.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/llm-content/LlmContent.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/MarkdownHighlightViewer.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/MarkdownHighlightViewer.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/offsets.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/offsets.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/plugins.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/plugins.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/markdown-viewer/types.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/paper-matching/matchFilesToPapers.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/paper-matching/matchFilesToPapers.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/pdf-viewer/types.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/styles.css +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ChatDrawer.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ChatDrawer.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ChatSection.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ClaimList.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/EvidenceViewerShell.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/EvidenceViewerShell.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/FocusCard.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/MessageParts.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/PaperHeader.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/PaperRail.test.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/PaperRail.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ReasoningStep.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/SynthesisPanel.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/ToolStep.tsx +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/backend.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/citation-resolver.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/citation-utils.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/citation-utils.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/claim-refs.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/claim-refs.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/keyboard.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/keyboard.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/store.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/store.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/trace-format.test.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/trace-format.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/src/triage/types.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/tailwind.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/tsconfig.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/tsup.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/packages/react-viewer/vitest.config.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/pnpm-lock.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/pnpm-workspace.yaml +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/aggregation_edit_prompt.txt +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/aggregation_edit_schema.ts +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/aggregation_prompt.txt +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/aggregation_schema.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/extraction_prompt.txt +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/extraction_schema.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/generic/transcription_prompt.txt +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/prompts/package.json +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/__init__.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/aggregate.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/artifact.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/assemble.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/cli.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/clinvar.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/content_validation.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/download.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/extract.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/http_retry.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/models.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/normalize.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/pdf_index_cache.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/progress.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/prompts/__init__.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/py.typed +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/query.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/resolve.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/run.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/schema.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/settings.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/src/flowa/storage.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/__init__.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_assemble.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_content_validation.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_convert.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_download.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_normalize.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_pdf_index_cache.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_progress.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_prompts.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tests/test_resolve.py +0 -0
- {flowapy-0.4.1 → flowapy-0.4.2}/tsconfig.base.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowapy
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Variant literature assessment pipeline with AI extraction
|
|
5
5
|
Project-URL: Homepage, https://github.com/populationgenomics/flowa
|
|
6
6
|
Project-URL: Source, https://github.com/populationgenomics/flowa
|
|
@@ -22,6 +22,7 @@ from flowa.assemble import assemble_paper
|
|
|
22
22
|
from flowa.models import create_model, get_model_settings
|
|
23
23
|
from flowa.pdf_index_cache import build as build_pdf_index_payload
|
|
24
24
|
from flowa.pdf_index_cache import serialize as serialize_pdf_index_payload
|
|
25
|
+
from flowa.pdfium import run_pdfium
|
|
25
26
|
from flowa.prompts import load_text_prompt
|
|
26
27
|
from flowa.settings import ModelConfig, Settings
|
|
27
28
|
from flowa.storage import (
|
|
@@ -174,7 +175,10 @@ async def transcribe(
|
|
|
174
175
|
Splits the PDF into chunks (``page_count`` pages each), converts each chunk
|
|
175
176
|
concurrently, then joins the results with ``<!--page-->`` separators.
|
|
176
177
|
"""
|
|
177
|
-
|
|
178
|
+
# chunks() drives PDFium (page splitting); route it through the single
|
|
179
|
+
# PDFium lane and fully materialise the generator there so no PDFium call
|
|
180
|
+
# leaks onto the event-loop thread during iteration.
|
|
181
|
+
doc_chunks = await run_pdfium(lambda: list(chunks(pdf_bytes, page_count=page_count)))
|
|
178
182
|
|
|
179
183
|
coros = [_generate_markdown(chunk.data, model, prompt) for chunk in doc_chunks]
|
|
180
184
|
chunk_results = list(await asyncio.gather(*coros))
|
|
@@ -295,9 +299,11 @@ async def convert_paper_async(base: str, doi: str, model: ModelConfig, prompt_se
|
|
|
295
299
|
full_pdf_bytes = read_bytes(full_pdf_url(base, doi))
|
|
296
300
|
markdown = read_text(full_md_url(base, doi))
|
|
297
301
|
t0 = time.monotonic()
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
302
|
+
# PdfIndex construction drives PDFium, so it goes on the single PDFium
|
|
303
|
+
# lane; the zstd serialisation is plain CPU work, so it goes back to the
|
|
304
|
+
# general pool and doesn't hold the scarce lane while other papers wait.
|
|
305
|
+
payload = await run_pdfium(lambda: build_pdf_index_payload(full_pdf_bytes, markdown))
|
|
306
|
+
blob = await asyncio.to_thread(lambda: serialize_pdf_index_payload(payload))
|
|
301
307
|
write_bytes(index_url, blob)
|
|
302
308
|
log.info('Wrote pdf_index for DOI %s: %.1f MB in %.1fs', doi, len(blob) / 1e6, time.monotonic() - t0)
|
|
303
309
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Process-wide single-thread lane for all PDFium (pypdfium2) work.
|
|
2
|
+
|
|
3
|
+
PDFium holds global process state and is not thread-safe. anchorite documents
|
|
4
|
+
that `PdfIndex(...)` construction — and, by the same token, `chunks()`'s page
|
|
5
|
+
splitting — must be serialised by the caller (see `anchorite.PdfIndex`:
|
|
6
|
+
"construction is *not* thread-safe (PDFium isn't); serialise concurrent
|
|
7
|
+
`PdfIndex(...)` calls in the caller").
|
|
8
|
+
|
|
9
|
+
flowa drives up to `--convert-concurrency` papers at once, and its two PDFium
|
|
10
|
+
entry points run on different threads: chunk-splitting on the event-loop thread
|
|
11
|
+
and index construction on a worker thread. Left unserialised, those calls hit
|
|
12
|
+
PDFium's shared state from several threads simultaneously and corrupt it — an
|
|
13
|
+
intermittent native crash (SIGTRAP) that spikes on index-dense runs (e.g. a
|
|
14
|
+
backfill where most papers already have transcriptions, so convert is mostly
|
|
15
|
+
the index step). The GIL does not protect them: ctypes releases it across the
|
|
16
|
+
PDFium FFI calls.
|
|
17
|
+
|
|
18
|
+
Routing every PDFium-touching callable through this one-worker executor makes
|
|
19
|
+
them mutually exclusive *by construction* — there is no lock to forget, and
|
|
20
|
+
PDFium is physically isolated from the general thread pool. Throughput is
|
|
21
|
+
unaffected: the serialised PDFium time (chunk-split is tens of ms, index build
|
|
22
|
+
0.2-8s) hides under the much longer, fully-concurrent Bedrock transcription.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
import asyncio
|
|
26
|
+
from collections.abc import Callable
|
|
27
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
28
|
+
|
|
29
|
+
# One worker => every callable submitted here runs to completion before the
|
|
30
|
+
# next starts, so all PDFium work is serialised. Module-level (process-global)
|
|
31
|
+
# because PDFium's state is process-global; the lone idle thread is negligible.
|
|
32
|
+
_PDFIUM_EXECUTOR = ThreadPoolExecutor(max_workers=1, thread_name_prefix='pdfium')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
async def run_pdfium[T](fn: Callable[[], T]) -> T:
|
|
36
|
+
"""Run a synchronous PDFium-touching callable on the single PDFium thread.
|
|
37
|
+
|
|
38
|
+
`fn` must perform *all* of its PDFium work before returning — fully
|
|
39
|
+
materialise any lazy generator (e.g. `list(chunks(...))`), don't hand back
|
|
40
|
+
an iterator that would call into PDFium later on another thread.
|
|
41
|
+
"""
|
|
42
|
+
loop = asyncio.get_running_loop()
|
|
43
|
+
return await loop.run_in_executor(_PDFIUM_EXECUTOR, fn)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Tests for `flowa.pdfium` — the single-thread PDFium lane.
|
|
2
|
+
|
|
3
|
+
PDFium is not thread-safe, so `run_pdfium` must serialise every callable it
|
|
4
|
+
runs onto one dedicated worker thread. These tests assert that property
|
|
5
|
+
directly — concurrently-submitted callables never overlap in time and all run
|
|
6
|
+
on the same thread — which makes the mutual-exclusion guarantee verifiable
|
|
7
|
+
without provoking a native PDFium race.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
import threading
|
|
12
|
+
import time
|
|
13
|
+
from itertools import pairwise
|
|
14
|
+
|
|
15
|
+
from flowa.pdfium import run_pdfium
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _record(hold: float) -> tuple[int, str, float, float]:
|
|
19
|
+
"""Return (thread_id, thread_name, enter, exit) around a short sleep.
|
|
20
|
+
|
|
21
|
+
Runs on the PDFium worker thread; the sleep widens each call's interval so
|
|
22
|
+
a second worker would produce a detectable overlap.
|
|
23
|
+
"""
|
|
24
|
+
enter = time.perf_counter()
|
|
25
|
+
time.sleep(hold)
|
|
26
|
+
return (threading.get_ident(), threading.current_thread().name, enter, time.perf_counter())
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_run_pdfium_serialises_concurrent_calls() -> None:
|
|
30
|
+
hold = 0.02
|
|
31
|
+
n = 8
|
|
32
|
+
|
|
33
|
+
async def drive() -> list[tuple[int, str, float, float]]:
|
|
34
|
+
return list(await asyncio.gather(*(run_pdfium(lambda: _record(hold)) for _ in range(n))))
|
|
35
|
+
|
|
36
|
+
records = asyncio.run(drive())
|
|
37
|
+
assert len(records) == n
|
|
38
|
+
|
|
39
|
+
# Every callable ran on the one PDFium worker thread.
|
|
40
|
+
assert len({tid for tid, _, _, _ in records}) == 1
|
|
41
|
+
assert all(name.startswith('pdfium') for _, name, _, _ in records)
|
|
42
|
+
|
|
43
|
+
# Intervals are pairwise non-overlapping: sorted by entry, each call starts
|
|
44
|
+
# only after the previous one finished — a single worker runs them serially.
|
|
45
|
+
intervals = sorted((enter, exit_) for _, _, enter, exit_ in records)
|
|
46
|
+
for (_, prev_exit), (next_enter, _) in pairwise(intervals):
|
|
47
|
+
assert next_enter >= prev_exit
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/query.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fajmg.a.61481/metadata.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/metadata.json
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/pdf_index.pkl.zst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/merged.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1093%2Fhmg%2Fddz218/metadata.json
RENAMED
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/merged.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.md
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/metadata.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/main.pdf
RENAMED
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/metadata.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/components/literature/PaperStatusGroup.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/aggregate/[variantId]/[category].ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowapy-0.4.1 → flowapy-0.4.2}/examples/demo/src/pages/api/runs/[variantId]/[runId]/progress.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|