forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before attempting local read #315
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 a pathpatents/{patent_id}.pdfand reads from disk, but does not first download the PDF. Callers that have not separately downloaded the file receive aFileNotFoundError.Work Required
analyze_single_patentand the PDF download logic (likely inserp_api.pyor a utility function)patents/{patent_id}.pdfdoes not exist, download it before parsingFileNotFoundError)ValueErrorwith instructionsAcceptance Criteria
analyze_single_patenton a patent whose PDF has not been pre-downloaded either downloads it automatically or raises a clear error message explaining the prerequisiteThis issue has already been resolved in the fork's main branch. Already implemented in PR #55 (fix: auto-download patent PDF in analyze_single_patent). See SPARC/analyzer.py.
Closing as completed.