-
Notifications
You must be signed in to change notification settings - Fork 601
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
Check if a journal name starts with the
#320
Conversation
@@ -44,7 +44,12 @@ async def _process( | |||
# remember, if both have docnames (i.e. key) they are | |||
# wiped and re-generated with resultant data | |||
return doc_details + DocDetails( # type: ignore[call-arg] | |||
source_quality=self.data.get(query.journal.casefold(), -1) # type: ignore[union-attr] |
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!
Thanks @geemi725! Can you port over the unit test too? |
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.
LGTM
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think you need this - I was wrong
@pytest.mark.vcr(record_mode="new_episodes") | |
@pytest.mark.vcr |
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 we should let the VCR config in conftest.py
be the one source of truth. So I vote we do actually commit this change
Found exceptions where a journal name can start with
the
in the JournalQualityDBNow checks the journal name with and without
the
Closes #317