Skip to content

Commit

Permalink
fix(experiments): Allow stats_version to be optional (#26850)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Dec 11, 2024
1 parent 8786c87 commit c8b04cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,6 @@
"probability",
"significance_code",
"significant",
"stats_version",
"timezone",
"variants"
],
Expand Down Expand Up @@ -4615,7 +4614,6 @@
"probability",
"significance_code",
"significant",
"stats_version",
"variants"
],
"type": "object"
Expand Down Expand Up @@ -6176,7 +6174,6 @@
"probability",
"significant",
"significance_code",
"stats_version",
"p_value",
"credible_intervals"
],
Expand Down Expand Up @@ -9895,7 +9892,6 @@
"probability",
"significant",
"significance_code",
"stats_version",
"p_value",
"credible_intervals"
],
Expand Down Expand Up @@ -10528,7 +10524,6 @@
"probability",
"significance_code",
"significant",
"stats_version",
"variants"
],
"type": "object"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ export interface ExperimentTrendsQueryResponse {
probability: Record<string, number>
significant: boolean
significance_code: ExperimentSignificanceCode
stats_version: integer
stats_version?: integer
p_value: number
credible_intervals: Record<string, [number, number]>
}
Expand Down
10 changes: 5 additions & 5 deletions posthog/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5893,7 +5893,7 @@ class CachedExperimentTrendsQueryResponse(BaseModel):
)
significance_code: ExperimentSignificanceCode
significant: bool
stats_version: int
stats_version: Optional[int] = None
timezone: str
variants: list[ExperimentVariantTrendsBaseStats]

Expand All @@ -5911,7 +5911,7 @@ class Response10(BaseModel):
probability: dict[str, float]
significance_code: ExperimentSignificanceCode
significant: bool
stats_version: int
stats_version: Optional[int] = None
variants: list[ExperimentVariantTrendsBaseStats]


Expand Down Expand Up @@ -6016,7 +6016,7 @@ class ExperimentTrendsQueryResponse(BaseModel):
probability: dict[str, float]
significance_code: ExperimentSignificanceCode
significant: bool
stats_version: int
stats_version: Optional[int] = None
variants: list[ExperimentVariantTrendsBaseStats]


Expand Down Expand Up @@ -6345,7 +6345,7 @@ class QueryResponseAlternative16(BaseModel):
probability: dict[str, float]
significance_code: ExperimentSignificanceCode
significant: bool
stats_version: int
stats_version: Optional[int] = None
variants: list[ExperimentVariantTrendsBaseStats]


Expand Down Expand Up @@ -6377,7 +6377,7 @@ class QueryResponseAlternative27(BaseModel):
probability: dict[str, float]
significance_code: ExperimentSignificanceCode
significant: bool
stats_version: int
stats_version: Optional[int] = None
variants: list[ExperimentVariantTrendsBaseStats]


Expand Down

0 comments on commit c8b04cd

Please sign in to comment.