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

Check if a journal name starts with the #320

Merged
merged 7 commits into from
Sep 9, 2024
Merged

Conversation

geemi725
Copy link
Contributor

@geemi725 geemi725 commented Sep 7, 2024

Found exceptions where a journal name can start with the in the JournalQualityDB

Now checks the journal name with and without the

Closes #317

@@ -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]
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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!

@whitead
Copy link
Collaborator

whitead commented Sep 7, 2024

Thanks @geemi725! Can you port over the unit test too?

Copy link
Collaborator

@whitead whitead left a 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")
Copy link
Collaborator

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

Suggested change
@pytest.mark.vcr(record_mode="new_episodes")
@pytest.mark.vcr

Copy link
Collaborator

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

@geemi725 geemi725 merged commit 04d9052 into september-2024-release Sep 9, 2024
1 check passed
@jamesbraza jamesbraza deleted the issue-317 branch September 10, 2024 16:00
@whitead whitead mentioned this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants