This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FF-3106 fix: ContextAttributes.from_dict() should not treat bool as n…
…umeric (#67)
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Note to developers: When ready to bump to 4.0, please change | ||
# the `POLL_INTERVAL_SECONDS` constant in `eppo_client/constants.py` | ||
# to 30 seconds to match the behavior of the other server SDKs. | ||
__version__ = "3.5.3" | ||
__version__ = "3.5.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from eppo_client.bandit import ContextAttributes | ||
|
||
|
||
def test_from_dict_treats_bools_as_categorical(): | ||
attrs = ContextAttributes.from_dict( | ||
{ | ||
"categorical": True, | ||
} | ||
) | ||
|
||
assert attrs.categorical_attributes == { | ||
"categorical": "true", | ||
} | ||
assert attrs.numeric_attributes == {} |