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

feat: Add async functionality to providers #413

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

leohoare
Copy link

@leohoare leohoare commented Jan 12, 2025

This PR

Adds the ability for open feature providers to use async methods
It extends the single client and attempts to refactor some code

Related Issues
#284
#383
#385

Follow-up Tasks & TODOS

  • Add tests for async provider and implementation
  • Add documentation and how to implement an async hook

@leohoare leohoare force-pushed the feature/refactor_and_switch_to_single_client branch from c003a56 to 4ec15be Compare January 12, 2025 08:49
Signed-off-by: leohoare <leo@insight.co>
@leohoare leohoare changed the title refactor, switch to single client with common code and fallback Feature: Add async functionality to providers Jan 12, 2025
@leohoare leohoare changed the title Feature: Add async functionality to providers Feat: Add async functionality to providers Jan 12, 2025
@leohoare leohoare changed the title Feat: Add async functionality to providers feat: Add async functionality to providers Jan 12, 2025
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 91.95402% with 14 lines in your changes missing coverage. Please review.

Project coverage is 96.68%. Comparing base (cbace6a) to head (edc6908).

Files with missing lines Patch % Lines
openfeature/client.py 81.42% 13 Missing ⚠️
openfeature/provider/in_memory_provider.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #413      +/-   ##
==========================================
- Coverage   97.54%   96.68%   -0.87%     
==========================================
  Files          31       31              
  Lines        1387     1507     +120     
==========================================
+ Hits         1353     1457     +104     
- Misses         34       50      +16     
Flag Coverage Δ
unittests 96.68% <91.95%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@beeme1mr
Copy link
Member

Hey @leohoare, this looks good so far. Could you please add tests covering async providers with sync client calls and vise versa? Thanks for your hard work on this. 🍻

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.

2 participants