Skip to content

fix: fix cycle dependency between api and client #480

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

Merged
merged 5 commits into from
Apr 9, 2025
Merged

Conversation

gruebel
Copy link
Member

@gruebel gruebel commented Apr 6, 2025

This PR

  • moved the api function related to hooks, evaluation context and transaction context to their dedicated module and re-exposed them, so there is no difference in the import statement, but now you can directly import them without needing to do it via openfeature.api
  • I didn't find a good way to make sure we don't this again. I know of importlinter which could help, but it doesn't work on the base of the namespace package.

Related Issues

Fixes #478

Copy link

@imnotjames imnotjames left a comment

Choose a reason for hiding this comment

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

I grabbed the code from this PR and as far as I can tell it resolves the issue I was running into

Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.44%. Comparing base (e61b69b) to head (2148972).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
openfeature/evaluation_context/__init__.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #480   +/-   ##
=======================================
  Coverage   97.44%   97.44%           
=======================================
  Files          37       37           
  Lines        1759     1761    +2     
=======================================
+ Hits         1714     1716    +2     
  Misses         45       45           
Flag Coverage Δ
unittests 97.44% <97.87%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gruebel gruebel requested review from a team as code owners April 9, 2025 06:22
@gruebel gruebel merged commit 3636a0d into main Apr 9, 2025
14 checks passed
@gruebel gruebel deleted the fix-imports branch April 9, 2025 06:39
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.

Importing OpenFeatureClient leads to an error
4 participants