forked from 0xWheatyz/SPARC
Document patent PDF volume mount requirement and path assumptions #647
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 — Patent PDF Storage
PDFs are saved to a local
patents/directory. For containerized deployments this path must be a mounted volume, but this is not documented anywhere obvious. Additionally,analyze_single_patentconstructspatents/{patent_id}.pdfand reads from disk without downloading the file first.What to do
docker-compose.ymlcomments) that thepatents/directory must be a persistent volume in productionanalyze_single_patent— Either: (a) add a download step before reading the file if the PDF does not exist locally, or (b) document clearly in the function docstring and API docs that the caller must ensure the PDF is already downloaded. Option (a) is preferred.PATENTS_DIRas an environment variable inconfig.pyso it can be overridden without code changesAcceptance criteria
analyze_single_patentdoes not silently fail when the PDF is missing — it either downloads it or raises a clear, informative errorPATENTS_DIR(or equivalent) is configurable via environment variableClosing as already documented.
README.mdcontains a dedicated 'Patent PDF Storage' section explaining the volume mount requirement (./patents:/app/patents), persistence behavior, and deployment considerations.