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: implement InMemoryProvider #157

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

federicobond
Copy link
Member

This PR

Implements an in-memory provider that roughly follows @Kavindu-Dodan proposal in open-feature/ofep#71

Notes

A slightly different set of tradeoffs were made regarding the design of the InMemoryFlag object, which should be reviewed carefully. In particular, the State field in the Go implementation was replaced by an explicit Reason which seemed more ergonomic.

@federicobond federicobond force-pushed the feat/in-memory-provider branch 2 times, most recently from 0ba7ae0 to bae09dc Compare July 18, 2023 04:52
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #157 (8288e26) into main (d310bc7) will increase coverage by 0.57%.
The diff coverage is 98.07%.

@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   93.26%   93.83%   +0.57%     
==========================================
  Files          22       23       +1     
  Lines         386      438      +52     
==========================================
+ Hits          360      411      +51     
- Misses         26       27       +1     
Flag Coverage Δ
unittests 93.83% <98.07%> (+0.57%) ⬆️

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

Impacted Files Coverage Δ
open_feature/provider/in_memory_provider.py 98.07% <98.07%> (ø)

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

Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond federicobond added the enhancement New feature or request label Jul 18, 2023
@toddbaert toddbaert self-requested a review July 18, 2023 13:07
Signed-off-by: Federico Bond <federicobond@gmail.com>
Signed-off-by: Federico Bond <federicobond@gmail.com>
@beeme1mr beeme1mr merged commit 5e7bf1f into open-feature:main Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants