Skip to content

feat: defaults to NoOpProvider#66

Merged
tcarrio merged 3 commits into
mainfrom
tcarrio-patch-1
Dec 28, 2022
Merged

feat: defaults to NoOpProvider#66
tcarrio merged 3 commits into
mainfrom
tcarrio-patch-1

Conversation

@tcarrio

@tcarrio tcarrio commented Dec 27, 2022

Copy link
Copy Markdown
Member

This PR

  • initial provider set to a NoOpProvider
  • ensures a client will always be returned even if a provider has not been explicitly set

Related Issues

Fixes #1234523

Notes

This fixes an issue with spec compliance

Follow-up Tasks

- Tests

How to test

Given you have not set a provider
When you retrieve an OpenFeature client
Then an error will not be raised

ensures a provider will always be returned

Signed-off-by: Tom Carrio <tom@carrio.dev>
Signed-off-by: Tom Carrio <tom@carrio.dev>
@tcarrio

tcarrio commented Dec 27, 2022

Copy link
Copy Markdown
Member Author

Updated tests 👍

@codecov-commenter

codecov-commenter commented Dec 27, 2022

Copy link
Copy Markdown

Codecov Report

Merging #66 (dcd252e) into main (3e2c102) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   92.69%   92.66%   -0.03%     
==========================================
  Files          19       19              
  Lines         342      341       -1     
==========================================
- Hits          317      316       -1     
  Misses         25       25              
Flag Coverage Δ
unittests 92.66% <100.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
open_feature/open_feature_api.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tcarrio

tcarrio commented Dec 27, 2022

Copy link
Copy Markdown
Member Author

The -0.03% test coverage is because I removed code but had the same coverage of that file 😄

Comment thread tests/test_open_feature_api.py Outdated

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one comment but overall looks good.

Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Tom Carrio <tom@carrio.dev>
@tcarrio tcarrio merged commit 9276d35 into main Dec 28, 2022
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
…ure#66)

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@gruebel gruebel deleted the tcarrio-patch-1 branch December 6, 2025 22:12
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.

3 participants