Skip to content

Rashid/audience combinations #57

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

Open
wants to merge 5 commits into
base: rashid/audience-match-type-project-config
Choose a base branch
from

Conversation

rashidsp
Copy link
Collaborator

Summary

This adds support for audience combinations on experiments. If experiment['audienceConditions'] is present, it will be used as a condition tree where the leaf conditions are audience Ids.

  • The audience evaluator uses the condition tree evaluator on both the experiment audience conditions and the individual audience conditions.
  • The audience evaluator treats conditions trees and flat lists of audience ids (the old format) the same way, because a flat list of audience ids is a valid condition tree with an implicit OR condition.
  • Added a new method to Experiment entity that returns audienceConditions if not None, otherwise returns audience Ids

Test plan

  • test_optimizely - Added unit tests for APIs that pass/fail using various complex audiences with different match types.
  • test_audience - Added new unit tests for calling condition tree and custom attribute evaluators.
  • Ran complex audiences test cases in compatibility test suite.

Issues

@coveralls
Copy link

coveralls commented Dec 17, 2018

Pull Request Test Coverage Report for Build 537

  • 58 of 58 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 534: 0.0%
Covered Lines: 3662
Relevant Lines: 3662

💛 - Coveralls

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