flowapy 0.1.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.1.0/.env.example +8 -0
- flowapy-0.1.0/.github/dependabot.yml +91 -0
- flowapy-0.1.0/.github/workflows/dependabot-auto-merge.yml +39 -0
- flowapy-0.1.0/.github/workflows/lint.yaml +49 -0
- flowapy-0.1.0/.github/workflows/release-chat-service.yaml +81 -0
- flowapy-0.1.0/.github/workflows/release-flowapy.yaml +94 -0
- flowapy-0.1.0/.github/workflows/release-react-viewer.yaml +78 -0
- flowapy-0.1.0/.gitignore +161 -0
- flowapy-0.1.0/.markdownlint.json +14 -0
- flowapy-0.1.0/.nvmrc +1 -0
- flowapy-0.1.0/.pre-commit-config.yaml +64 -0
- flowapy-0.1.0/.prettierignore +30 -0
- flowapy-0.1.0/Dockerfile +25 -0
- flowapy-0.1.0/LICENSE +21 -0
- flowapy-0.1.0/PKG-INFO +313 -0
- flowapy-0.1.0/README.md +254 -0
- flowapy-0.1.0/docs/images/viewer.png +0 -0
- flowapy-0.1.0/examples/.gitkeep +0 -0
- flowapy-0.1.0/examples/demo/.env.example +41 -0
- flowapy-0.1.0/examples/demo/.gitignore +6 -0
- flowapy-0.1.0/examples/demo/README.md +253 -0
- flowapy-0.1.0/examples/demo/fixtures/LICENSES.md +191 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/aggregation.json +5276 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1002%2Fhumu.23878.json +77 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1016%2Fj.ymgmr.2024.101163.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1038%2Fs41598-022-25914-8.json +109 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs12881-019-0878-8.json +61 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-01817-1.json +170 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-021-02146-z.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13023-023-02848-6.json +133 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.1186%2Fs13052-019-0692-0.json +85 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2022.1061384.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffcvm.2023.1261172.json +69 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffimmu.2024.1336599.json +96 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffped.2021.729824.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3389%2Ffphar.2022.903488.json +61 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns11010016.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/extractions/10.3390%2Fijns6020031.json +37 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/query.json +36 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/runs/cfc0186a7b7e46eb802a516b86ec207f/progress.jsonl +68 -0
- flowapy-0.1.0/examples/demo/fixtures/assessments/NM_000152_5-c_1935C_A/variant_details.json +47 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1002%2Fajmg.a.61481/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/markdown.md +1238 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1002%2Fhumu.23878/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.ejmg.2020.103997/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.nmd.2022.02.002/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.tjog.2022.07.008/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/markdown.md +339 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1016%2Fj.ymgmr.2024.101163/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/markdown.md +290 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1038%2Fs41598-022-25914-8/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1093%2Fhmg%2Fddz218/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1136%2Fjmg-2022-108675/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/markdown.md +356 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs12881-019-0878-8/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/markdown.md +243 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-01817-1/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/markdown.md +425 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-021-02146-z/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/markdown.md +352 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13023-023-02848-6/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/markdown.md +405 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.1186%2Fs13052-019-0692-0/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/markdown.md +212 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2022.1061384/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/markdown.md +374 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffcvm.2023.1261172/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/markdown.md +352 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffimmu.2024.1336599/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/markdown.md +231 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffped.2021.729824/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/markdown.md +233 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3389%2Ffphar.2022.903488/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns11010016/markdown.md +264 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns11010016/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns11010016/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns6020031/markdown.md +397 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns6020031/metadata.json +10 -0
- flowapy-0.1.0/examples/demo/fixtures/papers/10.3390%2Fijns6020031/source.pdf +0 -0
- flowapy-0.1.0/examples/demo/next-env.d.ts +6 -0
- flowapy-0.1.0/examples/demo/next.config.mjs +7 -0
- flowapy-0.1.0/examples/demo/package.json +64 -0
- flowapy-0.1.0/examples/demo/postcss.config.cjs +6 -0
- flowapy-0.1.0/examples/demo/public/favicon.svg +10 -0
- flowapy-0.1.0/examples/demo/scripts/chat-service.ts +88 -0
- flowapy-0.1.0/examples/demo/scripts/copy-pdfjs-assets.ts +43 -0
- flowapy-0.1.0/examples/demo/scripts/exercise-llm.ts +164 -0
- flowapy-0.1.0/examples/demo/scripts/start.ts +211 -0
- flowapy-0.1.0/examples/demo/src/components/literature/LiteratureView.tsx +473 -0
- flowapy-0.1.0/examples/demo/src/components/literature/PaperStatusGroup.tsx +137 -0
- flowapy-0.1.0/examples/demo/src/components/literature/ProgressLog.tsx +94 -0
- flowapy-0.1.0/examples/demo/src/components/literature/matchFilename.ts +51 -0
- flowapy-0.1.0/examples/demo/src/db/migrate.ts +26 -0
- flowapy-0.1.0/examples/demo/src/db/schema.sql +36 -0
- flowapy-0.1.0/examples/demo/src/lib/aggregate.ts +259 -0
- flowapy-0.1.0/examples/demo/src/lib/chatSessionClient.ts +52 -0
- flowapy-0.1.0/examples/demo/src/lib/citationResolverClient.ts +35 -0
- flowapy-0.1.0/examples/demo/src/lib/demoConfig.ts +23 -0
- flowapy-0.1.0/examples/demo/src/lib/papers.ts +158 -0
- flowapy-0.1.0/examples/demo/src/lib/progressEvents.ts +22 -0
- flowapy-0.1.0/examples/demo/src/lib/runs.ts +193 -0
- flowapy-0.1.0/examples/demo/src/lib/triageBackendClient.ts +82 -0
- flowapy-0.1.0/examples/demo/src/lib/triageDb.ts +189 -0
- flowapy-0.1.0/examples/demo/src/lib/variantId.ts +49 -0
- flowapy-0.1.0/examples/demo/src/pages/_app.tsx +20 -0
- flowapy-0.1.0/examples/demo/src/pages/api/aggregate/[variantId]/[category].ts +28 -0
- flowapy-0.1.0/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/[version].ts +40 -0
- flowapy-0.1.0/examples/demo/src/pages/api/edit-drafts/[variantId]/[category]/index.ts +20 -0
- flowapy-0.1.0/examples/demo/src/pages/api/papers/[doi]/pdf.ts +110 -0
- flowapy-0.1.0/examples/demo/src/pages/api/papers/index.ts +36 -0
- flowapy-0.1.0/examples/demo/src/pages/api/runs/[variantId]/[runId]/progress.ts +85 -0
- flowapy-0.1.0/examples/demo/src/pages/api/runs/index.ts +93 -0
- flowapy-0.1.0/examples/demo/src/pages/api/runs/latest.ts +48 -0
- flowapy-0.1.0/examples/demo/src/pages/api/triage/claim.ts +43 -0
- flowapy-0.1.0/examples/demo/src/pages/api/triage/comment.ts +38 -0
- flowapy-0.1.0/examples/demo/src/pages/api/triage/paper-done.ts +38 -0
- flowapy-0.1.0/examples/demo/src/pages/api/triage/snapshot/[variantId]/[category]/[version].ts +42 -0
- flowapy-0.1.0/examples/demo/src/pages/index.tsx +235 -0
- flowapy-0.1.0/examples/demo/src/pages/variants/[variantId].tsx +23 -0
- flowapy-0.1.0/examples/demo/src/pages/viewer/[variantId]/[category].tsx +298 -0
- flowapy-0.1.0/examples/demo/src/styles/globals.css +25 -0
- flowapy-0.1.0/examples/demo/tailwind.config.ts +11 -0
- flowapy-0.1.0/examples/demo/test/LiteratureView.test.tsx +283 -0
- flowapy-0.1.0/examples/demo/test/ProgressLog.test.tsx +94 -0
- flowapy-0.1.0/examples/demo/test/aggregate.test.ts +247 -0
- flowapy-0.1.0/examples/demo/test/chat-service.test.ts +183 -0
- flowapy-0.1.0/examples/demo/test/index-page.test.tsx +195 -0
- flowapy-0.1.0/examples/demo/test/matchFilename.test.ts +102 -0
- flowapy-0.1.0/examples/demo/test/papers-pdf-upload.test.ts +183 -0
- flowapy-0.1.0/examples/demo/test/papers-route.test.ts +144 -0
- flowapy-0.1.0/examples/demo/test/papers.test.ts +178 -0
- flowapy-0.1.0/examples/demo/test/progress-route.test.ts +190 -0
- flowapy-0.1.0/examples/demo/test/runs-latest-route.test.ts +130 -0
- flowapy-0.1.0/examples/demo/test/runs-route.test.ts +243 -0
- flowapy-0.1.0/examples/demo/test/runs.test.ts +232 -0
- flowapy-0.1.0/examples/demo/test/setup.ts +8 -0
- flowapy-0.1.0/examples/demo/test/triage.test.ts +211 -0
- flowapy-0.1.0/examples/demo/test/variantId.test.ts +71 -0
- flowapy-0.1.0/examples/demo/tsconfig.json +32 -0
- flowapy-0.1.0/examples/demo/vitest.config.ts +29 -0
- flowapy-0.1.0/examples/demo-gateway/README.md +73 -0
- flowapy-0.1.0/examples/demo-gateway/pyproject.toml +75 -0
- flowapy-0.1.0/examples/demo-gateway/src/demo_gateway/__init__.py +0 -0
- flowapy-0.1.0/examples/demo-gateway/src/demo_gateway/config.py +46 -0
- flowapy-0.1.0/examples/demo-gateway/src/demo_gateway/main.py +190 -0
- flowapy-0.1.0/examples/demo-gateway/src/demo_gateway/progress.py +54 -0
- flowapy-0.1.0/examples/demo-gateway/src/demo_gateway/runs.py +180 -0
- flowapy-0.1.0/examples/demo-gateway/tests/__init__.py +0 -0
- flowapy-0.1.0/examples/demo-gateway/tests/conftest.py +89 -0
- flowapy-0.1.0/examples/demo-gateway/tests/test_main.py +96 -0
- flowapy-0.1.0/examples/demo-gateway/tests/test_progress.py +55 -0
- flowapy-0.1.0/examples/demo-gateway/tests/test_resolve.py +78 -0
- flowapy-0.1.0/examples/demo-gateway/tests/test_runs.py +183 -0
- flowapy-0.1.0/examples/demo-gateway/uv.lock +2111 -0
- flowapy-0.1.0/package.json +25 -0
- flowapy-0.1.0/packages/.gitkeep +0 -0
- flowapy-0.1.0/packages/chat-service/Dockerfile +44 -0
- flowapy-0.1.0/packages/chat-service/LICENSE +21 -0
- flowapy-0.1.0/packages/chat-service/README.md +210 -0
- flowapy-0.1.0/packages/chat-service/package.json +124 -0
- flowapy-0.1.0/packages/chat-service/src/artifact.ts +132 -0
- flowapy-0.1.0/packages/chat-service/src/audit.ts +136 -0
- flowapy-0.1.0/packages/chat-service/src/auth/jwt.ts +42 -0
- flowapy-0.1.0/packages/chat-service/src/auth/oidc.ts +87 -0
- flowapy-0.1.0/packages/chat-service/src/chat.ts +888 -0
- flowapy-0.1.0/packages/chat-service/src/cli.ts +54 -0
- flowapy-0.1.0/packages/chat-service/src/config.ts +108 -0
- flowapy-0.1.0/packages/chat-service/src/index.ts +24 -0
- flowapy-0.1.0/packages/chat-service/src/instrumentation.ts +214 -0
- flowapy-0.1.0/packages/chat-service/src/llm/anthropic.ts +52 -0
- flowapy-0.1.0/packages/chat-service/src/llm/bedrock.ts +80 -0
- flowapy-0.1.0/packages/chat-service/src/llm/factory.ts +67 -0
- flowapy-0.1.0/packages/chat-service/src/llm/google-gla.ts +38 -0
- flowapy-0.1.0/packages/chat-service/src/llm/google-vertex.ts +37 -0
- flowapy-0.1.0/packages/chat-service/src/llm/interface.ts +46 -0
- flowapy-0.1.0/packages/chat-service/src/llm/openai.ts +34 -0
- flowapy-0.1.0/packages/chat-service/src/prompts.ts +21 -0
- flowapy-0.1.0/packages/chat-service/src/server.ts +154 -0
- flowapy-0.1.0/packages/chat-service/src/session.ts +379 -0
- flowapy-0.1.0/packages/chat-service/src/storage/factory.ts +47 -0
- flowapy-0.1.0/packages/chat-service/src/storage/fs.ts +131 -0
- flowapy-0.1.0/packages/chat-service/src/storage/gcs.ts +122 -0
- flowapy-0.1.0/packages/chat-service/src/storage/interface.ts +40 -0
- flowapy-0.1.0/packages/chat-service/src/storage/s3.ts +166 -0
- flowapy-0.1.0/packages/chat-service/src/storage-keys.ts +137 -0
- flowapy-0.1.0/packages/chat-service/src/telemetry.ts +191 -0
- flowapy-0.1.0/packages/chat-service/src/yaml.ts +158 -0
- flowapy-0.1.0/packages/chat-service/test/chat.test.ts +607 -0
- flowapy-0.1.0/packages/chat-service/test/generic-prompt.test.ts +165 -0
- flowapy-0.1.0/packages/chat-service/test/llm-factory.test.ts +249 -0
- flowapy-0.1.0/packages/chat-service/test/oidc.test.ts +224 -0
- flowapy-0.1.0/packages/chat-service/test/storage-fs.test.ts +157 -0
- flowapy-0.1.0/packages/chat-service/test/storage-gcs.test.ts +240 -0
- flowapy-0.1.0/packages/chat-service/test/storage-s3.test.ts +300 -0
- flowapy-0.1.0/packages/chat-service/test/yaml.test.ts +343 -0
- flowapy-0.1.0/packages/chat-service/tsconfig.build.json +8 -0
- flowapy-0.1.0/packages/chat-service/tsconfig.json +13 -0
- flowapy-0.1.0/packages/chat-service/vitest.config.ts +8 -0
- flowapy-0.1.0/packages/react-viewer/LICENSE +21 -0
- flowapy-0.1.0/packages/react-viewer/README.md +99 -0
- flowapy-0.1.0/packages/react-viewer/package.json +87 -0
- flowapy-0.1.0/packages/react-viewer/src/citations/sanitize.test.ts +221 -0
- flowapy-0.1.0/packages/react-viewer/src/citations/sanitize.ts +112 -0
- flowapy-0.1.0/packages/react-viewer/src/citations/types.ts +17 -0
- flowapy-0.1.0/packages/react-viewer/src/index.ts +85 -0
- flowapy-0.1.0/packages/react-viewer/src/llm-content/LlmContent.test.tsx +81 -0
- flowapy-0.1.0/packages/react-viewer/src/llm-content/LlmContent.tsx +76 -0
- flowapy-0.1.0/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.test.tsx +67 -0
- flowapy-0.1.0/packages/react-viewer/src/pdf-viewer/PdfHighlightViewer.tsx +472 -0
- flowapy-0.1.0/packages/react-viewer/src/pdf-viewer/types.ts +16 -0
- flowapy-0.1.0/packages/react-viewer/src/styles.css +113 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/ChatDrawer.tsx +226 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/ChatSection.tsx +150 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/ClaimList.tsx +68 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/EvidenceViewerShell.test.tsx +379 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/EvidenceViewerShell.tsx +910 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/FocusCard.tsx +268 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/PaperHeader.tsx +81 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/PaperRail.test.tsx +91 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/PaperRail.tsx +82 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/SynthesisPanel.tsx +53 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/backend.ts +39 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/citation-resolver.ts +30 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/citation-utils.test.ts +139 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/citation-utils.ts +86 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/claim-refs.test.ts +130 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/claim-refs.ts +122 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/keyboard.test.ts +125 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/keyboard.ts +212 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/store.test.ts +122 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/store.ts +178 -0
- flowapy-0.1.0/packages/react-viewer/src/triage/types.ts +65 -0
- flowapy-0.1.0/packages/react-viewer/tailwind.config.ts +14 -0
- flowapy-0.1.0/packages/react-viewer/tsconfig.json +15 -0
- flowapy-0.1.0/packages/react-viewer/tsup.config.ts +13 -0
- flowapy-0.1.0/packages/react-viewer/vitest.config.ts +10 -0
- flowapy-0.1.0/pnpm-lock.yaml +6722 -0
- flowapy-0.1.0/pnpm-workspace.yaml +4 -0
- flowapy-0.1.0/prompts/generic/aggregation_edit_prompt.txt +262 -0
- flowapy-0.1.0/prompts/generic/aggregation_edit_schema.ts +43 -0
- flowapy-0.1.0/prompts/generic/aggregation_prompt.txt +279 -0
- flowapy-0.1.0/prompts/generic/aggregation_schema.py +95 -0
- flowapy-0.1.0/prompts/generic/extraction_prompt.txt +189 -0
- flowapy-0.1.0/prompts/generic/extraction_schema.py +41 -0
- flowapy-0.1.0/prompts/generic/transcription_prompt.txt +52 -0
- flowapy-0.1.0/prompts/package.json +15 -0
- flowapy-0.1.0/pyproject.toml +114 -0
- flowapy-0.1.0/src/flowa/__init__.py +3 -0
- flowapy-0.1.0/src/flowa/aggregate.py +372 -0
- flowapy-0.1.0/src/flowa/cli.py +81 -0
- flowapy-0.1.0/src/flowa/clinvar.py +503 -0
- flowapy-0.1.0/src/flowa/convert.py +167 -0
- flowapy-0.1.0/src/flowa/download.py +266 -0
- flowapy-0.1.0/src/flowa/extract.py +127 -0
- flowapy-0.1.0/src/flowa/http_retry.py +26 -0
- flowapy-0.1.0/src/flowa/models.py +150 -0
- flowapy-0.1.0/src/flowa/normalize.py +377 -0
- flowapy-0.1.0/src/flowa/progress.py +73 -0
- flowapy-0.1.0/src/flowa/prompts.py +125 -0
- flowapy-0.1.0/src/flowa/py.typed +0 -0
- flowapy-0.1.0/src/flowa/query.py +523 -0
- flowapy-0.1.0/src/flowa/resolve.py +205 -0
- flowapy-0.1.0/src/flowa/run.py +209 -0
- flowapy-0.1.0/src/flowa/schema.py +113 -0
- flowapy-0.1.0/src/flowa/settings.py +58 -0
- flowapy-0.1.0/src/flowa/storage.py +106 -0
- flowapy-0.1.0/tests/__init__.py +1 -0
- flowapy-0.1.0/tests/test_progress.py +64 -0
- flowapy-0.1.0/tests/test_prompts.py +88 -0
- flowapy-0.1.0/tests/test_resolve.py +207 -0
- flowapy-0.1.0/tsconfig.base.json +18 -0
- flowapy-0.1.0/uv.lock +2032 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Dependabot configuration for flowa.
|
|
2
|
+
#
|
|
3
|
+
# Strategy:
|
|
4
|
+
# - Weekly version-update PRs per ecosystem, grouped so minor/patch bumps land
|
|
5
|
+
# in a single PR. Majors still get individual PRs so they can be reviewed in
|
|
6
|
+
# isolation.
|
|
7
|
+
# - Security-update PRs (opened as soon as an advisory drops) use the same
|
|
8
|
+
# per-ecosystem groups; that switch is toggled separately at
|
|
9
|
+
# Settings -> Code security -> "Dependabot security updates" and is wired up
|
|
10
|
+
# alongside this file.
|
|
11
|
+
# - 7-day cooldown matches the local supply-chain hygiene policy
|
|
12
|
+
# (`min-release-age=7d` in pnpm's global config, `exclude-newer = "7 days"`
|
|
13
|
+
# in each uv project). Without it Dependabot would happily open PRs that CI
|
|
14
|
+
# then rejects because the new version is too fresh.
|
|
15
|
+
# - The reviewer assignment notifies @lgruen-vcgs on each PR; the weekly
|
|
16
|
+
# cadence keeps the inbox manageable.
|
|
17
|
+
|
|
18
|
+
version: 2
|
|
19
|
+
|
|
20
|
+
updates:
|
|
21
|
+
# npm / pnpm — covers the root pnpm-lock.yaml and every workspace package
|
|
22
|
+
# (packages/*, examples/*). Dependabot follows the workspace graph
|
|
23
|
+
# automatically; one entry here is enough.
|
|
24
|
+
- package-ecosystem: "npm"
|
|
25
|
+
directory: "/"
|
|
26
|
+
schedule:
|
|
27
|
+
interval: "weekly"
|
|
28
|
+
open-pull-requests-limit: 10
|
|
29
|
+
reviewers:
|
|
30
|
+
- "lgruen-vcgs"
|
|
31
|
+
labels:
|
|
32
|
+
- "dependencies"
|
|
33
|
+
- "npm"
|
|
34
|
+
commit-message:
|
|
35
|
+
prefix: "deps"
|
|
36
|
+
cooldown:
|
|
37
|
+
default-days: 7
|
|
38
|
+
groups:
|
|
39
|
+
npm-non-major:
|
|
40
|
+
patterns:
|
|
41
|
+
- "*"
|
|
42
|
+
update-types:
|
|
43
|
+
- "minor"
|
|
44
|
+
- "patch"
|
|
45
|
+
|
|
46
|
+
# uv / Python — the flowa library project at the repo root.
|
|
47
|
+
- package-ecosystem: "uv"
|
|
48
|
+
directory: "/"
|
|
49
|
+
schedule:
|
|
50
|
+
interval: "weekly"
|
|
51
|
+
open-pull-requests-limit: 10
|
|
52
|
+
reviewers:
|
|
53
|
+
- "lgruen-vcgs"
|
|
54
|
+
labels:
|
|
55
|
+
- "dependencies"
|
|
56
|
+
- "python"
|
|
57
|
+
commit-message:
|
|
58
|
+
prefix: "deps"
|
|
59
|
+
cooldown:
|
|
60
|
+
default-days: 7
|
|
61
|
+
groups:
|
|
62
|
+
python-non-major:
|
|
63
|
+
patterns:
|
|
64
|
+
- "*"
|
|
65
|
+
update-types:
|
|
66
|
+
- "minor"
|
|
67
|
+
- "patch"
|
|
68
|
+
|
|
69
|
+
# uv / Python — examples/demo-gateway is its own uv project with its own
|
|
70
|
+
# uv.lock, so it needs its own entry.
|
|
71
|
+
- package-ecosystem: "uv"
|
|
72
|
+
directory: "/examples/demo-gateway"
|
|
73
|
+
schedule:
|
|
74
|
+
interval: "weekly"
|
|
75
|
+
open-pull-requests-limit: 10
|
|
76
|
+
reviewers:
|
|
77
|
+
- "lgruen-vcgs"
|
|
78
|
+
labels:
|
|
79
|
+
- "dependencies"
|
|
80
|
+
- "python"
|
|
81
|
+
commit-message:
|
|
82
|
+
prefix: "deps"
|
|
83
|
+
cooldown:
|
|
84
|
+
default-days: 7
|
|
85
|
+
groups:
|
|
86
|
+
python-non-major:
|
|
87
|
+
patterns:
|
|
88
|
+
- "*"
|
|
89
|
+
update-types:
|
|
90
|
+
- "minor"
|
|
91
|
+
- "patch"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Auto-merge non-major Dependabot PRs.
|
|
2
|
+
#
|
|
3
|
+
# Branch protection on `main` requires the `lint` + `test` checks from
|
|
4
|
+
# lint.yaml to pass; this workflow just flips the auto-merge switch on
|
|
5
|
+
# qualifying PRs so GitHub merges them once those checks go green.
|
|
6
|
+
#
|
|
7
|
+
# Major version bumps are skipped — they land as regular PRs and need a
|
|
8
|
+
# human to review the changelog before merging.
|
|
9
|
+
#
|
|
10
|
+
# Uses `pull_request_target` so the workflow runs in the base repo's
|
|
11
|
+
# context and can use the GITHUB_TOKEN (Dependabot PRs run with a
|
|
12
|
+
# read-only token by default). The `github.actor == 'dependabot[bot]'`
|
|
13
|
+
# guard is what keeps random forks from triggering this with elevated
|
|
14
|
+
# permissions.
|
|
15
|
+
|
|
16
|
+
name: Dependabot auto-merge
|
|
17
|
+
|
|
18
|
+
on:
|
|
19
|
+
pull_request_target:
|
|
20
|
+
branches: [main]
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
pull-requests: write
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
auto-merge:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
if: github.actor == 'dependabot[bot]'
|
|
30
|
+
steps:
|
|
31
|
+
- name: Fetch Dependabot metadata
|
|
32
|
+
id: meta
|
|
33
|
+
uses: dependabot/fetch-metadata@v2
|
|
34
|
+
|
|
35
|
+
- name: Enable auto-merge for non-major updates
|
|
36
|
+
if: steps.meta.outputs.update-type != 'version-update:semver-major'
|
|
37
|
+
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
|
|
38
|
+
env:
|
|
39
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
|
+
|
|
14
|
+
- uses: astral-sh/setup-uv@v7
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.13"
|
|
17
|
+
|
|
18
|
+
- uses: pnpm/action-setup@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-node@v5
|
|
21
|
+
with:
|
|
22
|
+
node-version-file: .nvmrc
|
|
23
|
+
cache: "pnpm"
|
|
24
|
+
|
|
25
|
+
- run: uv sync --all-extras --group dev --frozen
|
|
26
|
+
|
|
27
|
+
- run: pnpm install --frozen-lockfile
|
|
28
|
+
|
|
29
|
+
# All lint checks (ruff, mypy, prettier, …) live in
|
|
30
|
+
# .pre-commit-config.yaml so local pre-commit and CI stay in lockstep.
|
|
31
|
+
- uses: actions/cache@v5
|
|
32
|
+
with:
|
|
33
|
+
path: ~/.cache/pre-commit
|
|
34
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
35
|
+
|
|
36
|
+
- 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/
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Tag-driven release of @flowajs/chat-service to npm via OIDC trusted publishing.
|
|
2
|
+
#
|
|
3
|
+
# Trigger: `git tag chat-service-v$VERSION && git push origin chat-service-v$VERSION`.
|
|
4
|
+
# Gating: the `npm-publish` GitHub environment requires manual approval before
|
|
5
|
+
# the publish step runs.
|
|
6
|
+
#
|
|
7
|
+
# Setup mirrors @flowajs/react-viewer's release workflow — same `npm-publish`
|
|
8
|
+
# environment, same approver list, same tag-protection ruleset (extended with
|
|
9
|
+
# `chat-service-v*`). Per-package work needed before the first OIDC publish:
|
|
10
|
+
# bootstrap publish 0.0.1 with a granular token, deprecate it, configure the
|
|
11
|
+
# trusted publisher on npmjs.com (workflow filename: release-chat-service.yaml,
|
|
12
|
+
# environment: npm-publish), then enable "Require 2FA and disallow tokens".
|
|
13
|
+
#
|
|
14
|
+
# Action versions are pinned to major-version tags here, matching lint.yaml /
|
|
15
|
+
# release-react-viewer.yaml. Switch to SHA pins via Dependabot before going
|
|
16
|
+
# to production.
|
|
17
|
+
|
|
18
|
+
name: Release @flowajs/chat-service
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
tags:
|
|
23
|
+
- "chat-service-v*"
|
|
24
|
+
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
id-token: write # Required for OIDC trusted publishing.
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
publish:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: npm-publish # Must match the trusted-publisher config on npmjs.com.
|
|
33
|
+
timeout-minutes: 15
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v6
|
|
37
|
+
with:
|
|
38
|
+
fetch-depth: 0
|
|
39
|
+
persist-credentials: false
|
|
40
|
+
|
|
41
|
+
- uses: pnpm/action-setup@v4
|
|
42
|
+
|
|
43
|
+
- uses: actions/setup-node@v5
|
|
44
|
+
with:
|
|
45
|
+
node-version: "22"
|
|
46
|
+
registry-url: "https://registry.npmjs.org"
|
|
47
|
+
cache: "pnpm"
|
|
48
|
+
|
|
49
|
+
# Trusted publishing requires npm >= 11.5.1; Node 22.x ships npm 10.9.x.
|
|
50
|
+
# Install to a fresh prefix to sidestep `npm install -g npm@X` clobbering
|
|
51
|
+
# its own node_modules mid-upgrade.
|
|
52
|
+
- name: Pin npm
|
|
53
|
+
run: |
|
|
54
|
+
mkdir -p "$RUNNER_TEMP/npm-pin"
|
|
55
|
+
npm install -g --prefix="$RUNNER_TEMP/npm-pin" npm@11.13.0
|
|
56
|
+
echo "$RUNNER_TEMP/npm-pin/bin" >> "$GITHUB_PATH"
|
|
57
|
+
|
|
58
|
+
- name: Verify npm version
|
|
59
|
+
run: npm --version
|
|
60
|
+
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: pnpm install --frozen-lockfile --ignore-scripts
|
|
63
|
+
|
|
64
|
+
- name: Build
|
|
65
|
+
run: pnpm --filter @flowajs/chat-service build
|
|
66
|
+
|
|
67
|
+
- name: Test
|
|
68
|
+
run: pnpm --filter @flowajs/chat-service test
|
|
69
|
+
|
|
70
|
+
- name: Typecheck
|
|
71
|
+
run: pnpm --filter @flowajs/chat-service typecheck
|
|
72
|
+
|
|
73
|
+
- name: Verify tarball contents
|
|
74
|
+
working-directory: packages/chat-service
|
|
75
|
+
run: pnpm pack --dry-run
|
|
76
|
+
|
|
77
|
+
- name: Publish
|
|
78
|
+
working-directory: packages/chat-service
|
|
79
|
+
run: npm publish --provenance --access=public
|
|
80
|
+
env:
|
|
81
|
+
NPM_CONFIG_PROVENANCE: true
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Tag-driven release of flowapy to PyPI via OIDC trusted publishing.
|
|
2
|
+
#
|
|
3
|
+
# Trigger: `git tag flowapy-v$VERSION && git push origin flowapy-v$VERSION`.
|
|
4
|
+
# Gating: the `pypi` GitHub environment requires manual approval before the
|
|
5
|
+
# publish step runs.
|
|
6
|
+
#
|
|
7
|
+
# The PyPI distribution is named `flowapy` (the `flowa` name was already
|
|
8
|
+
# taken on PyPI by an unrelated owner). Import name and CLI command stay
|
|
9
|
+
# `flowa`; only the install line and the URL below carry the distinct
|
|
10
|
+
# distribution name.
|
|
11
|
+
#
|
|
12
|
+
# Per-package setup needed once before the first OIDC publish:
|
|
13
|
+
# 1. Configure a pending publisher on pypi.org under your account
|
|
14
|
+
# (https://pypi.org/manage/account/publishing/) — PyPI Project Name:
|
|
15
|
+
# flowapy, Owner: populationgenomics, Repository: flowa, Workflow:
|
|
16
|
+
# release-flowapy.yaml, Environment: pypi. Pending publishers reserve
|
|
17
|
+
# the name and let the first OIDC publish create the project; no
|
|
18
|
+
# bootstrap API token is needed.
|
|
19
|
+
# 2. Create the `pypi` GitHub environment with required reviewers + a
|
|
20
|
+
# deployment-branch-policy that matches `flowapy-v*` tags.
|
|
21
|
+
# 3. Extend the `release-tag protection` ruleset to also match `flowapy-v*`,
|
|
22
|
+
# mirroring the `react-viewer-v*` / `chat-service-v*` patterns.
|
|
23
|
+
# 4. Toggle PyPI's project setting to disallow API tokens once the first
|
|
24
|
+
# OIDC publish has been verified end-to-end.
|
|
25
|
+
#
|
|
26
|
+
# Setup is documented in specs/flowa_demo.md and the publishing guide it
|
|
27
|
+
# references.
|
|
28
|
+
#
|
|
29
|
+
# Action versions are pinned to major-version tags here, matching lint.yaml
|
|
30
|
+
# and the npm release workflows. Switch to SHA pins via Dependabot before
|
|
31
|
+
# going to production.
|
|
32
|
+
|
|
33
|
+
name: Release flowapy
|
|
34
|
+
|
|
35
|
+
on:
|
|
36
|
+
push:
|
|
37
|
+
tags:
|
|
38
|
+
- "flowapy-v*"
|
|
39
|
+
|
|
40
|
+
permissions:
|
|
41
|
+
contents: read
|
|
42
|
+
|
|
43
|
+
jobs:
|
|
44
|
+
publish:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
environment:
|
|
47
|
+
name: pypi
|
|
48
|
+
url: https://pypi.org/p/flowapy
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write # Required for PyPI OIDC trusted publishing.
|
|
51
|
+
timeout-minutes: 15
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v6
|
|
55
|
+
with:
|
|
56
|
+
fetch-depth: 0
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
|
|
59
|
+
- uses: astral-sh/setup-uv@v7
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.13"
|
|
62
|
+
|
|
63
|
+
- name: Verify tag matches pyproject version
|
|
64
|
+
run: |
|
|
65
|
+
tag="${GITHUB_REF_NAME#flowapy-v}"
|
|
66
|
+
ver="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')"
|
|
67
|
+
if [ "$tag" != "$ver" ]; then
|
|
68
|
+
echo "::error::Tag flowapy-v${tag} does not match pyproject.toml version ${ver}"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
- name: Install dependencies
|
|
73
|
+
run: uv sync --all-extras --group dev --frozen
|
|
74
|
+
|
|
75
|
+
- name: Lint
|
|
76
|
+
run: uv run ruff check src/
|
|
77
|
+
|
|
78
|
+
- name: Format check
|
|
79
|
+
run: uv run ruff format --check src/
|
|
80
|
+
|
|
81
|
+
- name: Typecheck
|
|
82
|
+
run: uv run mypy src/
|
|
83
|
+
|
|
84
|
+
- name: Test
|
|
85
|
+
run: uv run pytest tests/
|
|
86
|
+
|
|
87
|
+
- name: Build distribution
|
|
88
|
+
run: uv build
|
|
89
|
+
|
|
90
|
+
- name: List built artifacts
|
|
91
|
+
run: ls -l dist/
|
|
92
|
+
|
|
93
|
+
- name: Publish to PyPI
|
|
94
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Tag-driven release of @flowajs/react-viewer to npm via OIDC trusted publishing.
|
|
2
|
+
#
|
|
3
|
+
# Trigger: `git tag react-viewer-v$VERSION && git push origin react-viewer-v$VERSION`.
|
|
4
|
+
# Gating: the `npm-publish` GitHub environment requires manual approval before
|
|
5
|
+
# the publish step runs.
|
|
6
|
+
#
|
|
7
|
+
# Setup is documented in specs/flowa_demo.md (§6.1, §16.3) and the publishing
|
|
8
|
+
# guide it references — scope reservation, trusted-publisher binding, branch
|
|
9
|
+
# and tag protection, environment reviewers all need to be configured on
|
|
10
|
+
# npmjs.com / GitHub before this workflow can publish successfully.
|
|
11
|
+
#
|
|
12
|
+
# Action versions are pinned to major-version tags here, matching lint.yaml.
|
|
13
|
+
# Switch to SHA pins via Dependabot before going to production.
|
|
14
|
+
|
|
15
|
+
name: Release @flowajs/react-viewer
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
push:
|
|
19
|
+
tags:
|
|
20
|
+
- "react-viewer-v*"
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
id-token: write # Required for OIDC trusted publishing.
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
publish:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: npm-publish # Must match the trusted-publisher config on npmjs.com.
|
|
30
|
+
timeout-minutes: 15
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
persist-credentials: false
|
|
37
|
+
|
|
38
|
+
- uses: pnpm/action-setup@v4
|
|
39
|
+
|
|
40
|
+
- uses: actions/setup-node@v5
|
|
41
|
+
with:
|
|
42
|
+
node-version: "22"
|
|
43
|
+
registry-url: "https://registry.npmjs.org"
|
|
44
|
+
cache: "pnpm"
|
|
45
|
+
|
|
46
|
+
# Trusted publishing requires npm >= 11.5.1; Node 22.x ships npm 10.9.x.
|
|
47
|
+
# Install to a fresh prefix to sidestep `npm install -g npm@X` clobbering
|
|
48
|
+
# its own node_modules mid-upgrade.
|
|
49
|
+
- name: Pin npm
|
|
50
|
+
run: |
|
|
51
|
+
mkdir -p "$RUNNER_TEMP/npm-pin"
|
|
52
|
+
npm install -g --prefix="$RUNNER_TEMP/npm-pin" npm@11.13.0
|
|
53
|
+
echo "$RUNNER_TEMP/npm-pin/bin" >> "$GITHUB_PATH"
|
|
54
|
+
|
|
55
|
+
- name: Verify npm version
|
|
56
|
+
run: npm --version
|
|
57
|
+
|
|
58
|
+
- name: Install dependencies
|
|
59
|
+
run: pnpm install --frozen-lockfile --ignore-scripts
|
|
60
|
+
|
|
61
|
+
- name: Build
|
|
62
|
+
run: pnpm --filter @flowajs/react-viewer build
|
|
63
|
+
|
|
64
|
+
- name: Test
|
|
65
|
+
run: pnpm --filter @flowajs/react-viewer test
|
|
66
|
+
|
|
67
|
+
- name: Typecheck
|
|
68
|
+
run: pnpm --filter @flowajs/react-viewer typecheck
|
|
69
|
+
|
|
70
|
+
- name: Verify tarball contents
|
|
71
|
+
working-directory: packages/react-viewer
|
|
72
|
+
run: pnpm pack --dry-run
|
|
73
|
+
|
|
74
|
+
- name: Publish
|
|
75
|
+
working-directory: packages/react-viewer
|
|
76
|
+
run: npm publish --provenance --access=public
|
|
77
|
+
env:
|
|
78
|
+
NPM_CONFIG_PROVENANCE: true
|
flowapy-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Python codebase default gitignore (github template)
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
# local irrelevant files
|
|
9
|
+
.idea
|
|
10
|
+
.DS_Store
|
|
11
|
+
CLAUDE.md
|
|
12
|
+
specs/
|
|
13
|
+
|
|
14
|
+
# Only the public generic prompt set is tracked.
|
|
15
|
+
prompts/*/
|
|
16
|
+
!prompts/generic/
|
|
17
|
+
|
|
18
|
+
# C extensions
|
|
19
|
+
*.so
|
|
20
|
+
|
|
21
|
+
# Distribution / packaging
|
|
22
|
+
.Python
|
|
23
|
+
build/
|
|
24
|
+
build.d/
|
|
25
|
+
develop-eggs/
|
|
26
|
+
dist/
|
|
27
|
+
downloads/
|
|
28
|
+
eggs/
|
|
29
|
+
.eggs/
|
|
30
|
+
# /lib/ and /lib64/ are anchored to the repo root so they don't shadow
|
|
31
|
+
# unrelated `lib/` directories nested under packages or examples.
|
|
32
|
+
/lib/
|
|
33
|
+
/lib64/
|
|
34
|
+
parts/
|
|
35
|
+
sdist/
|
|
36
|
+
var/
|
|
37
|
+
wheels/
|
|
38
|
+
pip-wheel-metadata/
|
|
39
|
+
share/python-wheels/
|
|
40
|
+
*.egg-info/
|
|
41
|
+
.installed.cfg
|
|
42
|
+
*.egg
|
|
43
|
+
MANIFEST
|
|
44
|
+
|
|
45
|
+
# PyInstaller
|
|
46
|
+
# Usually these files are written by a python script from a template
|
|
47
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
48
|
+
*.manifest
|
|
49
|
+
*.spec
|
|
50
|
+
|
|
51
|
+
# Installer logs
|
|
52
|
+
pip-log.txt
|
|
53
|
+
pip-delete-this-directory.txt
|
|
54
|
+
|
|
55
|
+
# Unit test / coverage reports
|
|
56
|
+
htmlcov/
|
|
57
|
+
.tox/
|
|
58
|
+
.nox/
|
|
59
|
+
.coverage
|
|
60
|
+
.coverage.*
|
|
61
|
+
.cache
|
|
62
|
+
nosetests.xml
|
|
63
|
+
coverage.xml
|
|
64
|
+
*.cover
|
|
65
|
+
*.py,cover
|
|
66
|
+
.hypothesis/
|
|
67
|
+
.pytest_cache/
|
|
68
|
+
|
|
69
|
+
# Translations
|
|
70
|
+
*.mo
|
|
71
|
+
*.pot
|
|
72
|
+
|
|
73
|
+
# Django stuff:
|
|
74
|
+
*.log
|
|
75
|
+
local_settings.py
|
|
76
|
+
db.sqlite3
|
|
77
|
+
db.sqlite3-journal
|
|
78
|
+
|
|
79
|
+
# Flask stuff:
|
|
80
|
+
instance/
|
|
81
|
+
.webassets-cache
|
|
82
|
+
|
|
83
|
+
# Scrapy stuff:
|
|
84
|
+
.scrapy
|
|
85
|
+
|
|
86
|
+
# Sphinx documentation
|
|
87
|
+
docs/_build/
|
|
88
|
+
|
|
89
|
+
# PyBuilder
|
|
90
|
+
target/
|
|
91
|
+
|
|
92
|
+
# Jupyter Notebook
|
|
93
|
+
.ipynb_checkpoints
|
|
94
|
+
|
|
95
|
+
# IPython
|
|
96
|
+
profile_default/
|
|
97
|
+
ipython_config.py
|
|
98
|
+
|
|
99
|
+
# pyenv
|
|
100
|
+
.python-version
|
|
101
|
+
|
|
102
|
+
# pipenv
|
|
103
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
104
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
105
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
106
|
+
# install all needed dependencies.
|
|
107
|
+
#Pipfile.lock
|
|
108
|
+
|
|
109
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
110
|
+
__pypackages__/
|
|
111
|
+
|
|
112
|
+
# Celery stuff
|
|
113
|
+
celerybeat-schedule
|
|
114
|
+
celerybeat.pid
|
|
115
|
+
|
|
116
|
+
# SageMath parsed files
|
|
117
|
+
*.sage.py
|
|
118
|
+
|
|
119
|
+
# Environments
|
|
120
|
+
.env
|
|
121
|
+
.venv
|
|
122
|
+
env/
|
|
123
|
+
venv/
|
|
124
|
+
ENV/
|
|
125
|
+
env.bak/
|
|
126
|
+
venv.bak/
|
|
127
|
+
|
|
128
|
+
# Spyder project settings
|
|
129
|
+
.spyderproject
|
|
130
|
+
.spyproject
|
|
131
|
+
|
|
132
|
+
# Rope project settings
|
|
133
|
+
.ropeproject
|
|
134
|
+
|
|
135
|
+
# mkdocs documentation
|
|
136
|
+
/site
|
|
137
|
+
|
|
138
|
+
# mypy
|
|
139
|
+
.mypy_cache/
|
|
140
|
+
.dmypy.json
|
|
141
|
+
dmypy.json
|
|
142
|
+
|
|
143
|
+
# Pyre type checker
|
|
144
|
+
.pyre/
|
|
145
|
+
|
|
146
|
+
data/
|
|
147
|
+
reports/
|
|
148
|
+
|
|
149
|
+
# Docker
|
|
150
|
+
docker/.env
|
|
151
|
+
docker/config/
|
|
152
|
+
docker/plugins/
|
|
153
|
+
docker/logs/
|
|
154
|
+
|
|
155
|
+
# Node / TypeScript workspace
|
|
156
|
+
node_modules/
|
|
157
|
+
.next/
|
|
158
|
+
.turbo/
|
|
159
|
+
demo-data/
|
|
160
|
+
*.tsbuildinfo
|
|
161
|
+
pnpm-debug.log*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// https://github.com/DavidAnson/markdownlint#optionsconfig
|
|
2
|
+
// Disabling some rules here as we find them too restrictive.
|
|
3
|
+
{
|
|
4
|
+
"default": true, // Include all rules by defauls
|
|
5
|
+
"line-length": false, // To allow working with soft wraps in editors
|
|
6
|
+
"no-inline-html": {
|
|
7
|
+
// Sometimes we need to use <img> html tags in GitHub markdown,
|
|
8
|
+
// as it doesn't allow setting the image size with markdown tags
|
|
9
|
+
"allowed_elements": ["details", "img"]
|
|
10
|
+
},
|
|
11
|
+
"ul-indent": false, // To allow indenting the whole list to distinguish it visually
|
|
12
|
+
"no-multiple-blanks": false // To allow multiple blank lines between a header and
|
|
13
|
+
// the previous paragraph
|
|
14
|
+
}
|
flowapy-0.1.0/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
|
@@ -0,0 +1,64 @@
|
|
|
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: v4.5.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
exclude: '\.*conda/.*'
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
exclude: '\.txt$|\.tsv$'
|
|
13
|
+
- id: check-case-conflict
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: detect-private-key
|
|
16
|
+
- id: debug-statements
|
|
17
|
+
- id: check-added-large-files
|
|
18
|
+
# Demo fixture PDFs (real published CC-BY papers) run up to ~5MB
|
|
19
|
+
# for figure-heavy articles (Sci Rep, Front Cardiovasc Med); set a
|
|
20
|
+
# 6MB ceiling that fits the current corpus with some headroom.
|
|
21
|
+
args: ["--maxkb=6144"]
|
|
22
|
+
|
|
23
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
24
|
+
rev: v0.38.0
|
|
25
|
+
hooks:
|
|
26
|
+
- id: markdownlint
|
|
27
|
+
# Demo fixture markdown is extracted by the pipeline from real PDFs;
|
|
28
|
+
# it isn't authored content the project owns the style of.
|
|
29
|
+
exclude: ^examples/demo/fixtures/
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/populationgenomics/pre-commits
|
|
32
|
+
rev: "v0.1.3"
|
|
33
|
+
hooks:
|
|
34
|
+
- id: cpg-id-checker
|
|
35
|
+
|
|
36
|
+
# Use the project's pinned tools via uv / pnpm so pre-commit and CI checks
|
|
37
|
+
# match what runs locally — no separate version pinning here.
|
|
38
|
+
- repo: local
|
|
39
|
+
hooks:
|
|
40
|
+
- id: ruff-format
|
|
41
|
+
name: ruff format
|
|
42
|
+
entry: uv run --no-sync ruff format --check src/
|
|
43
|
+
language: system
|
|
44
|
+
pass_filenames: false
|
|
45
|
+
always_run: true
|
|
46
|
+
- id: ruff-check
|
|
47
|
+
name: ruff check
|
|
48
|
+
entry: uv run --no-sync ruff check src/
|
|
49
|
+
language: system
|
|
50
|
+
pass_filenames: false
|
|
51
|
+
always_run: true
|
|
52
|
+
- id: mypy
|
|
53
|
+
name: mypy
|
|
54
|
+
entry: uv run --no-sync mypy src/
|
|
55
|
+
language: system
|
|
56
|
+
pass_filenames: false
|
|
57
|
+
always_run: true
|
|
58
|
+
# markdownlint owns markdown above, so prettier stays out of .md.
|
|
59
|
+
- id: prettier
|
|
60
|
+
name: prettier --check
|
|
61
|
+
entry: pnpm exec prettier --check
|
|
62
|
+
language: system
|
|
63
|
+
files: \.(ts|tsx|js|jsx|mjs|cjs|json|yaml|yml)$
|
|
64
|
+
exclude: ^pnpm-lock\.yaml$
|