flowapy 0.2.2__tar.gz → 0.4.0__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.2.2 → flowapy-0.4.0}/.github/workflows/lint.yaml +8 -15
- {flowapy-0.2.2 → flowapy-0.4.0}/.github/workflows/release-chat-service.yaml +5 -4
- {flowapy-0.2.2 → flowapy-0.4.0}/.github/workflows/release-react-viewer.yaml +5 -4
- {flowapy-0.2.2 → flowapy-0.4.0}/.gitignore +8 -0
- flowapy-0.4.0/.pre-commit-config.yaml +147 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/PKG-INFO +49 -17
- {flowapy-0.2.2 → flowapy-0.4.0}/README.md +45 -15
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/README.md +11 -9
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/LICENSES.md +12 -2
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/aggregation.json +3087 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1002%2Fhumu.23878.json +83 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1016%2Fj.ymgmr.2024.101163.json +45 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1038%2Fs41598-022-25914-8.json +112 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs12881-019-0878-8.json +64 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-01817-1.json +50 -42
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-02146-z.json +40 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-023-02848-6.json +125 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13052-019-0692-0.json +69 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2022.1061384.json +6 -11
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2023.1261172.json +51 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffimmu.2024.1336599.json +71 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffped.2021.729824.json +45 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffphar.2022.903488.json +69 -0
- flowapy-0.4.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns11010016.json +29 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns6020031.json +3 -8
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/main.md +738 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/main.pdf +0 -0
- flowapy-0.2.2/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.md +93 -75
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/supplements/000_HUMU-40-2146-s001.pdf +0 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/supplements/000_HUMU-40-2146-s001.pdf.md +513 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/merged.md +400 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/supplements/000_mmc1.docx +0 -0
- flowapy-0.2.2/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.md +0 -2
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/merged.md +363 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/supplements/000_41598_2022_25914_MOESM1_ESM.docx +0 -0
- flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.md +0 -2
- flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.md +0 -2
- flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.md +0 -2
- flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.md +0 -2
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/merged.md +427 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/supplements/000_Table1.docx +0 -0
- flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.md +58 -56
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/main.pdf +0 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.md +247 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/supplements/000_Image_1.PDF +0 -0
- flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/supplements/000_Image_1.PDF.md +9 -0
- flowapy-0.2.2/examples/demo/fixtures/papers/10.3390%2Fijns11010016/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.md +0 -2
- flowapy-0.2.2/examples/demo/fixtures/papers/10.3390%2Fijns6020031/markdown.md → flowapy-0.4.0/examples/demo/fixtures/papers/10.3390%2Fijns6020031/main.md +0 -2
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/scripts/start.ts +26 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/components/literature/LiteratureView.tsx +75 -0
- flowapy-0.4.0/examples/demo/src/components/literature/PaperStatusGroup.tsx +215 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/aggregate.ts +23 -11
- flowapy-0.4.0/examples/demo/src/lib/paperInvalidation.ts +96 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/papers.ts +19 -3
- flowapy-0.4.0/examples/demo/src/pages/api/papers/[doi]/markdown.ts +41 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/papers/[doi]/pdf.ts +37 -8
- flowapy-0.4.0/examples/demo/src/pages/api/papers/[doi]/supplements.ts +284 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/viewer/[variantId]/[category].tsx +8 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/LiteratureView.test.tsx +1 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/aggregate.test.ts +10 -5
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/matchFilename.test.ts +1 -0
- flowapy-0.4.0/examples/demo/test/paper-invalidation.test.ts +139 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/papers-pdf-upload.test.ts +92 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/papers-route.test.ts +1 -1
- flowapy-0.4.0/examples/demo/test/papers-supplements.test.ts +395 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/papers.test.ts +34 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/src/demo_gateway/main.py +7 -5
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/tests/test_main.py +15 -6
- flowapy-0.4.0/examples/demo-gateway/tests/test_resolve.py +97 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/uv.lock +304 -5
- {flowapy-0.2.2 → flowapy-0.4.0}/package.json +1 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/package.json +1 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/artifact.ts +27 -6
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/chat.ts +4 -4
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/session.ts +11 -7
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage-keys.ts +5 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/yaml.ts +27 -15
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/chat.test.ts +1 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/paper-cache.test.ts +16 -6
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/yaml.test.ts +33 -20
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/package.json +7 -5
- flowapy-0.4.0/packages/react-viewer/src/citations/sanitize.test.ts +92 -0
- flowapy-0.4.0/packages/react-viewer/src/citations/sanitize.ts +40 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/index.ts +8 -2
- flowapy-0.4.0/packages/react-viewer/src/llm-content/LlmContent.test.tsx +186 -0
- flowapy-0.4.0/packages/react-viewer/src/llm-content/LlmContent.tsx +91 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/MarkdownHighlightViewer.test.tsx +109 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/MarkdownHighlightViewer.tsx +156 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/offsets.test.ts +50 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/offsets.ts +36 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/plugins.test.tsx +211 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/plugins.ts +141 -0
- flowapy-0.4.0/packages/react-viewer/src/markdown-viewer/types.ts +50 -0
- flowapy-0.4.0/packages/react-viewer/src/styles.css +217 -0
- flowapy-0.4.0/packages/react-viewer/src/triage/ChatDrawer.test.tsx +198 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/ChatDrawer.tsx +5 -37
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/EvidenceViewerShell.test.tsx +232 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/EvidenceViewerShell.tsx +147 -73
- flowapy-0.4.0/packages/react-viewer/src/triage/MessageParts.tsx +48 -0
- flowapy-0.4.0/packages/react-viewer/src/triage/ReasoningStep.tsx +64 -0
- flowapy-0.4.0/packages/react-viewer/src/triage/ToolStep.tsx +162 -0
- flowapy-0.4.0/packages/react-viewer/src/triage/citation-resolver.ts +43 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/citation-utils.test.ts +7 -4
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/citation-utils.ts +4 -2
- flowapy-0.4.0/packages/react-viewer/src/triage/trace-format.test.ts +88 -0
- flowapy-0.4.0/packages/react-viewer/src/triage/trace-format.ts +129 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/types.ts +9 -2
- flowapy-0.4.0/packages/react-viewer/tsup.config.ts +18 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/pnpm-lock.yaml +846 -107
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/transcription_prompt.txt +6 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/pyproject.toml +5 -2
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/aggregate.py +21 -11
- flowapy-0.4.0/src/flowa/assemble.py +207 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/cli.py +2 -1
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/content_validation.py +3 -22
- flowapy-0.4.0/src/flowa/convert.py +320 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/download.py +85 -99
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/extract.py +20 -7
- flowapy-0.4.0/src/flowa/resolve.py +255 -0
- flowapy-0.4.0/src/flowa/storage.py +177 -0
- flowapy-0.4.0/tests/test_assemble.py +151 -0
- flowapy-0.4.0/tests/test_convert.py +181 -0
- flowapy-0.4.0/tests/test_download.py +92 -0
- flowapy-0.4.0/tests/test_resolve.py +238 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/uv.lock +314 -5
- flowapy-0.2.2/.env.example +0 -8
- flowapy-0.2.2/.pre-commit-config.yaml +0 -64
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/aggregation.json +0 -3825
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1002%2Fhumu.23878.json +0 -84
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1016%2Fj.ymgmr.2024.101163.json +0 -45
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1038%2Fs41598-022-25914-8.json +0 -105
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs12881-019-0878-8.json +0 -69
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-02146-z.json +0 -40
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-023-02848-6.json +0 -117
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13052-019-0692-0.json +0 -45
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2023.1261172.json +0 -45
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffimmu.2024.1336599.json +0 -53
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffped.2021.729824.json +0 -53
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffphar.2022.903488.json +0 -77
- flowapy-0.2.2/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns11010016.json +0 -29
- flowapy-0.2.2/examples/demo/src/components/literature/PaperStatusGroup.tsx +0 -137
- flowapy-0.2.2/examples/demo-gateway/tests/test_resolve.py +0 -63
- flowapy-0.2.2/packages/react-viewer/src/citations/sanitize.test.ts +0 -221
- flowapy-0.2.2/packages/react-viewer/src/citations/sanitize.ts +0 -112
- flowapy-0.2.2/packages/react-viewer/src/llm-content/LlmContent.test.tsx +0 -81
- flowapy-0.2.2/packages/react-viewer/src/llm-content/LlmContent.tsx +0 -76
- flowapy-0.2.2/packages/react-viewer/src/styles.css +0 -113
- flowapy-0.2.2/packages/react-viewer/src/triage/citation-resolver.ts +0 -30
- flowapy-0.2.2/packages/react-viewer/tsup.config.ts +0 -13
- flowapy-0.2.2/src/flowa/convert.py +0 -192
- flowapy-0.2.2/src/flowa/resolve.py +0 -190
- flowapy-0.2.2/src/flowa/storage.py +0 -106
- flowapy-0.2.2/tests/test_resolve.py +0 -158
- {flowapy-0.2.2 → flowapy-0.4.0}/.github/dependabot.yml +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/.github/workflows/dependabot-auto-merge.yml +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/.github/workflows/release-flowapy.yaml +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/.markdownlint.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/.nvmrc +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/.prettierignore +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/Dockerfile +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/LICENSE +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/docs/images/viewer.png +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/.gitkeep +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/.env.example +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/.gitignore +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/query.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/runs/cfc0186a7b7e46eb802a516b86ec207f/progress.jsonl +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/variant_details.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1002%2Fajmg.a.61481/metadata.json +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/merged.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/pdf_index.pkl.zst +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1016%2Fj.ejmg.2020.103997/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1016%2Fj.nmd.2022.02.002/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1016%2Fj.tjog.2022.07.008/metadata.json +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/pdf_index.pkl.zst +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1093%2Fhmg%2Fddz218/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1136%2Fjmg-2022-108675/metadata.json +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/merged.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/markdown.md → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.md +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3390%2Fijns11010016/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3390%2Fijns11010016/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3390%2Fijns11010016/pdf_index.pkl.zst +0 -0
- /flowapy-0.2.2/examples/demo/fixtures/papers/10.3390%2Fijns6020031/source.pdf → /flowapy-0.4.0/examples/demo/fixtures/papers/10.3390%2Fijns6020031/main.pdf +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/metadata.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/fixtures/papers/10.3390%2Fijns6020031/pdf_index.pkl.zst +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/next-env.d.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/next.config.mjs +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/package.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/postcss.config.cjs +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/public/favicon.svg +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/scripts/chat-service.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/scripts/copy-pdfjs-assets.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/scripts/exercise-llm.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/components/literature/ProgressLog.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/components/literature/matchFilename.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/db/migrate.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/db/schema.sql +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/chatSessionClient.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/citationResolverClient.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/demoConfig.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/progressEvents.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/runs.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/triageBackendClient.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/triageDb.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/lib/variantId.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/_app.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/aggregate/[variantId]/[category].ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/[version].ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/index.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/papers/index.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/runs/[variantId]/[runId]/progress.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/runs/index.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/runs/latest.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/triage/claim.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/triage/comment.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/triage/paper-done.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/api/triage/snapshot/[variantId]/[category]/[version].ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/index.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/pages/variants/[variantId].tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/src/styles/globals.css +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/tailwind.config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/ProgressLog.test.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/chat-service.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/index-page.test.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/progress-route.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/runs-latest-route.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/runs-route.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/runs.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/setup.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/triage.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/test/variantId.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/tsconfig.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo/vitest.config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/README.md +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/pyproject.toml +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/src/demo_gateway/__init__.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/src/demo_gateway/config.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/src/demo_gateway/progress.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/src/demo_gateway/runs.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/tests/__init__.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/tests/conftest.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/tests/test_progress.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/examples/demo-gateway/tests/test_runs.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/.gitkeep +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/Dockerfile +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/LICENSE +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/README.md +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/audit.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/auth/jwt.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/auth/oidc.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/cli.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/index.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/instrumentation.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/anthropic.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/bedrock.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/factory.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/google-gla.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/google-vertex.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/interface.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/llm/openai.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/prompts.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/server.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage/factory.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage/fs.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage/gcs.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage/interface.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/storage/s3.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/telemetry.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/src/text.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/generic-prompt.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/llm-factory.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/oidc.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/storage-fs.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/storage-gcs.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/storage-s3.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/test/text.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/tsconfig.build.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/tsconfig.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/chat-service/vitest.config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/LICENSE +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/README.md +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/citations/types.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.test.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/pdf-viewer/types.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/ChatSection.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/ClaimList.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/FocusCard.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/PaperHeader.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/PaperRail.test.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/PaperRail.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/SynthesisPanel.tsx +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/backend.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/claim-refs.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/claim-refs.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/keyboard.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/keyboard.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/store.test.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/src/triage/store.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/tailwind.config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/tsconfig.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/packages/react-viewer/vitest.config.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/pnpm-workspace.yaml +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/aggregation_edit_prompt.txt +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/aggregation_edit_schema.ts +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/aggregation_prompt.txt +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/aggregation_schema.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/extraction_prompt.txt +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/generic/extraction_schema.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/prompts/package.json +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/__init__.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/artifact.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/clinvar.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/http_retry.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/models.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/normalize.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/pdf_index_cache.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/progress.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/prompts/__init__.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/py.typed +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/query.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/run.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/schema.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/src/flowa/settings.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tests/__init__.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tests/test_content_validation.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tests/test_pdf_index_cache.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tests/test_progress.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tests/test_prompts.py +0 -0
- {flowapy-0.2.2 → flowapy-0.4.0}/tsconfig.base.json +0 -0
|
@@ -24,26 +24,19 @@ jobs:
|
|
|
24
24
|
|
|
25
25
|
- run: uv sync --all-extras --group dev --frozen
|
|
26
26
|
|
|
27
|
+
# demo-gateway is a separate uv project; sync its venv so the
|
|
28
|
+
# `pytest-demo-gateway` pre-commit hook (which runs --no-sync) works.
|
|
29
|
+
- run: uv sync --frozen --group dev
|
|
30
|
+
working-directory: examples/demo-gateway
|
|
31
|
+
|
|
27
32
|
- run: pnpm install --frozen-lockfile
|
|
28
33
|
|
|
29
|
-
#
|
|
30
|
-
# .pre-commit-config.yaml so
|
|
34
|
+
# Every check — ruff, mypy, prettier, tsc, vitest, pytest — lives in
|
|
35
|
+
# .pre-commit-config.yaml, so this single `pre-commit run --all-files`
|
|
36
|
+
# is the whole gate and local pre-commit and CI stay in lockstep.
|
|
31
37
|
- uses: actions/cache@v5
|
|
32
38
|
with:
|
|
33
39
|
path: ~/.cache/pre-commit
|
|
34
40
|
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
35
41
|
|
|
36
42
|
- run: uv run pre-commit run --all-files --show-diff-on-failure
|
|
37
|
-
|
|
38
|
-
test:
|
|
39
|
-
runs-on: ubuntu-latest
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/checkout@v6
|
|
42
|
-
|
|
43
|
-
- uses: astral-sh/setup-uv@v7
|
|
44
|
-
with:
|
|
45
|
-
python-version: "3.13"
|
|
46
|
-
|
|
47
|
-
- run: uv sync --all-extras --group dev --frozen
|
|
48
|
-
|
|
49
|
-
- run: uv run pytest tests/
|
|
@@ -42,13 +42,14 @@ jobs:
|
|
|
42
42
|
|
|
43
43
|
- uses: actions/setup-node@v5
|
|
44
44
|
with:
|
|
45
|
-
node-version:
|
|
45
|
+
node-version-file: .nvmrc
|
|
46
46
|
registry-url: "https://registry.npmjs.org"
|
|
47
47
|
cache: "pnpm"
|
|
48
48
|
|
|
49
|
-
# Trusted publishing requires npm >= 11.5.1
|
|
50
|
-
# Install to a fresh prefix to
|
|
51
|
-
# its own node_modules
|
|
49
|
+
# Trusted publishing requires npm >= 11.5.1, newer than the npm bundled
|
|
50
|
+
# with Node, so pin a known-good version. Install to a fresh prefix to
|
|
51
|
+
# sidestep `npm install -g npm@X` clobbering its own node_modules
|
|
52
|
+
# mid-upgrade.
|
|
52
53
|
- name: Pin npm
|
|
53
54
|
run: |
|
|
54
55
|
mkdir -p "$RUNNER_TEMP/npm-pin"
|
|
@@ -39,13 +39,14 @@ jobs:
|
|
|
39
39
|
|
|
40
40
|
- uses: actions/setup-node@v5
|
|
41
41
|
with:
|
|
42
|
-
node-version:
|
|
42
|
+
node-version-file: .nvmrc
|
|
43
43
|
registry-url: "https://registry.npmjs.org"
|
|
44
44
|
cache: "pnpm"
|
|
45
45
|
|
|
46
|
-
# Trusted publishing requires npm >= 11.5.1
|
|
47
|
-
# Install to a fresh prefix to
|
|
48
|
-
# its own node_modules
|
|
46
|
+
# Trusted publishing requires npm >= 11.5.1, newer than the npm bundled
|
|
47
|
+
# with Node, so pin a known-good version. Install to a fresh prefix to
|
|
48
|
+
# sidestep `npm install -g npm@X` clobbering its own node_modules
|
|
49
|
+
# mid-upgrade.
|
|
49
50
|
- name: Pin npm
|
|
50
51
|
run: |
|
|
51
52
|
mkdir -p "$RUNNER_TEMP/npm-pin"
|
|
@@ -31,6 +31,9 @@ eggs/
|
|
|
31
31
|
# unrelated `lib/` directories nested under packages or examples.
|
|
32
32
|
/lib/
|
|
33
33
|
/lib64/
|
|
34
|
+
# Local dev/spike scripts live in the root /scripts/ dir. Anchored to the
|
|
35
|
+
# repo root so it doesn't shadow the tracked examples/demo/scripts/ entry.
|
|
36
|
+
/scripts/
|
|
34
37
|
parts/
|
|
35
38
|
sdist/
|
|
36
39
|
var/
|
|
@@ -159,3 +162,8 @@ node_modules/
|
|
|
159
162
|
demo-data/
|
|
160
163
|
*.tsbuildinfo
|
|
161
164
|
pnpm-debug.log*
|
|
165
|
+
|
|
166
|
+
# Raw LLM-call traces emitted by the demo pipeline (convert/extract/aggregate).
|
|
167
|
+
# Debug artifacts only — never consumed by the running demo; just the parsed
|
|
168
|
+
# .json outputs are tracked. Keep them out of git and out of `git status`.
|
|
169
|
+
examples/demo/fixtures/**/*_raw.json
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Single source of truth for pre-commit + CI lint. .github/workflows/lint.yaml
|
|
2
|
+
# invokes `uv run pre-commit run --all-files`, so adding a check here
|
|
3
|
+
# automatically runs it locally and in CI.
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v6.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
exclude: '\.*conda/.*'
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
# Demo fixtures are generated artifacts (markdown.md, extractions,
|
|
12
|
+
# aggregation.json) — normalising them is noise, not authored style.
|
|
13
|
+
exclude: ^examples/demo/fixtures/
|
|
14
|
+
- id: trailing-whitespace
|
|
15
|
+
# …and stripping trailing whitespace inside a generated markdown.md
|
|
16
|
+
# would shift the code-point offsets its markdown_anchor citations
|
|
17
|
+
# index into, misaligning highlights. Fixtures stay out (cf. the
|
|
18
|
+
# markdownlint exclude below).
|
|
19
|
+
exclude: '\.txt$|\.tsv$|^examples/demo/fixtures/'
|
|
20
|
+
- id: check-case-conflict
|
|
21
|
+
- id: check-merge-conflict
|
|
22
|
+
- id: detect-private-key
|
|
23
|
+
- id: debug-statements
|
|
24
|
+
- id: check-added-large-files
|
|
25
|
+
# Demo fixture PDFs (real published CC-BY papers) run up to ~5MB
|
|
26
|
+
# for figure-heavy articles (Sci Rep, Front Cardiovasc Med); set a
|
|
27
|
+
# 6MB ceiling that fits the current corpus with some headroom.
|
|
28
|
+
args: ["--maxkb=6144"]
|
|
29
|
+
|
|
30
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
31
|
+
rev: v0.38.0
|
|
32
|
+
hooks:
|
|
33
|
+
- id: markdownlint
|
|
34
|
+
# Demo fixture markdown is extracted by the pipeline from real PDFs;
|
|
35
|
+
# it isn't authored content the project owns the style of.
|
|
36
|
+
exclude: ^examples/demo/fixtures/
|
|
37
|
+
|
|
38
|
+
- repo: https://github.com/populationgenomics/pre-commits
|
|
39
|
+
rev: "v0.1.3"
|
|
40
|
+
hooks:
|
|
41
|
+
- id: cpg-id-checker
|
|
42
|
+
|
|
43
|
+
# Use the project's pinned tools via uv / pnpm so pre-commit and CI checks
|
|
44
|
+
# match what runs locally — no separate version pinning here.
|
|
45
|
+
- repo: local
|
|
46
|
+
hooks:
|
|
47
|
+
- id: ruff-format
|
|
48
|
+
name: ruff format
|
|
49
|
+
entry: uv run --no-sync ruff format --check src/ tests/
|
|
50
|
+
language: system
|
|
51
|
+
pass_filenames: false
|
|
52
|
+
always_run: true
|
|
53
|
+
- id: ruff-check
|
|
54
|
+
name: ruff check
|
|
55
|
+
entry: uv run --no-sync ruff check src/ tests/
|
|
56
|
+
language: system
|
|
57
|
+
pass_filenames: false
|
|
58
|
+
always_run: true
|
|
59
|
+
- id: mypy
|
|
60
|
+
name: mypy
|
|
61
|
+
entry: uv run --no-sync mypy src/ tests/
|
|
62
|
+
language: system
|
|
63
|
+
pass_filenames: false
|
|
64
|
+
always_run: true
|
|
65
|
+
# markdownlint owns markdown above, so prettier stays out of .md.
|
|
66
|
+
- id: prettier
|
|
67
|
+
name: prettier --check
|
|
68
|
+
entry: pnpm exec prettier --check
|
|
69
|
+
language: system
|
|
70
|
+
files: \.(ts|tsx|js|jsx|mjs|cjs|json|yaml|yml)$
|
|
71
|
+
# pnpm-lock + generated demo fixtures (JSON whose format the pipeline
|
|
72
|
+
# owns via json.dump, not prettier).
|
|
73
|
+
exclude: '^pnpm-lock\.yaml$|^examples/demo/fixtures/'
|
|
74
|
+
|
|
75
|
+
# Type + test gates. tsc and vitest run nowhere on push/PR otherwise
|
|
76
|
+
# (the TS packages are only typechecked/tested in their release
|
|
77
|
+
# workflows), which let the demo's CategorySuggestion consumer rot
|
|
78
|
+
# silently through the schema rename. These are whole-project checks,
|
|
79
|
+
# so `pass_filenames: false`; the `files:` regex only decides *whether*
|
|
80
|
+
# to fire (any staged TS change → run the full workspace gate), so a
|
|
81
|
+
# docs-only commit skips them. `--all-files` in CI fires every hook.
|
|
82
|
+
#
|
|
83
|
+
# ts-build MUST come first: @flowajs/chat-service + @flowajs/react-viewer
|
|
84
|
+
# are consumed via their exports maps (→ dist/), which is gitignored and
|
|
85
|
+
# not built on `pnpm install` (ignore-scripts, no prepare script). Without
|
|
86
|
+
# this, the workspace typecheck/test can't resolve `@flowajs/*` from
|
|
87
|
+
# examples/demo + prompts/ on a fresh checkout (e.g. CI). pre-commit runs
|
|
88
|
+
# hooks in listed order, so this builds dist/ before tsc/vitest see it.
|
|
89
|
+
- id: ts-build
|
|
90
|
+
name: build workspace packages
|
|
91
|
+
entry: pnpm --filter @flowajs/chat-service --filter @flowajs/react-viewer build
|
|
92
|
+
language: system
|
|
93
|
+
pass_filenames: false
|
|
94
|
+
files: \.(ts|tsx)$
|
|
95
|
+
- id: ts-typecheck
|
|
96
|
+
name: tsc --noEmit (workspace)
|
|
97
|
+
entry: pnpm -r typecheck
|
|
98
|
+
language: system
|
|
99
|
+
pass_filenames: false
|
|
100
|
+
files: \.(ts|tsx)$
|
|
101
|
+
- id: ts-test
|
|
102
|
+
name: vitest (workspace)
|
|
103
|
+
entry: pnpm -r test
|
|
104
|
+
language: system
|
|
105
|
+
pass_filenames: false
|
|
106
|
+
files: \.(ts|tsx)$
|
|
107
|
+
- id: pytest
|
|
108
|
+
name: pytest (flowa)
|
|
109
|
+
entry: uv run --no-sync pytest tests/
|
|
110
|
+
language: system
|
|
111
|
+
pass_filenames: false
|
|
112
|
+
files: ^(src/flowa/|tests/).*\.py$
|
|
113
|
+
# demo-gateway is its own uv project (separate venv + ruff/mypy config),
|
|
114
|
+
# so these cd in and run that project's pinned tools, mirroring the pytest
|
|
115
|
+
# hook below.
|
|
116
|
+
#
|
|
117
|
+
# demo-gateway installs flowapy as an editable path dep (`path = "../.."`),
|
|
118
|
+
# so a change to `src/flowa/` can break its mypy/pytest gates even when no
|
|
119
|
+
# demo-gateway file is touched. The type+behaviour gates therefore also
|
|
120
|
+
# fire on `src/flowa/**.py`; the formatters don't, since ruff only inspects
|
|
121
|
+
# demo-gateway's own files. (Without this, a flowapy-only commit skips these
|
|
122
|
+
# locally — pre-commit runs hooks against staged files — and the break only
|
|
123
|
+
# surfaces in CI's `--all-files` run.)
|
|
124
|
+
- id: ruff-format-demo-gateway
|
|
125
|
+
name: ruff format (demo-gateway)
|
|
126
|
+
entry: bash -c 'cd examples/demo-gateway && uv run --no-sync ruff format --check src/ tests/'
|
|
127
|
+
language: system
|
|
128
|
+
pass_filenames: false
|
|
129
|
+
files: ^examples/demo-gateway/.*\.py$
|
|
130
|
+
- id: ruff-check-demo-gateway
|
|
131
|
+
name: ruff check (demo-gateway)
|
|
132
|
+
entry: bash -c 'cd examples/demo-gateway && uv run --no-sync ruff check src/ tests/'
|
|
133
|
+
language: system
|
|
134
|
+
pass_filenames: false
|
|
135
|
+
files: ^examples/demo-gateway/.*\.py$
|
|
136
|
+
- id: mypy-demo-gateway
|
|
137
|
+
name: mypy (demo-gateway)
|
|
138
|
+
entry: bash -c 'cd examples/demo-gateway && uv run --no-sync mypy src/ tests/'
|
|
139
|
+
language: system
|
|
140
|
+
pass_filenames: false
|
|
141
|
+
files: ^(examples/demo-gateway/.*|src/flowa/.*)\.py$
|
|
142
|
+
- id: pytest-demo-gateway
|
|
143
|
+
name: pytest (demo-gateway)
|
|
144
|
+
entry: bash -c 'cd examples/demo-gateway && uv run --no-sync pytest tests/'
|
|
145
|
+
language: system
|
|
146
|
+
pass_filenames: false
|
|
147
|
+
files: ^(examples/demo-gateway/.*|src/flowa/.*)\.py$
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowapy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
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
|
|
@@ -34,7 +34,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
34
34
|
Classifier: Programming Language :: Python :: 3.13
|
|
35
35
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
36
36
|
Requires-Python: ==3.13.*
|
|
37
|
-
Requires-Dist: anchorite>=0.
|
|
37
|
+
Requires-Dist: anchorite>=0.5.1
|
|
38
38
|
Requires-Dist: boto3
|
|
39
39
|
Requires-Dist: defusedxml
|
|
40
40
|
Requires-Dist: fsspec
|
|
@@ -42,9 +42,11 @@ Requires-Dist: gcsfs
|
|
|
42
42
|
Requires-Dist: httpx
|
|
43
43
|
Requires-Dist: jinja2
|
|
44
44
|
Requires-Dist: logfire
|
|
45
|
+
Requires-Dist: markitdown[docx,xls,xlsx]>=0.1.5
|
|
45
46
|
Requires-Dist: pydantic-settings
|
|
46
47
|
Requires-Dist: pypdf
|
|
47
48
|
Requires-Dist: s3fs
|
|
49
|
+
Requires-Dist: socksio>=1.0.0
|
|
48
50
|
Requires-Dist: tenacity
|
|
49
51
|
Requires-Dist: typer
|
|
50
52
|
Requires-Dist: zstandard
|
|
@@ -66,6 +68,23 @@ Variant literature assessment pipeline with AI extraction.
|
|
|
66
68
|
|
|
67
69
|
*Each citation in the aggregated assessment links back to the exact highlighted quote in the source paper's PDF.*
|
|
68
70
|
|
|
71
|
+
## Quickstart
|
|
72
|
+
|
|
73
|
+
Run the whole stack locally against a captured example variant. The demo ships pre-seeded with a real assessment, so the evidence viewer is populated the moment it boots — you don't have to run the pipeline yourself to explore it.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/populationgenomics/flowa.git
|
|
77
|
+
cd flowa
|
|
78
|
+
pnpm install # repo root — this is a pnpm workspace
|
|
79
|
+
cp examples/demo/.env.example examples/demo/.env # the demo's only config file
|
|
80
|
+
# Edit examples/demo/.env: uncomment exactly one provider block and fill in your key.
|
|
81
|
+
pnpm demo
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then open <http://localhost:7700>. `pnpm demo` builds the workspace packages and boots three services — Next.js (UI + triage API), chat-service, and a Python pipeline gateway.
|
|
85
|
+
|
|
86
|
+
**Prerequisites:** [Node 24+](https://nodejs.org) (the demo uses the built-in `node:sqlite`) and [uv](https://docs.astral.sh/uv/getting-started/installation/) on your `PATH`. For the full walkthrough, demo simplifications, and how to run a live pipeline, see [`examples/demo/README.md`](examples/demo/README.md).
|
|
87
|
+
|
|
69
88
|
## Architecture
|
|
70
89
|
|
|
71
90
|
Flowa is a single async pipeline that processes genetic variant literature:
|
|
@@ -84,15 +103,15 @@ Papers are processed in parallel. LLM concurrency is controlled via `--llm-concu
|
|
|
84
103
|
|
|
85
104
|
## Installation
|
|
86
105
|
|
|
87
|
-
|
|
106
|
+
The [Quickstart](#quickstart) above needs no separate install. To use the pipeline as a library or CLI in your own project, install `flowapy` from PyPI, opting into the provider extras you need (one or more of `anthropic`, `bedrock`, `google`, `openai`):
|
|
88
107
|
|
|
89
108
|
```bash
|
|
90
|
-
pip install 'flowapy[bedrock]
|
|
109
|
+
pip install 'flowapy[bedrock]'
|
|
91
110
|
# or
|
|
92
|
-
uv pip install 'flowapy[bedrock,anthropic]
|
|
111
|
+
uv pip install 'flowapy[bedrock,anthropic]'
|
|
93
112
|
```
|
|
94
113
|
|
|
95
|
-
The `flowa` CLI is exposed as a console script
|
|
114
|
+
The PyPI distribution is named `flowapy` (the `flowa` name was already taken), but the import, module, and CLI are all `flowa`. The CLI is exposed as a console script — see [Configuration](#configuration) for credentials and storage setup.
|
|
96
115
|
|
|
97
116
|
## Usage
|
|
98
117
|
|
|
@@ -112,11 +131,22 @@ flowa aggregate --variant-id VAR123
|
|
|
112
131
|
|
|
113
132
|
### Environment Variables
|
|
114
133
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
| `
|
|
134
|
+
The model settings are nested config objects: set their sub-fields with the `__` delimiter — `__NAME` selects the model. These three are required:
|
|
135
|
+
|
|
136
|
+
| Variable | Description | Example |
|
|
137
|
+
| ------------------------------ | ---------------------------------------------------------------------------- | -------------------------------------------- |
|
|
138
|
+
| `FLOWA_STORAGE_BASE` | Storage path for PDFs, extractions, results | `s3://bucket`, `gs://bucket`, `file:///path` |
|
|
139
|
+
| `FLOWA_CONVERT_MODEL__NAME` | LLM for PDF→Markdown conversion (anchorite), in `<provider>:<model>` form | `bedrock:au.anthropic.claude-sonnet-4-6` |
|
|
140
|
+
| `FLOWA_EXTRACTION_MODEL__NAME` | LLM for extraction and aggregation | `bedrock:au.anthropic.claude-opus-4-6` |
|
|
141
|
+
|
|
142
|
+
Optional:
|
|
143
|
+
|
|
144
|
+
| Variable | Description |
|
|
145
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
146
|
+
| `FLOWA_CONVERT_MODEL__BEDROCK_INFERENCE_PROFILE` | Bedrock application inference profile ARN for cost attribution. When set, `__NAME` must point at the underlying foundation model. |
|
|
147
|
+
| `FLOWA_EXTRACTION_MODEL__BEDROCK_INFERENCE_PROFILE` | Same, for the extraction/aggregation model. |
|
|
148
|
+
| `MASTERMIND_API_TOKEN` | Required when querying with `--source mastermind`; use `--source litvar` (free, no token) otherwise. |
|
|
149
|
+
| `NCBI_API_KEY` | Optional NCBI key for higher PubMed rate limits. |
|
|
120
150
|
|
|
121
151
|
### LLM Providers
|
|
122
152
|
|
|
@@ -258,10 +288,12 @@ The tag-driven workflow (`.github/workflows/release-flowapy.yaml`) builds the pa
|
|
|
258
288
|
|
|
259
289
|
### Local Development
|
|
260
290
|
|
|
291
|
+
Run the pipeline directly from a checkout (the [Quickstart](#quickstart) demo wraps this with a UI):
|
|
292
|
+
|
|
261
293
|
```bash
|
|
262
294
|
export FLOWA_STORAGE_BASE=file:///tmp/flowa
|
|
263
|
-
export
|
|
264
|
-
export
|
|
295
|
+
export FLOWA_CONVERT_MODEL__NAME=bedrock:au.anthropic.claude-sonnet-4-6
|
|
296
|
+
export FLOWA_EXTRACTION_MODEL__NAME=bedrock:au.anthropic.claude-opus-4-6
|
|
265
297
|
uv run flowa run --variant-id test --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" --source litvar
|
|
266
298
|
```
|
|
267
299
|
|
|
@@ -271,8 +303,8 @@ uv run flowa run --variant-id test --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" -
|
|
|
271
303
|
docker build --build-arg LLM_EXTRA=bedrock -t flowa .
|
|
272
304
|
docker run \
|
|
273
305
|
-e FLOWA_STORAGE_BASE=s3://bucket \
|
|
274
|
-
-e
|
|
275
|
-
-e
|
|
306
|
+
-e FLOWA_CONVERT_MODEL__NAME=bedrock:au.anthropic.claude-sonnet-4-6 \
|
|
307
|
+
-e FLOWA_EXTRACTION_MODEL__NAME=bedrock:au.anthropic.claude-opus-4-6 \
|
|
276
308
|
-e AWS_REGION=ap-southeast-2 \
|
|
277
309
|
flowa run --variant-id VAR123 --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" --source litvar
|
|
278
310
|
```
|
|
@@ -293,8 +325,8 @@ aws batch register-job-definition \
|
|
|
293
325
|
],
|
|
294
326
|
"environment": [
|
|
295
327
|
{"name": "FLOWA_STORAGE_BASE", "value": "s3://flowa-data"},
|
|
296
|
-
{"name": "
|
|
297
|
-
{"name": "
|
|
328
|
+
{"name": "FLOWA_CONVERT_MODEL__NAME", "value": "bedrock:au.anthropic.claude-sonnet-4-6"},
|
|
329
|
+
{"name": "FLOWA_EXTRACTION_MODEL__NAME", "value": "bedrock:au.anthropic.claude-opus-4-6"}
|
|
298
330
|
]
|
|
299
331
|
}' \
|
|
300
332
|
--retry-strategy '{"attempts": 2}' \
|
|
@@ -6,6 +6,23 @@ Variant literature assessment pipeline with AI extraction.
|
|
|
6
6
|
|
|
7
7
|
*Each citation in the aggregated assessment links back to the exact highlighted quote in the source paper's PDF.*
|
|
8
8
|
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
Run the whole stack locally against a captured example variant. The demo ships pre-seeded with a real assessment, so the evidence viewer is populated the moment it boots — you don't have to run the pipeline yourself to explore it.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/populationgenomics/flowa.git
|
|
15
|
+
cd flowa
|
|
16
|
+
pnpm install # repo root — this is a pnpm workspace
|
|
17
|
+
cp examples/demo/.env.example examples/demo/.env # the demo's only config file
|
|
18
|
+
# Edit examples/demo/.env: uncomment exactly one provider block and fill in your key.
|
|
19
|
+
pnpm demo
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then open <http://localhost:7700>. `pnpm demo` builds the workspace packages and boots three services — Next.js (UI + triage API), chat-service, and a Python pipeline gateway.
|
|
23
|
+
|
|
24
|
+
**Prerequisites:** [Node 24+](https://nodejs.org) (the demo uses the built-in `node:sqlite`) and [uv](https://docs.astral.sh/uv/getting-started/installation/) on your `PATH`. For the full walkthrough, demo simplifications, and how to run a live pipeline, see [`examples/demo/README.md`](examples/demo/README.md).
|
|
25
|
+
|
|
9
26
|
## Architecture
|
|
10
27
|
|
|
11
28
|
Flowa is a single async pipeline that processes genetic variant literature:
|
|
@@ -24,15 +41,15 @@ Papers are processed in parallel. LLM concurrency is controlled via `--llm-concu
|
|
|
24
41
|
|
|
25
42
|
## Installation
|
|
26
43
|
|
|
27
|
-
|
|
44
|
+
The [Quickstart](#quickstart) above needs no separate install. To use the pipeline as a library or CLI in your own project, install `flowapy` from PyPI, opting into the provider extras you need (one or more of `anthropic`, `bedrock`, `google`, `openai`):
|
|
28
45
|
|
|
29
46
|
```bash
|
|
30
|
-
pip install 'flowapy[bedrock]
|
|
47
|
+
pip install 'flowapy[bedrock]'
|
|
31
48
|
# or
|
|
32
|
-
uv pip install 'flowapy[bedrock,anthropic]
|
|
49
|
+
uv pip install 'flowapy[bedrock,anthropic]'
|
|
33
50
|
```
|
|
34
51
|
|
|
35
|
-
The `flowa` CLI is exposed as a console script
|
|
52
|
+
The PyPI distribution is named `flowapy` (the `flowa` name was already taken), but the import, module, and CLI are all `flowa`. The CLI is exposed as a console script — see [Configuration](#configuration) for credentials and storage setup.
|
|
36
53
|
|
|
37
54
|
## Usage
|
|
38
55
|
|
|
@@ -52,11 +69,22 @@ flowa aggregate --variant-id VAR123
|
|
|
52
69
|
|
|
53
70
|
### Environment Variables
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
| `
|
|
72
|
+
The model settings are nested config objects: set their sub-fields with the `__` delimiter — `__NAME` selects the model. These three are required:
|
|
73
|
+
|
|
74
|
+
| Variable | Description | Example |
|
|
75
|
+
| ------------------------------ | ---------------------------------------------------------------------------- | -------------------------------------------- |
|
|
76
|
+
| `FLOWA_STORAGE_BASE` | Storage path for PDFs, extractions, results | `s3://bucket`, `gs://bucket`, `file:///path` |
|
|
77
|
+
| `FLOWA_CONVERT_MODEL__NAME` | LLM for PDF→Markdown conversion (anchorite), in `<provider>:<model>` form | `bedrock:au.anthropic.claude-sonnet-4-6` |
|
|
78
|
+
| `FLOWA_EXTRACTION_MODEL__NAME` | LLM for extraction and aggregation | `bedrock:au.anthropic.claude-opus-4-6` |
|
|
79
|
+
|
|
80
|
+
Optional:
|
|
81
|
+
|
|
82
|
+
| Variable | Description |
|
|
83
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
84
|
+
| `FLOWA_CONVERT_MODEL__BEDROCK_INFERENCE_PROFILE` | Bedrock application inference profile ARN for cost attribution. When set, `__NAME` must point at the underlying foundation model. |
|
|
85
|
+
| `FLOWA_EXTRACTION_MODEL__BEDROCK_INFERENCE_PROFILE` | Same, for the extraction/aggregation model. |
|
|
86
|
+
| `MASTERMIND_API_TOKEN` | Required when querying with `--source mastermind`; use `--source litvar` (free, no token) otherwise. |
|
|
87
|
+
| `NCBI_API_KEY` | Optional NCBI key for higher PubMed rate limits. |
|
|
60
88
|
|
|
61
89
|
### LLM Providers
|
|
62
90
|
|
|
@@ -198,10 +226,12 @@ The tag-driven workflow (`.github/workflows/release-flowapy.yaml`) builds the pa
|
|
|
198
226
|
|
|
199
227
|
### Local Development
|
|
200
228
|
|
|
229
|
+
Run the pipeline directly from a checkout (the [Quickstart](#quickstart) demo wraps this with a UI):
|
|
230
|
+
|
|
201
231
|
```bash
|
|
202
232
|
export FLOWA_STORAGE_BASE=file:///tmp/flowa
|
|
203
|
-
export
|
|
204
|
-
export
|
|
233
|
+
export FLOWA_CONVERT_MODEL__NAME=bedrock:au.anthropic.claude-sonnet-4-6
|
|
234
|
+
export FLOWA_EXTRACTION_MODEL__NAME=bedrock:au.anthropic.claude-opus-4-6
|
|
205
235
|
uv run flowa run --variant-id test --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" --source litvar
|
|
206
236
|
```
|
|
207
237
|
|
|
@@ -211,8 +241,8 @@ uv run flowa run --variant-id test --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" -
|
|
|
211
241
|
docker build --build-arg LLM_EXTRA=bedrock -t flowa .
|
|
212
242
|
docker run \
|
|
213
243
|
-e FLOWA_STORAGE_BASE=s3://bucket \
|
|
214
|
-
-e
|
|
215
|
-
-e
|
|
244
|
+
-e FLOWA_CONVERT_MODEL__NAME=bedrock:au.anthropic.claude-sonnet-4-6 \
|
|
245
|
+
-e FLOWA_EXTRACTION_MODEL__NAME=bedrock:au.anthropic.claude-opus-4-6 \
|
|
216
246
|
-e AWS_REGION=ap-southeast-2 \
|
|
217
247
|
flowa run --variant-id VAR123 --gene GAA --hgvs-c "NM_000152.5:c.2238G>C" --source litvar
|
|
218
248
|
```
|
|
@@ -233,8 +263,8 @@ aws batch register-job-definition \
|
|
|
233
263
|
],
|
|
234
264
|
"environment": [
|
|
235
265
|
{"name": "FLOWA_STORAGE_BASE", "value": "s3://flowa-data"},
|
|
236
|
-
{"name": "
|
|
237
|
-
{"name": "
|
|
266
|
+
{"name": "FLOWA_CONVERT_MODEL__NAME", "value": "bedrock:au.anthropic.claude-sonnet-4-6"},
|
|
267
|
+
{"name": "FLOWA_EXTRACTION_MODEL__NAME", "value": "bedrock:au.anthropic.claude-opus-4-6"}
|
|
238
268
|
]
|
|
239
269
|
}' \
|
|
240
270
|
--retry-strategy '{"attempts": 2}' \
|
|
@@ -166,10 +166,12 @@ VARIANT=NM_001035_3-c_14174A_G
|
|
|
166
166
|
rm -f assessments/$VARIANT/aggregation.json \
|
|
167
167
|
assessments/$VARIANT/aggregation_raw.json
|
|
168
168
|
rm -rf assessments/$VARIANT/extractions/ assessments/$VARIANT/runs/
|
|
169
|
-
# Re-runs flowa.convert (which
|
|
170
|
-
# builds pdf_index.pkl.zst). Drop this line to
|
|
171
|
-
# + index and only redo extract + aggregate.
|
|
172
|
-
rm -f papers/*/
|
|
169
|
+
# Re-runs flowa.convert (which transcribes each PDF, builds merged.pdf when
|
|
170
|
+
# there are PDF supplements, and builds pdf_index.pkl.zst). Drop this line to
|
|
171
|
+
# reuse the cached transcriptions + index and only redo extract + aggregate.
|
|
172
|
+
rm -f papers/*/main.md papers/*/merged.md papers/*/merged.pdf \
|
|
173
|
+
papers/*/convert_raw.json papers/*/pdf_index.pkl.zst \
|
|
174
|
+
papers/*/supplements/*.pdf.md
|
|
173
175
|
```
|
|
174
176
|
|
|
175
177
|
Then drive the pipeline. The demo's `scripts/start.ts` translates the
|
|
@@ -207,11 +209,11 @@ and not needed by anything downstream.
|
|
|
207
209
|
|
|
208
210
|
For papers whose source license blocks redistribution (CC-BY-NC-ND,
|
|
209
211
|
paywalled; see `fixtures/LICENSES.md` for the rule), do **not** delete
|
|
210
|
-
the whole `papers/{encodedDoi}/` directory — only delete `
|
|
211
|
-
`
|
|
212
|
-
`pdf_index.pkl.zst` embeds the PDF's
|
|
213
|
-
index), so it carries the same copyright as
|
|
214
|
-
ship in the open-source repo. Keep `metadata.json` (the bibliographic
|
|
212
|
+
the whole `papers/{encodedDoi}/` directory — only delete `main.pdf`,
|
|
213
|
+
`merged.pdf`, `main.md`, `merged.md`, `convert_raw.json`, `pdf_index.pkl.zst`,
|
|
214
|
+
and the `supplements/` directory. The `pdf_index.pkl.zst` embeds the PDF's
|
|
215
|
+
extracted text (anchorite's char index), so it carries the same copyright as
|
|
216
|
+
`main.pdf` and must not ship in the open-source repo. Keep `metadata.json` (the bibliographic
|
|
215
217
|
fields are factual data, not copyrightable) but replace its `abstract`
|
|
216
218
|
field with a sentinel string, so the omission reads as deliberate (not
|
|
217
219
|
a missing-data bug) when the literature view renders the row:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The fixture under `examples/demo/fixtures/papers/` ships three kinds of entries, all keyed by the encoded DOI:
|
|
4
4
|
|
|
5
|
-
1. **Full-content papers** (15) — `
|
|
5
|
+
1. **Full-content papers** (15) — `main.pdf` + `main.md` + `metadata.json` + `pdf_index.pkl.zst`. The pipeline downloaded the main PDF from PMC, transcribed it to Markdown (`main.md`), and ran extraction. Papers with supplements also carry a `supplements/` directory and an assembled `merged.md` (`main.md` + the supplement transcriptions/conversions): **3** carry an xlsx/docx (office) supplement, and **2** carry a separate PDF supplement (which is additionally concatenated into a derived `merged.pdf` and transcribed). All are CC-BY (any version) or CC0, so the PDFs, the derivative Markdown, and the supplements are redistributable provided attribution is preserved (entries below).
|
|
6
6
|
2. **Metadata-only, license-restricted** (5) — only `metadata.json`; the source paper is paywalled or under a no-derivatives / non-commercial licence (e.g. CC-BY-NC-ND). The `abstract` field is replaced with a sentinel string explaining the omission, since the abstract is the author's prose and is subject to publisher copyright. Bibliographic facts (DOI, PMID, title, authors, journal, date) are not copyrightable and ship as-is.
|
|
7
7
|
3. **Metadata-only, CC-BY not in PMC** (1) — only `metadata.json`; the source paper IS CC-BY-licensed but PMC's OA subset doesn't carry it, so flowa's PMC-only download path silently skipped it. Abstract is preserved (CC-BY permits redistribution); PDF/Markdown are absent. A curator running the demo locally can fetch the PDF from the journal site.
|
|
8
8
|
|
|
@@ -54,6 +54,7 @@ For all three kinds, the demo's literature page renders the row from `metadata.j
|
|
|
54
54
|
- **DOI:** [10.1038/s41598-022-25914-8](https://doi.org/10.1038/s41598-022-25914-8)
|
|
55
55
|
- **PMID:** 36517654
|
|
56
56
|
- **License:** [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
|
57
|
+
- **Supplement:** `supplements/000_41598_2022_25914_MOESM1_ESM.docx` (electronic supplementary material; inherits the article's CC-BY 4.0).
|
|
57
58
|
|
|
58
59
|
### `10.3389%2Ffcvm.2022.1061384/`
|
|
59
60
|
|
|
@@ -81,6 +82,7 @@ For all three kinds, the demo's literature page renders the row from `metadata.j
|
|
|
81
82
|
- **DOI:** [10.3389/fcvm.2023.1261172](https://doi.org/10.3389/fcvm.2023.1261172)
|
|
82
83
|
- **PMID:** 38162137
|
|
83
84
|
- **License:** [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
|
85
|
+
- **Supplement:** `supplements/000_Table1.docx` (supplementary tables of patient demographics + biochemical indicators; inherits the article's CC-BY 4.0).
|
|
84
86
|
|
|
85
87
|
### `10.1186%2Fs13023-021-02146-z/`
|
|
86
88
|
|
|
@@ -99,6 +101,7 @@ For all three kinds, the demo's literature page renders the row from `metadata.j
|
|
|
99
101
|
- **DOI:** [10.1002/humu.23878](https://doi.org/10.1002/humu.23878)
|
|
100
102
|
- **PMID:** 31342611
|
|
101
103
|
- **License:** [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
|
104
|
+
- **Supplement:** `supplements/000_HUMU-40-2146-s001.pdf` (supplementary data PDF; inherits the article's CC-BY 4.0).
|
|
102
105
|
|
|
103
106
|
### `10.1186%2Fs12881-019-0878-8/`
|
|
104
107
|
|
|
@@ -117,6 +120,7 @@ For all three kinds, the demo's literature page renders the row from `metadata.j
|
|
|
117
120
|
- **DOI:** [10.1016/j.ymgmr.2024.101163](https://doi.org/10.1016/j.ymgmr.2024.101163)
|
|
118
121
|
- **PMID:** 39835171
|
|
119
122
|
- **License:** [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
|
123
|
+
- **Supplement:** `supplements/000_mmc1.docx` (electronic supplementary material; inherits the article's CC-BY 4.0).
|
|
120
124
|
|
|
121
125
|
### `10.1186%2Fs13052-019-0692-0/`
|
|
122
126
|
|
|
@@ -144,12 +148,18 @@ For all three kinds, the demo's literature page renders the row from `metadata.j
|
|
|
144
148
|
- **DOI:** [10.3389/fped.2021.729824](https://doi.org/10.3389/fped.2021.729824)
|
|
145
149
|
- **PMID:** 34966699
|
|
146
150
|
- **License:** [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
|
151
|
+
- **Supplement:** `supplements/000_Image_1.PDF` (supplementary figure PDF; inherits the article's CC-BY 4.0).
|
|
147
152
|
|
|
148
153
|
### Derivative artifacts
|
|
149
154
|
|
|
150
155
|
For each full-content paper the fixture also ships the pipeline's derivatives:
|
|
151
156
|
|
|
152
|
-
- `
|
|
157
|
+
- `main.md` — the main PDF transcribed to Markdown by the conversion stage.
|
|
158
|
+
- `merged.md` — present only for papers with supplements: `main.md` + the
|
|
159
|
+
PDF-supplement transcriptions + the converted office supplements.
|
|
160
|
+
- `merged.pdf` — present only for the two papers with a PDF supplement: `main.pdf`
|
|
161
|
+
concatenated with the supplement PDF (what the viewer renders + the index is built from).
|
|
162
|
+
- `pdf_index.pkl.zst` — the anchorite PDF index (embeds the PDF's extracted text).
|
|
153
163
|
- `metadata.json` — bibliographic metadata (DOI, PMID, title, authors, etc.).
|
|
154
164
|
|
|
155
165
|
These derivatives are released under the same CC-BY licence as the underlying PDFs.
|