Skip to content

Conversation

@jamesbraza
Copy link
Collaborator

This PR also:

  • Expands testing on OpenAlex to cover non-Open Access DOIs
  • Documents not retrying ConnectTimeout

@jamesbraza jamesbraza self-assigned this Nov 4, 2025
Copilot AI review requested due to automatic review settings November 4, 2025 23:49
@jamesbraza jamesbraza added the bug Something isn't working label Nov 4, 2025
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 4, 2025
@dosubot
Copy link

dosubot bot commented Nov 4, 2025

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Nov 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the OpenAlex integration by improving error handling, test coverage, and timeout configuration. The changes address specific timeout issues observed with certain DOIs and add support for distinguishing between DOIs that exist but aren't open access versus DOIs that don't exist in OpenAlex.

  • Updated error handling to specifically catch 404 responses and provide more detailed error messages
  • Extended test coverage to include more OpenAlex scenarios (open access, non-open access, and not found cases)
  • Added timeout configuration to the test client to handle slow API responses

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

File Description
src/paperqa/clients/openalex.py Enhanced error handling to distinguish 404s from other HTTP errors, removed unused import, added comment explaining timeout issues
tests/test_clients.py Expanded test parameters to cover more scenarios (in OpenAlex with/without OA, not in OpenAlex) and added timeout configuration
tests/cassettes/*.yaml Added VCR cassettes for new test cases capturing API responses

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2025
@jamesbraza jamesbraza merged commit 05b1089 into main Nov 5, 2025
7 checks passed
@jamesbraza jamesbraza deleted the retrying-openalex branch November 5, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants