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: defaults to NoOpProvider #66

Merged
merged 3 commits into from
Dec 28, 2022
Merged

feat: defaults to NoOpProvider #66

merged 3 commits into from
Dec 28, 2022

Conversation

tcarrio
Copy link
Member

@tcarrio tcarrio commented Dec 27, 2022

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
Copy link
Member Author

tcarrio commented Dec 27, 2022

Updated tests 👍

@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2022

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
Copy link
Member Author

tcarrio commented Dec 27, 2022

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

Copy link
Member

@beeme1mr beeme1mr left a comment

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
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