forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #622
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 from disk, but does not trigger a download first. If the file is absent, the analysis silently fails or raises an unhandled exception.Roadmap item: P2 > Backend >
analyze_single_patentassumes local file pathWhat to do
patents/{patent_id}.pdf, check whether the file exists.Acceptance criteria
analyze_single_patentfor a patent whose PDF is not cached triggers a download.Closing: already implemented on main.
analyzer.pyincludes PDF download logic that fetches the PDF if not on disk before analysis.