open-feature / python-sdk

Python SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
47 stars 16 forks source link

feat: update provider status when provider emits events #309

Closed federicobond closed 4 months ago

federicobond commented 4 months ago

I also made openfeature.provider.registry a private module and moved the registry singleton inside it.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 96.15385% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 97.58%. Comparing base (faf02a9) to head (9aa8a75).

Files Patch % Lines
openfeature/provider/_registry.py 88.88% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #309 +/- ## ========================================== + Coverage 97.10% 97.58% +0.47% ========================================== Files 27 27 Lines 1176 1202 +26 ========================================== + Hits 1142 1173 +31 + Misses 34 29 -5 ``` | [Flag](https://app.codecov.io/gh/open-feature/python-sdk/pull/309/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-feature/python-sdk/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | `97.58% <96.15%> (+0.47%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

federicobond commented 4 months ago

@gruebel found a couple of bugs with the event logic around provider initialization/shutdown, all new changes are in the latest commit.

gruebel commented 4 months ago

@federicobond new changes look good 🙂