open-feature / python-sdk

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

feat!: add support for domains #271

Closed federicobond closed 6 months ago

federicobond commented 7 months ago

This PR

Adds support for domains with a minimalist implementation. Feedback is especially welcome around public APIs and backward compatibility issues.

Builds on top of https://github.com/open-feature/python-sdk/pull/270

Related Issues

Refs https://github.com/open-feature/python-sdk/issues/125

Follow-up Tasks

codecov[bot] commented 7 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0ec2b69) 94.40% compared to head (0425a15) 94.52%.

Files Patch % Lines
openfeature/provider/registry.py 95.65% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #271 +/- ## ========================================== + Coverage 94.40% 94.52% +0.11% ========================================== Files 17 18 +1 Lines 447 493 +46 ========================================== + Hits 422 466 +44 - Misses 25 27 +2 ``` | [Flag](https://app.codecov.io/gh/open-feature/python-sdk/pull/271/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/271/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | `94.52% <96.92%> (+0.11%)` | :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 7 months ago

I introduced a ProviderRegistry in the last commit similar to the ones in other SDKs because the code was becoming a bit convoluted.

federicobond commented 7 months ago

Rebased on top of latest main.