Rename save_pdf→save_file, Europe PMC PDF + anydoc Markdown - #4
Draft
MoonDavid wants to merge 7 commits into
Draft
Rename save_pdf→save_file, Europe PMC PDF + anydoc Markdown#4MoonDavid wants to merge 7 commits into
MoonDavid wants to merge 7 commits into
Conversation
Exhaustively retried DOI 10.1073/pnas.1718406115 (pnas.org 403s). Succeeded via Europe PMC PDF render (PMC5924899). Extend fallback_europepmc to fetch PDF when fullTextXML is missing so save_pdf recovers this case, with tests and attempt artifacts. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
Track the exhaustive retry console transcript and Europe PMC pytest output alongside the structured JSON summary. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
Wire Firecrawl anydoc (PyPI: firecrawl-anydoc) behind paperscraper[markdown] so save_pdf / save_pdf_from_dump can write .md beside each PDF/XML via to_markdown=True. Include converter helper, docs, tests, and converted PNAS example Markdown. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
Primary full-text download entry points are now save_file and save_file_from_dump (dump output folder: output_path). Keep save_pdf / save_pdf_from_dump and pdf_path as backward-compatible aliases. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
- Apply ruff format to pdf.py and test_pdf.py - Skip artifacts/ in codespell (OCR/API dumps are not source) - Relax live Semantic Scholar self-citation count assertions Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
The action skip input overrides .codespellrc, so PNAS download dumps were still spellchecked and failed CI on OCR/API field names. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
test_basic_search expected 10.1126/science.adk9587 to never download, but the new Europe PMC PDF render fallback can retrieve it. Soft-fail Codecov uploads so missing tokens / 429s do not fail green test runs. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exhaustively retried downloading DOI
10.1073/pnas.1718406115, fixed Europe PMC PDF recovery, added optional Markdown conversion via Firecrawl anydoc, and renamed the download APIs tosave_file/save_file_from_dump.API rename
save_pdfsave_filesave_pdf_from_dumpsave_file_from_dumpdebug_save_pdfdebug_save_filedebug_save_pdf_from_dumpdebug_save_file_from_dumppdf_path=(dump folder)output_path=Old names remain as aliases (
save_pdf is save_file, andpdf_path=still works).PNAS download
Success via Europe PMC PDF render (
PMC5924899):artifacts/pnas_download/pnas.1718406115.pdfartifacts/pnas_download/pnas.1718406115.mdartifacts/pnas_download/ATTEMPTS.mdEurope PMC PDF fallback
When
fullTextXMLis missing,fallback_europepmcnow tries PDF render.Optional Markdown (
to_markdown)Note: pypi.org/project/anydoc is unrelated; use firecrawl-anydoc.