Skip to content

Rashid/audience combinations#57

Open
rashidsp wants to merge 5 commits intorashid/audience-match-type-project-configfrom
rashid/audience-combinations
Open

Rashid/audience combinations#57
rashidsp wants to merge 5 commits intorashid/audience-match-type-project-configfrom
rashid/audience-combinations

Conversation

@rashidsp
Copy link
Copy Markdown
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
Copy Markdown

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