Skip to content

Set up Cursor Cloud dev environment for paperscraper - #1

Merged
MoonDavid merged 4 commits into
mainfrom
cursor/setup-dev-environment-c31f
Aug 5, 2026
Merged

Set up Cursor Cloud dev environment for paperscraper#1
MoonDavid merged 4 commits into
mainfrom
cursor/setup-dev-environment-c31f

Conversation

@MoonDavid

Copy link
Copy Markdown
Owner

Summary

Sets up the development environment for the paperscraper library so future Cloud Agents can lint, test, build, and run it.

  • Adds AGENTS.md with ## Cursor Cloud specific instructions documenting the uv-based workflow and non-obvious caveats (live external APIs, arXiv 429 rate-limiting, gitignored dumps/build artifacts, running single test modules).
  • Registers a minimal startup update script (installs uv, then uv 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).
  • Lint: ruff format --check, ruff check, isort --check-only run correctly.
  • Tests: 29 passing across test_dump.py, test_impactor.py, test_pubmed.py, test_xrxiv.py (live-API backed).
  • Build: uv run python -m build produces sdist + wheel.
  • Hello-world: live PubMed + arXiv searches dumped to JSONL.

Note (pre-existing, not addressed here)

paperscraper/pdf/fallbacks.py:222 has a committed syntax error (malformed try/except) that blocks importing paperscraper.pdf and collecting test_pdf.py. This exists on main and is out of scope for environment setup (no code changes made).

Open in Web Open in Cursor 

Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
@MoonDavid
MoonDavid marked this pull request as ready for review August 5, 2026 12:19
cursoragent and others added 3 commits August 5, 2026 12:32
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>
@MoonDavid
MoonDavid merged commit 225c2b9 into main Aug 5, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants