Skip to content

Conversation

@jbrry
Copy link
Collaborator

@jbrry jbrry commented Aug 8, 2025

Summary 📝

I wanted to run SemanticScholarSearchTool as a standalone tool and noticed it was missing a test. This PR tests the general search functionality (arun) and the specific paper lookup by external ID (fetch_paper_by_external_id), using API calls.

Details

Added new test file: tests/tools/semantic_scholar_search_test.py to house tests for the SemanticScholarSearchTool.

Main search method: test_arun to perform a test of the keyword search functionality. This test confirms that the tool can successfully query the API and parse the results into the SemanticScholarSearchToolOutputSchema.

External id lookup test: test_fetch_paper_by_external_id to validate the specific paper lookup feature.

Usage

pytest -v tests/tools/semantic_scholar_search_test.py   

@NISH1001
Copy link
Collaborator

NISH1001 commented Aug 8, 2025

@jbrry Thanks for the PR. Can we get a full test coverage.

Run the following

python -m pytest --cov=akd  --cov-report=term-missing tests/

Some example PRs:


@movinam
Copy link
Collaborator

movinam commented Aug 20, 2025

@jbrry Is this PR a duplicate? I see the test here in #79 as well

@jbrry
Copy link
Collaborator Author

jbrry commented Aug 20, 2025

@jbrry Is this PR a duplicate? I see the test here in #79 as well

Yes I actually added this test as I wanted to figure out Semantic Scholar in more detail, before I ran the DeepLitSearchAgent. I wanted clean contexts for indexing, I figured it was slightly related to that PR, so merged it there. I can close this one!

@jbrry jbrry closed this Aug 20, 2025
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.

4 participants