Skip to content

refactor!: move api evaluation context methods to api module#164

Merged
federicobond merged 2 commits into
open-feature:mainfrom
federicobond:pythonic-api-1
Aug 31, 2023
Merged

refactor!: move api evaluation context methods to api module#164
federicobond merged 2 commits into
open-feature:mainfrom
federicobond:pythonic-api-1

Conversation

@federicobond

@federicobond federicobond commented Aug 31, 2023

Copy link
Copy Markdown
Member

Changes the import path for evaluation context methods from:

from open_feature.open_feature_evaluation_context import api_evaluation_context, set_api_evaluation_context

To:

from open_feature.open_feature_api import get_evaluation_context, set_evaluation_context

This brings it closer to what users would expect after reading the spec. We should do something similar with the api hooks methods.

I will submit a series of pull requests later to continue adapting the module structure and make it more Pythonic.

@federicobond federicobond force-pushed the pythonic-api-1 branch 3 times, most recently from 0b0e72d to a8137e1 Compare August 31, 2023 01:46
@codecov

codecov Bot commented Aug 31, 2023

Copy link
Copy Markdown

Codecov Report

Merging #164 (22c0b50) into main (ae412f7) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
- Coverage   94.16%   94.15%   -0.02%     
==========================================
  Files          25       24       -1     
  Lines         463      462       -1     
==========================================
- Hits          436      435       -1     
  Misses         27       27              
Flag Coverage Δ
unittests 94.15% <100.00%> (-0.02%) ⬇️

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

Files Changed Coverage Δ
open_feature/open_feature_api.py 100.00% <100.00%> (ø)
open_feature/open_feature_client.py 95.91% <100.00%> (ø)

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

@beeme1mr beeme1mr changed the title refactor: move api evaluation context methods to api module refactor!: move api evaluation context methods to api module Aug 31, 2023
@beeme1mr

Copy link
Copy Markdown
Member

Looks good to me, thanks. I've updated the PR title so that the change log marks this as a breaking change.

Signed-off-by: Federico Bond <federicobond@gmail.com>
Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond federicobond merged commit 67ba861 into open-feature:main Aug 31, 2023
@federicobond federicobond deleted the pythonic-api-1 branch August 31, 2023 05:53
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
…ure#164)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

2 participants