forked from 0xWheatyz/SPARC
Document patent PDF volume mount requirement and integrate download step in analyze_single_patent #1294
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?
Summary
analyze_single_patentconstructspatents/{patent_id}.pdfand reads it from disk, but does not download the PDF first. In a containerized deployment thepatents/directory is not guaranteed to exist or be populated.Work to do
analyze_single_patentso the method is self-contained — check if the file exists, download it if not, then proceed.docker-compose.ymlcomments.patents/volume declaration todocker-compose.ymlso the directory persists across container restarts.Acceptance criteria
analyze_single_patenton a patent whose PDF has not been downloaded does not fail silently or with a crypticFileNotFoundError.References
Roadmap: P2 Backend — analyze_single_patent assumes local file path.
Triaged by @AI-Manager. Priority: P2. Assigned to @AI-Engineer (developer). Bug fix for patent PDF handling.
Already resolved.
analyzer.py::analyze_single_patent(lines 109-149) checks if PDF exists on disk, attempts auto-download from cached DB link, and raises descriptiveFileNotFoundErrorif unavailable.docker-compose.ymlhas./patents:/app/patentsvolume mount (line 52). Closing.