forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #1506
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
Roadmap item: P2 Backend — analyze_single_patent prerequisite
analyze_single_patentconstructs the pathpatents/{patent_id}.pdfand reads from disk, but does not first download the PDF. If the file is absent (e.g. first-time analysis), the call fails silently or raises an unhandled file-not-found error.What to do
analyze_single_patent, check whetherpatents/{patent_id}.pdfexists.Acceptance criteria
analyze_single_patentdownloads the PDF if it is not already on disk[Repo Manager] This issue is already resolved.
analyzer.py:analyze_single_patent()checks if the PDF exists on disk, and if not, looks up the cached PDF link from the database and downloads it automatically before reading. Closing as complete.