Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds openalex client as a default client #555

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

nadolskit
Copy link
Contributor

** Summary of Changes **

  • Adds new default client "OpenAlex"
    • Externalizes BIB_MAPPING out of crossref client for both clients to use
    • Misc utils to support OpenAlex response data into our infrastructure
  • New cassettes

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Oct 9, 2024
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/clients/openalex.py Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/clients/crossref.py Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
paperqa/utils.py Outdated Show resolved Hide resolved
tests/test_clients.py Outdated Show resolved Hide resolved
uv.lock Outdated Show resolved Hide resolved
paperqa/utils.py Outdated Show resolved Hide resolved
paperqa/types.py Outdated Show resolved Hide resolved
paperqa/clients/shared_dicts.py Outdated Show resolved Hide resolved
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
…ove bibtext_mapping with comment, update imports, add comment and example of openalex link
paperqa/clients/openalex.py Outdated Show resolved Hide resolved
Parsed document details.
"""
authors = [
authorship.get("raw_author_name")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This .get if it returns None, won't the reformat_name blow up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right -- I was thinking this could never be None so I didn't put much thought into it originally. but it's safer regardless.

Added some safeguards. lmk

paperqa/clients/openalex.py Show resolved Hide resolved
paperqa/utils.py Outdated Show resolved Hide resolved
paperqa/utils.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants