-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Setup Funnel Unordered persons and Testing #4943
Conversation
…t for conversion window;
… cleanup via destroy() method
…ed funnel_persons and funnel_trends_persons into individual classes;
…com:PostHog/posthog into funnel-persons-pagination-conversion-window
…to funnel-unordered-persons
@@ -15,7 +15,7 @@ | |||
HUMAN_READABLE_TIMESTAMP_FORMAT = "%a. %-d %b" | |||
|
|||
|
|||
class ClickhouseFunnelTrends(ClickhouseFunnelNew): | |||
class ClickhouseFunnelTrends(ClickhouseFunnelBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, I think visualisation like Trends should inherit from the different types of ordered funnels, and use their now-new get_step_counts_query()
as the seed query, but now's not the time for it. ( Want atleast a pattern of 2 before we generalise, so we don't create the wrong abstractions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, agreed
I added the step timings into this query so that it's consistent. The timing themselves don't make much sense at the moment (can end up with negative values). This is worth investigating but I don't want it to be a blocker to get this merged because we can apply this persons pattern elsewhere |
Changes
Fun stuff: Writing tests as I mentioned in https://github.com/PostHog/posthog/pull/4892/files#r660477225 helped me find bugs in our
FunnelPersons
class xD (sometimes, people are duplicated, more in the PR)This PR: sets up a general method of creating
Persons
for queries, and tests them along with their non-Person class. I think it's imperative to test these two together, as this ensures (1) we don't duplicate all the tests twice, (2) what gets called together, gets tested togetherChecklist