Skip to content

Commit

Permalink
Merge branch 'master' into partial-survey-responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Phanatic committed Dec 11, 2024
2 parents c320eac + 3908c7c commit 8e713d8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
65 changes: 35 additions & 30 deletions frontend/src/scenes/experiments/ExperimentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useActions, useValues } from 'kea'
import { Form, Group } from 'kea-forms'
import { ExperimentVariantNumber } from 'lib/components/SeriesGlyph'
import { MAX_EXPERIMENT_VARIANTS } from 'lib/constants'
import { groupsAccessLogic, GroupsAccessStatus } from 'lib/introductions/groupsAccessLogic'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { LemonField } from 'lib/lemon-ui/LemonField'
import { LemonRadio } from 'lib/lemon-ui/LemonRadio'
Expand All @@ -20,6 +21,7 @@ const ExperimentFormFields = (): JSX.Element => {
const { addExperimentGroup, removeExperimentGroup, setExperiment, createExperiment, setExperimentType } =
useActions(experimentLogic)
const { webExperimentsAvailable } = useValues(experimentsLogic)
const { groupsAccessStatus } = useValues(groupsAccessLogic)

return (
<div>
Expand Down Expand Up @@ -103,37 +105,40 @@ const ExperimentFormFields = (): JSX.Element => {
/>
</div>
)}
<div>
<h3 className="mt-10">Participant type</h3>
<div className="text-xs text-muted">
The type on which to aggregate metrics. You can change this at any time during the experiment.
</div>
<LemonDivider />
<LemonRadio
value={
experiment.parameters.aggregation_group_type_index != undefined
? experiment.parameters.aggregation_group_type_index
: -1
}
onChange={(rawGroupTypeIndex) => {
const groupTypeIndex = rawGroupTypeIndex !== -1 ? rawGroupTypeIndex : undefined
{groupsAccessStatus === GroupsAccessStatus.AlreadyUsing && (
<div>
<h3 className="mt-10">Participant type</h3>
<div className="text-xs text-muted">
The type on which to aggregate metrics. You can change this at any time during the
experiment.
</div>
<LemonDivider />
<LemonRadio
value={
experiment.parameters.aggregation_group_type_index != undefined
? experiment.parameters.aggregation_group_type_index
: -1
}
onChange={(rawGroupTypeIndex) => {
const groupTypeIndex = rawGroupTypeIndex !== -1 ? rawGroupTypeIndex : undefined

setExperiment({
parameters: {
...experiment.parameters,
aggregation_group_type_index: groupTypeIndex ?? undefined,
},
})
}}
options={[
{ value: -1, label: 'Persons' },
...Array.from(groupTypes.values()).map((groupType) => ({
value: groupType.group_type_index,
label: capitalizeFirstLetter(aggregationLabel(groupType.group_type_index).plural),
})),
]}
/>
</div>
setExperiment({
parameters: {
...experiment.parameters,
aggregation_group_type_index: groupTypeIndex ?? undefined,
},
})
}}
options={[
{ value: -1, label: 'Persons' },
...Array.from(groupTypes.values()).map((groupType) => ({
value: groupType.group_type_index,
label: capitalizeFirstLetter(aggregationLabel(groupType.group_type_index).plural),
})),
]}
/>
</div>
)}
<div className="mt-10">
<h3 className="mb-1">Variants</h3>
<div className="text-xs text-muted">Add up to 9 variants to test against your control.</div>
Expand Down
3 changes: 2 additions & 1 deletion posthog/temporal/common/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import ssl
import typing
import uuid
import structlog

import aiohttp
import pyarrow as pa
import requests
import structlog
from django.conf import settings

import posthog.temporal.common.asyncpa as asyncpa
Expand Down Expand Up @@ -511,6 +511,7 @@ async def get_client(
max_memory_usage=settings.CLICKHOUSE_MAX_MEMORY_USAGE,
max_block_size=max_block_size,
output_format_arrow_string_as_string="true",
http_send_timeout=0,
**kwargs,
) as client:
yield client

0 comments on commit 8e713d8

Please sign in to comment.