forked from 0xWheatyz/SPARC
Document patent PDF volume mount and integrate download step in analyze_single_patent #341
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two related issues exist with patent PDF handling:
analyze_single_patentconstructspatents/{patent_id}.pdfand reads from disk without first downloading the PDF, causing silent failures if the file does not exist.patents/directory with no documented volume mount requirement for containerized deployments.Work
analyze_single_patent(preferred), or add an explicit check with a descriptive error if the file is missing.PATENT_STORAGE_PATHenv var toconfig.pyand use it whereverpatents/is referenced.docker-compose.ymlto mount a named volume at the configured path.Acceptance Criteria
analyze_single_patentwithout a pre-downloaded PDF either downloads it or returns a clear error (not a silent file-not-found crash).patents/directory path is configurable via environment variable.docker-compose.ymlincludes the volume mount.Reference
Roadmap items: P2 Backend — Patent PDF storage; analyze_single_patent assumes local file path.
[Repo Manager] This issue is resolved. analyze_single_patent() already integrates a PDF download step that checks disk first, then falls back to downloading from cached link, and raises FileNotFoundError with clear instructions if neither source is available. docker-compose.yml mounts ./patents:/app/patents, and README.md documents the volume mount requirement for persistent deployments.