Skip to content

DocMetadataClient can now take instantiated providers and processors #414

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

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

geemi725
Copy link
Contributor

@geemi725 geemi725 commented Sep 14, 2024

  • updated clients to work with instantiated providers and processors
  • retraction test now looks at a stub csv file instead of downloading
  • update RetrationDataPostProcessor -> RetractionDataPostProcessor

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 14, 2024
Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for doing this!

Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 15, 2024
@whitead whitead merged commit 7aa7fda into main Sep 16, 2024
3 of 5 checks passed
@whitead whitead deleted the update_retract_test branch September 16, 2024 01:54
@pytest.mark.asyncio
async def test_crossref_retraction_status():
async with aiohttp.ClientSession() as session:
retract_processor = RetractionDataPostProcessor(
"stub_data/stub_retractions.csv"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay running tests locally after this PR, we are now hitting issues as this is a relative path ungrounded in the system.

Can you move this test to intake the fixture stub_data_dir:

async def test_crossref_retraction_status(stub_data_dir: Path):
    async with aiohttp.ClientSession() as session:
        retract_processor = RetractionDataPostProcessor(
            stub_data_dir / "stub_retractions.csv"
        )
        ...

Also, it looks like this test creates a 163 MB cassette. That is too big. Why is this test making a fixture still, when we are passing in a retractions CSV?

@geemi725 geemi725 restored the update_retract_test branch September 16, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants