-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: enhanced async client usage #187
Conversation
Reviewer's Guide by SourceryThis pull request enhances the usage of async clients in the project by introducing a shared httpx.AsyncClient instance and updating the codebase to use it consistently. The changes improve the efficiency of HTTP requests and ensure proper resource management. File-Level Changes
Tips
|
Quality Gate passedIssues Measures |
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.
Hey @TeKrop - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Summary by Sourcery
Enhance the codebase by adopting
httpx.AsyncClient
for asynchronous HTTP requests across parsers, handlers, and tests. Refactor tests to utilize a sharedTestClient
fixture for FastAPI route testing, and improve dependency management in theplayers.py
router.Enhancements:
httpx.AsyncClient
instead ofoverfast_client
for HTTP requests.NamecardParser
,PlayerParser
,PlayerCareerParser
,PlayerStatsSummaryParser
, andHeroParser
to accept anhttpx.AsyncClient
instance for making HTTP requests.check_new_hero.py
script to use asynchronous HTTP requests withhttpx.AsyncClient
.APIParser
andAPIRequestHandler
classes to use a sharedhttpx.AsyncClient
instance for HTTP requests.players.py
router usingAnnotated
andDepends
.Tests:
conftest.py
file to provide aTestClient
fixture for testing FastAPI routes.client
fixture for making HTTP requests.