open-feature / python-sdk-contrib

Community contributions for hooks and reference providers in python
https://openfeature.dev
10 stars 11 forks source link

feat: add flagd provider #3

Closed tcarrio closed 1 year ago

tcarrio commented 1 year ago

This PR

This PR was started using commits from python-sdk from @agardnerIT. See the original PR for more info. It has since been refactored to the structure of python-sdk-contrib and into multiple Python modules to further separate concerns. Certain files have been incorporated from python-sdk (mainline and PRs in reviews).

Related Issues

Provides the initial flagd provider.

Notes

Follow-up Tasks

Clean up, linting, masking internal methods, etc.

How to test

Initial unit tests included.

codecov-commenter commented 1 year ago

Codecov Report

Merging #3 (b3defb0) into main (eadcb28) will increase coverage by 72.00%. The diff coverage is 72.00%.

@@            Coverage Diff            @@
##           main       #3       +/-   ##
=========================================
+ Coverage      0   72.00%   +72.00%     
=========================================
  Files         0        7        +7     
  Lines         0      100      +100     
=========================================
+ Hits          0       72       +72     
- Misses        0       28       +28     
Flag Coverage Δ
unittests 72.00% <72.00%> (?)

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

Impacted Files Coverage Δ
open_feature_contrib/providers/flagd/provider.py 60.00% <60.00%> (ø)
...ure_contrib/providers/flagd/web_api_url_factory.py 70.37% <70.37%> (ø)
...b/providers/flagd/evaluation_context_serializer.py 71.42% <71.42%> (ø)
open_feature_contrib/providers/flagd/__init__.py 100.00% <100.00%> (ø)
open_feature_contrib/providers/flagd/defaults.py 100.00% <100.00%> (ø)
open_feature_contrib/providers/flagd/flag_type.py 100.00% <100.00%> (ø)
tests/providers/conftest.py 100.00% <100.00%> (ø)

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

jamescarr commented 1 year ago

@tcarrio what else does this PR need to merge? Happy to pitch in and assist!

tcarrio commented 1 year ago

@jamescarr I wanted to do a review of the CONTRIBUTING.md file to make sure all references were updated. Outside of that this should be good to merge as the initial alpha of the Flagd provider (utilizing the gRPC Web endpoints of Flagd).

I noticed you've introduced a new Makefile as well in #9. That can likely expand on the one in here, which already targets requirements-dev for local dev setup. Other than that though that one provides a better DX like default help output, so thanks for that 😉

federicobond commented 1 year ago