fix: decouple Python venv setup from npm install postinstall

The three Python services (PatientDataExtractorService, PaymentOCRService,
SeleniumService) provisioned their venvs via postinstall, chained into
root's own postinstall. A failure in any one of them aborted the whole
npm install, which could leave unrelated Node deps (e.g. Backend's sharp)
uninstalled — silently breaking the app with no indication why.

Renamed each service's postinstall to an explicit "setup" script, added a
root "npm run setup:python" to run all three, and documented it as its
own step in the README instead of an automatic install-time side effect.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ff
2026-07-31 10:49:06 -04:00
co-authored by Claude Sonnet 5
parent 55d798b45f
commit 9885a3d35b
6 changed files with 16 additions and 12 deletions
+2 -1
View File
@@ -13,7 +13,8 @@
"db:seed": "npx ts-node packages/db/prisma/seed.ts",
"db:studio": "npx prisma studio --config=packages/db/prisma/prisma.config.ts",
"setup:env": "shx cp packages/db/prisma/.env.example packages/db/prisma/.env && shx cp apps/Frontend/.env.example apps/Frontend/.env && shx cp apps/Backend/.env.example apps/Backend/.env && shx cp apps/PatientDataExtractorService/.env.example apps/PatientDataExtractorService/.env && shx cp apps/SeleniumService/.env.example apps/SeleniumService/.env && shx cp apps/PaymentOCRService/.env.example apps/PaymentOCRService/.env",
"postinstall": "npm --prefix apps/PatientDataExtractorService run postinstall && npm --prefix apps/PaymentOCRService run postinstall && bash scripts/install-rclone.sh"
"setup:python": "npm run setup --workspace=apps/PatientDataExtractorService && npm run setup --workspace=apps/PaymentOCRService && npm run setup --workspace=apps/SeleniumService",
"postinstall": "bash scripts/install-rclone.sh"
},
"prisma": {
"seed": "ts-node packages/db/prisma/seed.ts"