Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36576ad38e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| input_path = str(arguments.get("input") or "").strip() | ||
| output_dir = str(arguments.get("output_dir") or "").strip() | ||
| if not input_path or not output_dir: | ||
| return _tool_result("paper2any_run_cli requires input and output_dir", arguments, is_error=True) | ||
| requested_output_dir = Path(output_dir).expanduser().resolve() |
There was a problem hiding this comment.
Resolve input path before running Paper2Any CLI workflow
paper2any_run_cli keeps input as a raw string while resolving output_dir, then runs the script with cwd=root. When callers pass a relative input path (as shown in the new docs examples), that path is interpreted relative to the Paper2Any checkout instead of the caller’s working directory, so valid files like workspace/.../paper.pdf fail with file-not-found unless the user supplies an absolute path. Normalize input to an absolute path (or otherwise preserve caller-relative semantics) before building the subprocess command.
Useful? React with 👍 / 👎.
Summary
scholaraio paper2any setup,mcp-serve,backend-serve,status,tools, andcallso agents can configure and run real Paper2Any without vendoring upstream code into ScholarAIO.data/runtime/extensions/paper2any/Paper2Any, adds the Paper2Any skill/docs/config surface, and covers all known upstream CLI/API workflow families.Test Plan
python -m ruff check scholaraio testspython -m ruff format --check scholaraio testspython -m pytest -q -p no:cacheproviderpython -m mkdocs build --strictscholaraio paper2any backend-serveagainst the real Paper2Any checkout and verified/healthreturned{"status":"ok"}.pdf2pptandimage2pptproduced real PPTX artifacts; key-gated workflows failed at upstream credential/system-dependency boundaries rather than fake outputs.Notes
This PR intentionally keeps the ScholarAIO code lightweight. Multipart/file-upload Paper2Any API routes are not rewrapped in ScholarAIO; file-based workflows should use
paper2any_run_cli, while JSON backend routes can usepaper2any_call_api.Closes #64