Skip to content

Commit 0787cfa

Browse files
algolia-botrenovate[bot]shortcuts
committed
chore(deps): dependencies 2025-01-06 [skip-bc] (generated)
algolia/api-clients-automation#4299 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Algolia Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 735c457 commit 0787cfa

File tree

4 files changed

+45
-22
lines changed

4 files changed

+45
-22
lines changed

algoliasearch/personalization/models/event_scoring.py renamed to algoliasearch/personalization/models/events_scoring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def _alias_generator(name: str) -> str:
3131
return _ALIASES.get(name, name)
3232

3333

34-
class EventScoring(BaseModel):
34+
class EventsScoring(BaseModel):
3535
"""
36-
EventScoring
36+
EventsScoring
3737
"""
3838

3939
score: int
@@ -57,7 +57,7 @@ def to_json(self) -> str:
5757

5858
@classmethod
5959
def from_json(cls, json_str: str) -> Optional[Self]:
60-
"""Create an instance of EventScoring from a JSON string"""
60+
"""Create an instance of EventsScoring from a JSON string"""
6161
return cls.from_dict(loads(json_str))
6262

6363
def to_dict(self) -> Dict[str, Any]:
@@ -70,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]:
7070

7171
@classmethod
7272
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
73-
"""Create an instance of EventScoring from a dict"""
73+
"""Create an instance of EventsScoring from a dict"""
7474
if obj is None:
7575
return None
7676

algoliasearch/personalization/models/facet_scoring.py renamed to algoliasearch/personalization/models/facets_scoring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def _alias_generator(name: str) -> str:
2828
return _ALIASES.get(name, name)
2929

3030

31-
class FacetScoring(BaseModel):
31+
class FacetsScoring(BaseModel):
3232
"""
33-
FacetScoring
33+
FacetsScoring
3434
"""
3535

3636
score: int
@@ -53,7 +53,7 @@ def to_json(self) -> str:
5353

5454
@classmethod
5555
def from_json(cls, json_str: str) -> Optional[Self]:
56-
"""Create an instance of FacetScoring from a JSON string"""
56+
"""Create an instance of FacetsScoring from a JSON string"""
5757
return cls.from_dict(loads(json_str))
5858

5959
def to_dict(self) -> Dict[str, Any]:
@@ -66,7 +66,7 @@ def to_dict(self) -> Dict[str, Any]:
6666

6767
@classmethod
6868
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
69-
"""Create an instance of FacetScoring from a dict"""
69+
"""Create an instance of FacetsScoring from a dict"""
7070
if obj is None:
7171
return None
7272

algoliasearch/personalization/models/personalization_strategy_params.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
from typing_extensions import Self
1919

2020

21-
from algoliasearch.personalization.models.event_scoring import EventScoring
22-
from algoliasearch.personalization.models.facet_scoring import FacetScoring
21+
from algoliasearch.personalization.models.events_scoring import EventsScoring
22+
from algoliasearch.personalization.models.facets_scoring import FacetsScoring
2323

2424
_ALIASES = {
25-
"event_scoring": "eventScoring",
26-
"facet_scoring": "facetScoring",
25+
"events_scoring": "eventsScoring",
26+
"facets_scoring": "facetsScoring",
2727
"personalization_impact": "personalizationImpact",
2828
}
2929

@@ -37,9 +37,9 @@ class PersonalizationStrategyParams(BaseModel):
3737
PersonalizationStrategyParams
3838
"""
3939

40-
event_scoring: List[EventScoring]
40+
events_scoring: List[EventsScoring]
4141
""" Scores associated with each event. The higher the scores, the higher the impact of those events on the personalization of search results. """
42-
facet_scoring: List[FacetScoring]
42+
facets_scoring: List[FacetsScoring]
4343
""" Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results. """
4444
personalization_impact: int
4545
""" Impact of personalization on the search results. If set to 0, personalization has no impact on the search results. """
@@ -79,14 +79,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
7979
if not isinstance(obj, dict):
8080
return cls.model_validate(obj)
8181

82-
obj["eventScoring"] = (
83-
[EventScoring.from_dict(_item) for _item in obj["eventScoring"]]
84-
if obj.get("eventScoring") is not None
82+
obj["eventsScoring"] = (
83+
[EventsScoring.from_dict(_item) for _item in obj["eventsScoring"]]
84+
if obj.get("eventsScoring") is not None
8585
else None
8686
)
87-
obj["facetScoring"] = (
88-
[FacetScoring.from_dict(_item) for _item in obj["facetScoring"]]
89-
if obj.get("facetScoring") is not None
87+
obj["facetsScoring"] = (
88+
[FacetsScoring.from_dict(_item) for _item in obj["facetsScoring"]]
89+
if obj.get("facetsScoring") is not None
9090
else None
9191
)
9292

poetry.lock

Lines changed: 25 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)