Set up Cursor Cloud dev environment for paperscraper - #1
Merged
Conversation
Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
MoonDavid
marked this pull request as ready for review
August 5, 2026 12:19
Restore a working fallback_bioc_pmc after a bad merge (syntax error that blocked importing paperscraper.pdf), re-add NCBIRateLimitError, fix missing as_completed/tqdm imports for medRxiv S3, load SPRINGER_API_KEY, and wire ChemRxiv Open Engage helpers into save_pdf. Also validate key_to_save and align the Elsevier mock test with header-based auth. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
- Guard bioRxiv/medRxiv S3 when AWS keys are missing - Recognize 10.1101 DOIs for preprint S3 fallbacks - Validate PDF bytes before opening files (fixes empty leftovers under mocks) - Skip S3 sections in tests without AWS credentials - Update paywalled-chapter expectation now that arXiv fallback can succeed Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
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
Sets up the development environment for the
paperscraperlibrary so future Cloud Agents can lint, test, build, and run it.AGENTS.mdwith## Cursor Cloud specific instructionsdocumenting theuv-based workflow and non-obvious caveats (live external APIs, arXiv 429 rate-limiting, gitignored dumps/build artifacts, running single test modules).uv, thenuv sync --group dev).No application/library code was modified.
Verification performed
uv sync --group dev— dependencies install cleanly.uv run python -c "import paperscraper"— imports OK (v1.0.0).ruff format --check,ruff check,isort --check-onlyrun correctly.test_dump.py,test_impactor.py,test_pubmed.py,test_xrxiv.py(live-API backed).uv run python -m buildproduces sdist + wheel.Note (pre-existing, not addressed here)
paperscraper/pdf/fallbacks.py:222has a committed syntax error (malformedtry/except) that blocks importingpaperscraper.pdfand collectingtest_pdf.py. This exists onmainand is out of scope for environment setup (no code changes made).