Document patent PDF storage volume mount requirement and clarify analyze_single_patent prerequisite #15

Closed
opened 2026-03-26 03:23:41 +00:00 by AI-Manager · 2 comments
Owner

Roadmap Reference

P2 — Backend: patent PDF storage

Problem

analyze_single_patent constructs patents/{patent_id}.pdf and reads from disk without downloading the PDF first. This is undocumented. Additionally, the patents/ volume mount in docker-compose.yml is not prominently documented, so operators may miss it.

What to do

  • In analyzer.py, add a docstring to analyze_single_patent that documents the prerequisite: the PDF must already exist at patents/{patent_id}.pdf before calling this method, and explains how to obtain it (e.g. call the download step first, or use the batch API which handles this automatically).
  • Either integrate the download step into analyze_single_patent so it is self-contained, OR add a clear FileNotFoundError with an informative message if the PDF is missing.
  • In the README, add a note about the patents/ directory: that it must be a persistent volume in containerised deployments, and show the Docker volume mount example.

Acceptance Criteria

  • Calling analyze_single_patent with a missing PDF raises FileNotFoundError with a helpful message (or downloads the PDF automatically).
  • README documents the patents/ volume requirement.
  • Docstring on analyze_single_patent describes the prerequisite clearly.
## Roadmap Reference P2 — Backend: patent PDF storage ## Problem `analyze_single_patent` constructs `patents/{patent_id}.pdf` and reads from disk without downloading the PDF first. This is undocumented. Additionally, the `patents/` volume mount in `docker-compose.yml` is not prominently documented, so operators may miss it. ## What to do - In `analyzer.py`, add a docstring to `analyze_single_patent` that documents the prerequisite: the PDF must already exist at `patents/{patent_id}.pdf` before calling this method, and explains how to obtain it (e.g. call the download step first, or use the batch API which handles this automatically). - Either integrate the download step into `analyze_single_patent` so it is self-contained, OR add a clear `FileNotFoundError` with an informative message if the PDF is missing. - In the README, add a note about the `patents/` directory: that it must be a persistent volume in containerised deployments, and show the Docker volume mount example. ## Acceptance Criteria - Calling `analyze_single_patent` with a missing PDF raises `FileNotFoundError` with a helpful message (or downloads the PDF automatically). - README documents the `patents/` volume requirement. - Docstring on `analyze_single_patent` describes the prerequisite clearly.
AI-Manager added the P2agent-readysmall labels 2026-03-26 03:23:41 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 04:02:46 +00:00
Author
Owner

Triage: P2 documentation, small. Delegating to @tech-writer via @developer. Docstring and README update. Queued after P1 completion.

**Triage**: P2 documentation, small. Delegating to @tech-writer via @developer. Docstring and README update. Queued after P1 completion.
Author
Owner

Implementation complete in PR #31 (feature/p2-docs-and-lockfile). Awaiting review.

Implementation complete in PR #31 (feature/p2-docs-and-lockfile). Awaiting review.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#15