Skip to content

feat: implement InMemoryProvider - #157

Merged
beeme1mr merged 3 commits into
open-feature:mainfrom
federicobond:feat/in-memory-provider
Jul 25, 2023
Merged

feat: implement InMemoryProvider#157
beeme1mr merged 3 commits into
open-feature:mainfrom
federicobond:feat/in-memory-provider

Conversation

@federicobond

Copy link
Copy Markdown
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.

Comment threadopen_feature/provider/in_memory_provider.py
@federicobond
federicobondforce-pushed the feat/in-memory-provider branch 2 times, most recently from 0ba7ae0 to bae09dcCompareJuly 18, 2023 04:52
@codecov

codecovBot commented Jul 18, 2023

Copy link
Copy Markdown

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 
FlagCoverage Δ
unittests93.83% <98.07%> (+0.57%)⬆️

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

Impacted FilesCoverage Δ
open_feature/provider/in_memory_provider.py98.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
federicobondforce-pushed the feat/in-memory-provider branch from bae09dc to 4d1b078CompareJuly 18, 2023 05:08
@federicobondfedericobond added the enhancement New feature or request label Jul 18, 2023
@toddbaert
toddbaert self-requested a review July 18, 2023 13:07
Comment threadopen_feature/provider/in_memory_provider.py
Comment threadtests/provider/test_in_memory_provider.py
Comment threadopen_feature/provider/in_memory_provider.py
Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond
federicobondforce-pushed the feat/in-memory-provider branch from a36579b to 77f43f9CompareJuly 18, 2023 18:27
Signed-off-by: Federico Bond <federicobond@gmail.com>
@beeme1mr
beeme1mr merged commit 5e7bf1f into open-feature:mainJul 25, 2023
@github-actionsgithub-actionsBot mentioned this pull request Jul 25, 2023
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
Forcing a new release after fixing the publishing error.
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@federicobond@beeme1mr@Kavindu-Dodan@tcarrio@toddbaert