-
Notifications
You must be signed in to change notification settings - Fork 749
Check if a journal name starts with the
#320
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
Changes from all commits
5aa213e
6238225
17e3d72
c2c7a20
bb537f3
d653d9b
f838f7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -299,7 +299,7 @@ async def test_s2_only_fields_filtering(): | |||||
assert not s2_details.source_quality, "No source quality data should exist" # type: ignore[union-attr] | ||||||
|
||||||
|
||||||
@pytest.mark.vcr | ||||||
@pytest.mark.vcr(record_mode="new_episodes") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should let the VCR config in |
||||||
@pytest.mark.asyncio | ||||||
async def test_crossref_journalquality_fields_filtering(): | ||||||
async with aiohttp.ClientSession() as session: | ||||||
|
@@ -327,6 +327,23 @@ async def test_crossref_journalquality_fields_filtering(): | |||||
"doi:10.1038/s42256-024-00832-8." | ||||||
), "Citation should be populated" | ||||||
|
||||||
async with aiohttp.ClientSession() as session: | ||||||
crossref_client = DocMetadataClient( | ||||||
session, | ||||||
clients=cast( | ||||||
Collection[ | ||||||
type[MetadataPostProcessor[Any]] | type[MetadataProvider[Any]] | ||||||
], | ||||||
[CrossrefProvider, JournalQualityPostProcessor], | ||||||
), | ||||||
) | ||||||
nejm_crossref_details = await crossref_client.query( | ||||||
title="Beta-Blocker Interruption or Continuation after Myocardial Infarction", # codespell:ignore | ||||||
fields=["title", "doi", "authors", "journal"], | ||||||
) | ||||||
|
||||||
assert nejm_crossref_details.source_quality == 3, "Should have source quality data" # type: ignore[union-attr] | ||||||
|
||||||
|
||||||
@pytest.mark.vcr | ||||||
@pytest.mark.asyncio | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using
casefold
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so? just to be more robust with journal names. @mskarlin thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup that's what we've been using on title comparisons!