|
1 | 1 | # Makefile for problemreductions |
2 | 2 |
|
3 | | -.PHONY: help build test mcp-test fmt clippy doc mdbook paper clean coverage rust-export compare qubo-testdata export-schemas release run-plan run-issue run-pipeline run-pipeline-forever run-review run-review-forever board-next board-claim board-ack board-move issue-context issue-guards pr-context pr-wait-ci worktree-issue worktree-pr diagrams jl-testdata cli cli-demo copilot-review |
| 3 | +.PHONY: help build test mcp-test fmt clippy doc mdbook paper clean coverage rust-export compare qubo-testdata export-schemas release run-plan run-issue run-pipeline run-pipeline-forever run-review run-review-forever board-next board-claim board-ack board-move issue-context issue-guards pr-context pr-wait-ci worktree-issue worktree-pr diagrams jl-testdata cli cli-demo copilot-review papers papers-lookup papers-download papers-scihub papers-status papers-push papers-pull |
4 | 4 |
|
5 | 5 | RUNNER ?= codex |
6 | 6 | CLAUDE_MODEL ?= opus |
|
51 | 51 | @echo " worktree-pr PR=<number> [REPO=<owner/repo>] - Checkout a PR into an isolated worktree" |
52 | 52 | @echo " copilot-review - Request Copilot code review on current PR" |
53 | 53 | @echo "" |
| 54 | + @echo " papers - Full paper fetch: lookup + download + scihub" |
| 55 | + @echo " papers-lookup - Lookup arxiv/OA URLs for references.bib entries" |
| 56 | + @echo " papers-download - Download available free PDFs" |
| 57 | + @echo " papers-scihub - Fetch remaining papers via Sci-Hub" |
| 58 | + @echo " papers-status - Show paper collection stats" |
| 59 | + @echo "" |
54 | 60 | @echo " Set RUNNER=claude to use Claude instead of Codex (default: codex)" |
55 | 61 | @echo " Override CODEX_MODEL or CLAUDE_MODEL to pick a different model" |
56 | 62 |
|
@@ -593,3 +599,34 @@ copilot-review: |
593 | 599 | @PR=$$(gh pr view --json number --jq .number 2>/dev/null) || { echo "No PR found for current branch"; exit 1; }; \ |
594 | 600 | echo "Requesting Copilot review on PR #$$PR..."; \ |
595 | 601 | gh copilot-review $$PR |
| 602 | + |
| 603 | +# ── Research paper management ────────────────────────────────────── |
| 604 | +# Downloads referenced papers to docs/research/raw/ (gitignored). |
| 605 | +# Manifest in docs/research/manifest.json tracks URLs and sources. |
| 606 | + |
| 607 | +# Full pipeline: lookup URLs, download free PDFs, then try Sci-Hub for the rest |
| 608 | +papers: papers-lookup papers-download papers-scihub papers-status |
| 609 | + |
| 610 | +# Step 1: Find arxiv/OA URLs via Semantic Scholar + arxiv APIs |
| 611 | +papers-lookup: |
| 612 | + python3 scripts/fetch_papers.py lookup |
| 613 | + |
| 614 | +# Step 2: Download papers with known free URLs |
| 615 | +papers-download: |
| 616 | + python3 scripts/fetch_papers.py download |
| 617 | + |
| 618 | +# Step 3: Fetch remaining papers (with DOIs) via Sci-Hub |
| 619 | +papers-scihub: |
| 620 | + python3 scripts/fetch_papers.py scihub |
| 621 | + |
| 622 | +# Step 4: Push PDFs to shared remote (requires rclone + PAPERS_REMOTE env var) |
| 623 | +papers-push: |
| 624 | + python3 scripts/fetch_papers.py push |
| 625 | + |
| 626 | +# Pull PDFs from shared remote (collaborator setup) |
| 627 | +papers-pull: |
| 628 | + python3 scripts/fetch_papers.py pull |
| 629 | + |
| 630 | +# Show current collection stats |
| 631 | +papers-status: |
| 632 | + python3 scripts/fetch_papers.py status |
0 commit comments