Skip to content

Commit

Permalink
Changed email addresses to something less generic (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitead authored Sep 11, 2024
1 parent 5ed7974 commit 3597759
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 38 deletions.
2 changes: 1 addition & 1 deletion paperqa/clients/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions paperqa/clients/unpaywall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '[email protected]')}"
f"{UNPAYWALL_BASE_URL}{doi}"
f"?email={os.environ.get('UNPAYWALL_EMAIL', '[email protected]')}"
),
params={},
session=session,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/cassettes/test_author_matching.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/cassettes/test_bad_dois.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}}'
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_bad_titles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}}'
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions tests/cassettes/test_bulk_doi_search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions tests/cassettes/test_bulk_title_search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_doi_search[paper_attributes0].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_doi_search[paper_attributes1].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_doi_search[paper_attributes2].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/cassettes/test_ensure_sequential_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/cassettes/test_minimal_fields_filtering.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions tests/cassettes/test_odd_client_requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_title_search[paper_attributes0].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_title_search[paper_attributes1].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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":[]}
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/cassettes/test_title_search[paper_attributes2].yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3597759

Please sign in to comment.