Skip to content

Move decider_client_from_config to reddit_experiments #10

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 3 commits into from
Apr 20, 2022

Conversation

julieahnt
Copy link
Contributor

@julieahnt julieahnt commented Apr 20, 2022

Summary

  • This pr moves decider_client_from_config in reddit_decider that added from Decider #6 to the reddit_experiments package.
  • Fix typing issues in reddit_decider

Usage

from reddit_experiments import decider_client_from_config
...
def my_field_extractor(request):                                                                   
    return {"foo": request.headers.get("Foo"), “bar”: “something”} 

def make_wsgi_app(app_config):
    ...
    baseplate.add_to_context(
        "decider",
        decider_client_from_config(
            app_config=app_config,
            event_logger=ExperimentLogger(),
            request_field_extractor=my_field_extractor,
        ),
    )

@julieahnt julieahnt requested a review from wuyiqicc April 20, 2022 21:33
@julieahnt julieahnt marked this pull request as ready for review April 20, 2022 22:13
@julieahnt julieahnt requested a review from mattknox April 20, 2022 22:13
@wuyiqicc wuyiqicc merged commit 841604b into develop Apr 20, 2022
@mrlevitas mrlevitas deleted the move-decider branch April 28, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants