Skip to content
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

Add Audiences to OptimizelyConfig and expose in OptimizelyExperiment #342

Merged
merged 65 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e80fdfb
added sdk and environment key
ozayr-zaviar Jun 10, 2021
d58b71a
[MAINTENANCE] Remove Deprecated warnings during build
The-inside-man Jun 3, 2021
a583ea5
[OASIS-7757] Fix spelling of environment to fix testcases from failing
The-inside-man Jun 15, 2021
5b2196c
[OASIS-7757] - Added additional test cases to test_optimizely and tes…
The-inside-man Jun 17, 2021
f964f94
[OASIS-7800] Updated optimizely_config with attributes and events
The-inside-man Jun 22, 2021
f60ab0a
[OASIS-7757] - update copyright years and add more testcases for sdk_…
The-inside-man Jun 23, 2021
df1b081
[OASIS-7800] Updated optimizely_config with attributes and events
The-inside-man Jun 23, 2021
9c9bcea
Run autopep8 to fix formatting issues after rebase
The-inside-man Jun 24, 2021
61d5c24
[OASIS-7800] - Added test cases for attribute map and events map
The-inside-man Jun 24, 2021
13703ca
Remove unused import from optimizely config
The-inside-man Jun 24, 2021
ef95cd8
Corrected comment wording in get functions for events.
The-inside-man Jun 25, 2021
b8828b9
[OASIS-7812] - Add Audiences to OpotimizelyConfig to expose to users
The-inside-man Jul 2, 2021
c3bc816
Remove unused import for Experiment in OptimizelyConfig
The-inside-man Jul 2, 2021
f1bd533
Update Formatting issues for lint
The-inside-man Jul 2, 2021
0ad43d0
Update Import for conditions in optimizely_config.py
The-inside-man Jul 2, 2021
942bfe9
Additional changes for audiences and added functions to create attrib…
The-inside-man Jul 6, 2021
528b8f2
Add delivery_rules to OptimizelyConfig and testcases to support
The-inside-man Jul 6, 2021
c3c3d2c
Formatting issues
The-inside-man Jul 6, 2021
2fef52a
Fix line length in comments and statement
The-inside-man Jul 6, 2021
d3b2a46
Shortened return statement
The-inside-man Jul 6, 2021
dda6e76
Updated list copy to use slice for backwards compatibility
The-inside-man Jul 6, 2021
4f2d7fb
Add in test datafile for typed audiences
The-inside-man Jul 7, 2021
f90e3e3
remove unused import
The-inside-man Jul 7, 2021
4471555
Merge branch 'master' into jbrown/oasis-7812
The-inside-man Jul 7, 2021
bb98741
Modify test_update_experiment to pass audiences as OptimizelyExperiment
The-inside-man Jul 7, 2021
48f604b
Fix linting issues
The-inside-man Jul 7, 2021
8179f2b
Style changes as requested to comments and variable naming.
The-inside-man Jul 7, 2021
d694c7f
Lint Update
The-inside-man Jul 7, 2021
ec39096
Fix line length
The-inside-man Jul 7, 2021
a687a9b
Move upper() to central location to only call once
The-inside-man Jul 7, 2021
11be430
Indent fix
The-inside-man Jul 7, 2021
ecf2e45
Broke statement into two for Lint issues
The-inside-man Jul 7, 2021
f568aad
Added test case for variation
The-inside-man Jul 9, 2021
3b8706f
Add changes to decision service to us experiment ID instead of KEY.
The-inside-man Jul 9, 2021
2504f98
Missing newline added
The-inside-man Jul 9, 2021
1cd6aab
Remove redundant update function. Ad
The-inside-man Jul 9, 2021
bc98adc
Rename testcase to remove replace_ids_with_names.
The-inside-man Jul 9, 2021
98ff2b6
Duplicate experiment Key issue with multi feature flag (#347)
The-inside-man Jul 9, 2021
d6fa32d
Update delivery rules test.
The-inside-man Jul 9, 2021
16059d7
Explenation added to flake8 for ignoring W504.
The-inside-man Jul 12, 2021
0320627
Changes made to move delivery rules and experiment rules into Optimiz…
The-inside-man Jul 12, 2021
8187f6f
Formatter on new changes
The-inside-man Jul 12, 2021
0804bb8
Merge branch 'master' into jbrown/oasis-7812
The-inside-man Jul 12, 2021
ba3bbef
Remove TODO and other dev comments
The-inside-man Jul 12, 2021
2567bac
Remove TODO and other dev comments
The-inside-man Jul 12, 2021
d401c72
Remove unused imoprt
The-inside-man Jul 12, 2021
6b4a00d
Added nl after imports to follow Flake8
The-inside-man Jul 12, 2021
a1ed815
Add except for if incorrect type used in lookup_name_from_id() to pre…
The-inside-man Jul 12, 2021
ec4218a
Correct except to assign audience_id instead of blank string
The-inside-man Jul 12, 2021
508f82f
Casting name to string in case non string type for testing
The-inside-man Jul 12, 2021
26ad430
Added test and modification to account for scenario when NOT is follo…
The-inside-man Jul 12, 2021
1f35dda
Update from isinstance to type and change List to list for python 3.4
The-inside-man Jul 12, 2021
a4e497f
Simplified stringifyConditions algorithm to be more readable and less…
The-inside-man Jul 13, 2021
bf92fd7
Updated changes - reuse test logic, modify stringify to proper handle…
The-inside-man Jul 13, 2021
2d6def3
Change to single test to run all cases for stringify.
The-inside-man Jul 14, 2021
bec791a
Move config_service out of loop.
The-inside-man Jul 14, 2021
286f178
Added missed step in delivery rules.
The-inside-man Jul 14, 2021
c3faba3
Update to properly refect datafile examples.
The-inside-man Jul 14, 2021
199a35f
Remove unused import
The-inside-man Jul 14, 2021
4fa5d05
Cleaned up get functions till overall cleanup of code.
The-inside-man Jul 14, 2021
4356a4d
Merge branch 'master' into jbrown/oasis-7812
The-inside-man Jul 15, 2021
a273d11
Merge branch 'master' into jbrown/oasis-7812
The-inside-man Jul 15, 2021
c8d68f7
Added comments to stringify_conditions, added testcase to test string…
The-inside-man Jul 19, 2021
a9ac50c
Correct spelling of precedence
The-inside-man Jul 19, 2021
6ce98e3
Update comment to be more readable.
The-inside-man Jul 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions optimizely/helpers/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ConditionOperatorTypes(object):
AND = 'and'
OR = 'or'
NOT = 'not'
operators = [AND, OR, NOT]


class ConditionMatchTypes(object):
Expand Down
64 changes: 32 additions & 32 deletions optimizely/lib/pymmh3.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,25 @@ def fmix(k):
for block_start in xrange(0, nblocks * 8, 8):
# ??? big endian?
k1 = (
key[2 * block_start + 7] << 56
| key[2 * block_start + 6] << 48
| key[2 * block_start + 5] << 40
| key[2 * block_start + 4] << 32
| key[2 * block_start + 3] << 24
| key[2 * block_start + 2] << 16
| key[2 * block_start + 1] << 8
| key[2 * block_start + 0]
key[2 * block_start + 7] << 56 |
key[2 * block_start + 6] << 48 |
key[2 * block_start + 5] << 40 |
key[2 * block_start + 4] << 32 |
key[2 * block_start + 3] << 24 |
key[2 * block_start + 2] << 16 |
key[2 * block_start + 1] << 8 |
key[2 * block_start + 0]
)

k2 = (
key[2 * block_start + 15] << 56
| key[2 * block_start + 14] << 48
| key[2 * block_start + 13] << 40
| key[2 * block_start + 12] << 32
| key[2 * block_start + 11] << 24
| key[2 * block_start + 10] << 16
| key[2 * block_start + 9] << 8
| key[2 * block_start + 8]
key[2 * block_start + 15] << 56 |
key[2 * block_start + 14] << 48 |
key[2 * block_start + 13] << 40 |
key[2 * block_start + 12] << 32 |
key[2 * block_start + 11] << 24 |
key[2 * block_start + 10] << 16 |
key[2 * block_start + 9] << 8 |
key[2 * block_start + 8]
)

k1 = (c1 * k1) & 0xFFFFFFFFFFFFFFFF
Expand Down Expand Up @@ -258,31 +258,31 @@ def fmix(h):
# body
for block_start in xrange(0, nblocks * 16, 16):
k1 = (
key[block_start + 3] << 24
| key[block_start + 2] << 16
| key[block_start + 1] << 8
| key[block_start + 0]
key[block_start + 3] << 24 |
key[block_start + 2] << 16 |
key[block_start + 1] << 8 |
key[block_start + 0]
)

k2 = (
key[block_start + 7] << 24
| key[block_start + 6] << 16
| key[block_start + 5] << 8
| key[block_start + 4]
key[block_start + 7] << 24 |
key[block_start + 6] << 16 |
key[block_start + 5] << 8 |
key[block_start + 4]
)

k3 = (
key[block_start + 11] << 24
| key[block_start + 10] << 16
| key[block_start + 9] << 8
| key[block_start + 8]
key[block_start + 11] << 24 |
key[block_start + 10] << 16 |
key[block_start + 9] << 8 |
key[block_start + 8]
)

k4 = (
key[block_start + 15] << 24
| key[block_start + 14] << 16
| key[block_start + 13] << 8
| key[block_start + 12]
key[block_start + 15] << 24 |
key[block_start + 14] << 16 |
key[block_start + 13] << 8 |
key[block_start + 12]
)

k1 = (c1 * k1) & 0xFFFFFFFF
Expand Down
Loading