diff --git a/paperqa/clients/crossref.py b/paperqa/clients/crossref.py index 77a62c46..9e1d9b04 100644 --- a/paperqa/clients/crossref.py +++ b/paperqa/clients/crossref.py @@ -115,7 +115,7 @@ def get_crossref_mailto() -> str: "CROSSREF_MAILTO environment variable not set. Crossref API rate limits may" " apply." ) - return "test@example.com" + return "example@papercrow.ai" return MAILTO diff --git a/paperqa/clients/unpaywall.py b/paperqa/clients/unpaywall.py index c275e6c6..297cd0bf 100644 --- a/paperqa/clients/unpaywall.py +++ b/paperqa/clients/unpaywall.py @@ -87,7 +87,8 @@ async def get_doc_details( **( await _get_with_retrying( url=( - f"{UNPAYWALL_BASE_URL}{doi}?email={os.environ.get('UNPAYWALL_EMAIL', 'test@example.com')}" + f"{UNPAYWALL_BASE_URL}{doi}" + f"?email={os.environ.get('UNPAYWALL_EMAIL', 'example@papercrow.ai')}" ), params={}, session=session, @@ -119,7 +120,7 @@ async def search_by_title( await _get_with_retrying( url=( f"{UNPAYWALL_BASE_URL}search?query={quote(query)}" - f"&email={os.environ.get('UNPAYWALL_EMAIL', 'test@example.com')}" + f"&email={os.environ.get('UNPAYWALL_EMAIL', 'example@papercrow.ai')}" ), params={}, session=session, diff --git a/tests/cassettes/test_author_matching.yaml b/tests/cassettes/test_author_matching.yaml index 05d2fa6a..e3d95749 100644 --- a/tests/cassettes/test_author_matching.yaml +++ b/tests/cassettes/test_author_matching.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&query.author=Jack+NoScience&select=DOI,author,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&query.author=Jack+NoScience&select=DOI,author,title response: body: string: diff --git a/tests/cassettes/test_bad_dois.yaml b/tests/cassettes/test_bad_dois.yaml index 97f6f7e4..2f1f0e52 100644 --- a/tests/cassettes/test_bad_dois.yaml +++ b/tests/cassettes/test_bad_dois.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=abs12032jsdafn&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=abs12032jsdafn&rows=1 response: body: string: '{"status":"ok","message-type":"work-list","message-version":"1.0.0","message":{"facets":{},"total-results":0,"items":[],"items-per-page":1,"query":{"start-index":0,"search-terms":null}}}' diff --git a/tests/cassettes/test_bad_titles.yaml b/tests/cassettes/test_bad_titles.yaml index 578c9812..c3b37088 100644 --- a/tests/cassettes/test_bad_titles.yaml +++ b/tests/cassettes/test_bad_titles.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=askldjrq3rjaw938h&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=askldjrq3rjaw938h&rows=1 response: body: string: '{"status":"ok","message-type":"work-list","message-version":"1.0.0","message":{"facets":{},"total-results":0,"items":[],"items-per-page":1,"query":{"start-index":0,"search-terms":null}}}' @@ -147,7 +147,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+study&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+study&rows=1 response: body: string: diff --git a/tests/cassettes/test_bulk_doi_search.yaml b/tests/cassettes/test_bulk_doi_search.yaml index 39e75290..2ed88eb2 100644 --- a/tests/cassettes/test_bulk_doi_search.yaml +++ b/tests/cassettes/test_bulk_doi_search.yaml @@ -361,7 +361,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1063%2F1.4938384?mailto=test@example.com + uri: https://api.crossref.org/works/10.1063%2F1.4938384?mailto=example@papercrow.ai response: body: string: @@ -501,7 +501,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1038%2Fs42256-024-00832-8?mailto=test@example.com + uri: https://api.crossref.org/works/10.1038%2Fs42256-024-00832-8?mailto=example@papercrow.ai response: body: string: @@ -860,7 +860,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1023%2Fa:1007154515475?mailto=test@example.com + uri: https://api.crossref.org/works/10.1023%2Fa:1007154515475?mailto=example@papercrow.ai response: body: string: @@ -909,7 +909,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=test@example.com + uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=example@papercrow.ai response: body: string: @@ -964,7 +964,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.48550%2Farxiv.2312.07559?mailto=test@example.com + uri: https://api.crossref.org/works/10.48550%2Farxiv.2312.07559?mailto=example@papercrow.ai response: body: string: Resource not found. @@ -1005,7 +1005,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1101%2F2024.04.01.587366?mailto=test@example.com + uri: https://api.crossref.org/works/10.1101%2F2024.04.01.587366?mailto=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_bulk_title_search.yaml b/tests/cassettes/test_bulk_title_search.yaml index 781d2988..825fb619 100644 --- a/tests/cassettes/test_bulk_title_search.yaml +++ b/tests/cassettes/test_bulk_title_search.yaml @@ -63,7 +63,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=PaperQA:+Retrieval-Augmented+Generative+Agent+for+Scientific+Research&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=PaperQA:+Retrieval-Augmented+Generative+Agent+for+Scientific+Research&rows=1 response: body: string: @@ -259,7 +259,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1 response: body: string: @@ -671,7 +671,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Convalescent-anti-sars-cov-2-plasma/immune-globulin&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Convalescent-anti-sars-cov-2-plasma/immune-globulin&rows=1 response: body: string: @@ -909,7 +909,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=High-throughput+screening+of+human+genetic+variants+by+pooled+prime+editing&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=High-throughput+screening+of+human+genetic+variants+by+pooled+prime+editing&rows=1 response: body: string: @@ -1044,7 +1044,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=An+essential+role+of+active+site+arginine+residue+in+iodide+binding+and+histidine+residue+in+electron+transfer+for+iodide+oxidation+by+horseradish+peroxidase&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=An+essential+role+of+active+site+arginine+residue+in+iodide+binding+and+histidine+residue+in+electron+transfer+for+iodide+oxidation+by+horseradish+peroxidase&rows=1 response: body: string: @@ -1172,7 +1172,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+reactive+molecular+dynamics+study&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+reactive+molecular+dynamics+study&rows=1 response: body: string: diff --git a/tests/cassettes/test_crossref_journalquality_fields_filtering.yaml b/tests/cassettes/test_crossref_journalquality_fields_filtering.yaml index 633328e0..6cf0b910 100644 --- a/tests/cassettes/test_crossref_journalquality_fields_filtering.yaml +++ b/tests/cassettes/test_crossref_journalquality_fields_filtering.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,author,container-title,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,author,container-title,title response: body: string: diff --git a/tests/cassettes/test_doi_search[paper_attributes0].yaml b/tests/cassettes/test_doi_search[paper_attributes0].yaml index 6b1867f9..7b50cd94 100644 --- a/tests/cassettes/test_doi_search[paper_attributes0].yaml +++ b/tests/cassettes/test_doi_search[paper_attributes0].yaml @@ -62,7 +62,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1101%2F2024.04.01.587366?mailto=test@example.com + uri: https://api.crossref.org/works/10.1101%2F2024.04.01.587366?mailto=example@papercrow.ai response: body: string: @@ -154,7 +154,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/10.1101/2024.04.01.587366?email=test@example.com + uri: https://api.unpaywall.org/v2/10.1101/2024.04.01.587366?email=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_doi_search[paper_attributes1].yaml b/tests/cassettes/test_doi_search[paper_attributes1].yaml index d31d9bf0..e4dd4abe 100644 --- a/tests/cassettes/test_doi_search[paper_attributes1].yaml +++ b/tests/cassettes/test_doi_search[paper_attributes1].yaml @@ -66,7 +66,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1023%2Fa:1007154515475?mailto=test@example.com + uri: https://api.crossref.org/works/10.1023%2Fa:1007154515475?mailto=example@papercrow.ai response: body: string: @@ -159,7 +159,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/10.1023/a:1007154515475?email=test@example.com + uri: https://api.unpaywall.org/v2/10.1023/a:1007154515475?email=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_doi_search[paper_attributes2].yaml b/tests/cassettes/test_doi_search[paper_attributes2].yaml index bd5530e3..0131f874 100644 --- a/tests/cassettes/test_doi_search[paper_attributes2].yaml +++ b/tests/cassettes/test_doi_search[paper_attributes2].yaml @@ -57,7 +57,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/10.1007/s40278-023-41815-2?email=test@example.com + uri: https://api.unpaywall.org/v2/10.1007/s40278-023-41815-2?email=example@papercrow.ai response: body: string: @@ -106,7 +106,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=test@example.com + uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_ensure_sequential_run.yaml b/tests/cassettes/test_ensure_sequential_run.yaml index cbccb764..a12657de 100644 --- a/tests/cassettes/test_ensure_sequential_run.yaml +++ b/tests/cassettes/test_ensure_sequential_run.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.48550%2Farxiv.2312.07559?mailto=test@example.com + uri: https://api.crossref.org/works/10.48550%2Farxiv.2312.07559?mailto=example@papercrow.ai response: body: string: Resource not found. diff --git a/tests/cassettes/test_minimal_fields_filtering.yaml b/tests/cassettes/test_minimal_fields_filtering.yaml index b9b07b94..e3b577be 100644 --- a/tests/cassettes/test_minimal_fields_filtering.yaml +++ b/tests/cassettes/test_minimal_fields_filtering.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title response: body: string: diff --git a/tests/cassettes/test_odd_client_requests.yaml b/tests/cassettes/test_odd_client_requests.yaml index 64343ece..c137fa98 100644 --- a/tests/cassettes/test_odd_client_requests.yaml +++ b/tests/cassettes/test_odd_client_requests.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&query.author=Andres+M.+Bran+Sam+Cox&select=DOI,author,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&query.author=Andres+M.+Bran+Sam+Cox&select=DOI,author,title response: body: string: @@ -146,7 +146,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title response: body: string: @@ -279,7 +279,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1&select=DOI,title response: body: string: @@ -458,7 +458,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=test@example.com + uri: https://api.crossref.org/works/10.1007%2Fs40278-023-41815-2?mailto=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_title_search[paper_attributes0].yaml b/tests/cassettes/test_title_search[paper_attributes0].yaml index 3e55c513..4f3b1e10 100644 --- a/tests/cassettes/test_title_search[paper_attributes0].yaml +++ b/tests/cassettes/test_title_search[paper_attributes0].yaml @@ -62,7 +62,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+reactive+molecular+dynamics+study&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Effect+of+native+oxide+layers+on+copper+thin-film+tensile+properties:+A+reactive+molecular+dynamics+study&rows=1 response: body: string: @@ -249,7 +249,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/search?query=Effect%20of%20native%20oxide%20layers%20on%20copper%20thin-film%20tensile%20properties:%20A%20reactive%20molecular%20dynamics%20study&email=test@example.com + uri: https://api.unpaywall.org/v2/search?query=Effect%20of%20native%20oxide%20layers%20on%20copper%20thin-film%20tensile%20properties:%20A%20reactive%20molecular%20dynamics%20study&email=example@papercrow.ai response: body: string: diff --git a/tests/cassettes/test_title_search[paper_attributes1].yaml b/tests/cassettes/test_title_search[paper_attributes1].yaml index 64475d25..3973edff 100644 --- a/tests/cassettes/test_title_search[paper_attributes1].yaml +++ b/tests/cassettes/test_title_search[paper_attributes1].yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/search?query=PaperQA:%20Retrieval-Augmented%20Generative%20Agent%20for%20Scientific%20Research&email=test@example.com + uri: https://api.unpaywall.org/v2/search?query=PaperQA:%20Retrieval-Augmented%20Generative%20Agent%20for%20Scientific%20Research&email=example@papercrow.ai response: body: string: '{"elapsed_seconds":0.018,"results":[]} @@ -41,7 +41,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=PaperQA:+Retrieval-Augmented+Generative+Agent+for+Scientific+Research&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=PaperQA:+Retrieval-Augmented+Generative+Agent+for+Scientific+Research&rows=1 response: body: string: diff --git a/tests/cassettes/test_title_search[paper_attributes2].yaml b/tests/cassettes/test_title_search[paper_attributes2].yaml index 2a4a06ee..fa3c5b27 100644 --- a/tests/cassettes/test_title_search[paper_attributes2].yaml +++ b/tests/cassettes/test_title_search[paper_attributes2].yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.crossref.org/works?mailto=test@example.com&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1 + uri: https://api.crossref.org/works?mailto=example@papercrow.ai&query.title=Augmenting+large+language+models+with+chemistry+tools&rows=1 response: body: string: @@ -362,7 +362,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.unpaywall.org/v2/search?query=Augmenting%20large%20language%20models%20with%20chemistry%20tools&email=test@example.com + uri: https://api.unpaywall.org/v2/search?query=Augmenting%20large%20language%20models%20with%20chemistry%20tools&email=example@papercrow.ai response: body: string: