open-feature / python-sdk

Python SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
47 stars 16 forks source link

fix!: restrict exported names with __all__ #306

Closed federicobond closed 4 months ago

federicobond commented 4 months ago

Refs https://github.com/open-feature/python-sdk/issues/214

Note: this is a breaking change. We should do an ecosystem check to make sure most packages are using the correct imports.

federicobond commented 4 months ago

Should AbstractProvider be importable from openfeature.provider so we can phase out openfeature.provider.provider?

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.84%. Comparing base (faf02a9) to head (b30a492). Report is 1 commits behind head on main.

:exclamation: Current head b30a492 differs from pull request most recent head 5613668. Consider uploading reports for the commit 5613668 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #306 +/- ## ========================================== - Coverage 97.10% 94.84% -2.27% ========================================== Files 27 20 -7 Lines 1176 659 -517 ========================================== - Hits 1142 625 -517 Misses 34 34 ``` | [Flag](https://app.codecov.io/gh/open-feature/python-sdk/pull/306/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-feature/python-sdk/pull/306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature) | `94.84% <100.00%> (-2.27%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-feature#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gruebel commented 4 months ago

I think exposing AbstractProvider should be done with your other PR #309 then the circular dependency will be gone.

federicobond commented 4 months ago

Something weird with the Codecov uploader, @toddbaert @beeme1mr do you know what might be going on?

beeme1mr commented 4 months ago

I think this happens when Codecovs attempts to call the GitHub APIs and are throttled. I just ran one of the failed tests to see if that fixed it. If that doesn't help, I will investigate tomorrow.

beeme1mr commented 4 months ago

Unfortunately, it looks like a very common issue. https://github.com/codecov/codecov-action/issues/598

beeme1mr commented 4 months ago

We should probably only run Codecov once after the python specific tests finish.

gruebel commented 4 months ago

Yeah, there is no need to upload the results for each Python version, just one is enough. We can add an if condition to only upload for Python 3.11 as it is the default version for dinner other jobs in the same workflow.

gruebel commented 4 months ago

ok, seems like we are not the only ones with the codecov issue https://github.com/codecov/codecov-action/issues/1359 seems like we need to upgrade to v4 with API token.

beeme1mr commented 4 months ago

ok, seems like we are not the only ones with the codecov issue codecov/codecov-action#1359 seems like we need to upgrade to v4 with API token.

Unfortunately, that has challenges too. Perhaps should should consider replacing CodeCov or skipping the upload step for now.

gruebel commented 4 months ago

@beeme1mr an alternative could be https://coveralls.io/ thoughts?

federicobond commented 4 months ago

I inclined to not rush with the decision and just ignore upload failures in CI temporarily.