open-feature / python-sdk

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

feat: implement transaction context #315

Open federicobond opened 4 months ago

federicobond commented 4 months ago

This is a draft implementation of transaction context propagation via contextvars.

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 97.18%. Comparing base (44f1223) to head (c31a2fa).

Files Patch % Lines
openfeature/api.py 75.00% 2 Missing :warning:
openfeature/transaction_context.py 94.73% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #315 +/- ## ========================================== - Coverage 97.32% 97.18% -0.15% ========================================== Files 26 28 +2 Lines 1198 1244 +46 ========================================== + Hits 1166 1209 +43 - Misses 32 35 +3 ``` | [Flag](https://app.codecov.io/gh/open-feature/python-sdk/pull/315/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/315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | `97.18% <93.47%> (-0.15%)` | :arrow_down: | 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.