forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #141
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?
Context
analyze_single_patentconstructs the pathpatents/{patent_id}.pdfand reads it directly, but does not trigger a download first. If the file is not already present the method fails silently or with a cryptic error.Work
analyze_single_patent, integrate the existing download logic before the file read.ValueErrororFileNotFoundErrorwith a helpful message explaining the prerequisite.Acceptance Criteria
analyze_single_patentwith a patent ID that has no local PDF either (a) downloads the PDF automatically or (b) raises a clear, documented exception.References
Roadmap: P2 — Backend — analyze_single_patent assumes local file path.
Closing: analyze_single_patent now auto-downloads PDFs from cached metadata links. Resolved via PR #55.