0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Eric Duong
46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00
Michael Matloka
cd334288d0
refactor(utils): create_group_ch out of create_group (#10155)
* refactor(utils): `create_group_ch` out of `create_group`

* Prevent misuse
2022-06-07 17:57:49 +00:00
Michael Matloka
3624a5ce9c
feat(demo): Make demo more robust (#10098)
* Add `min-width` to `SitePopover`

* Add "you" as a special case of a `ProfilePicture` user name

* Add a funnel to Hedgebox data

* Open demo signup CTA in new tab

* Provide all paid feature in demo

* Add nbsp;s on signup pages

* Align simulate_matrix defaults with demo signin

* Automate taxonomy generation in Matrix

* Register first seen and last seen dates for events

* Improve naming

* Improve `run_on_team` return type

* Copy data from master team for performance

* Add type annotations

* Fix Postgres analytics data

* Support groups in demo data

* Silence logspam

* Divide clusters into company and social ones

* Fix `calculate_event_property_usage_for_team`

* Add `COPY_ROWS_BETWEEN_TEAMS_BASE_SQL` const
2022-06-03 20:17:15 +02:00
Michael Matloka
d035124bb3
feat(demo): Rework demo data generation system (#7889)
* Rework demo data generation system

* Fix `setup_dev` and `posthog-foss`

* Keep old demo data generators to reduce hassle

* Move to Hoglify concept

* Separate new generator from old version

* Fix issues

* Rework simulation structure

* Restore package.json

* Reformat `requirements`

* Fix signup button margin

* Refactor things

* Remove snapshots

* Strip old stuff

* Rearrange more

* Fix bad imports

* Add simulation scaffolding

* Add `dry_run_matrix` command

* Fix determinism

* Update naming

* Update dry_run_matrix.py

* Model web client, add sessions, enable full-cluster simulation

* Update flake8 config

* Ignore T001 violation

* Fix saving data

* Instrument `set_project_up` more

* Add demo cohorts, feature flag, experiment

* Parametrize `start` and `end` in `simulate_matrix`

* Add neighbor effects

* Add more events

* Allow silencing events in `simulate_matrix`

* Improve effect scheduling and add more activities

* Fix time measurement

* Disallow creating extra orgs for demo users

* Add more useful info to `simulate_matrix` output

* Add super properties, refine world

* Fix first-seen moment

* `create_event` to Kafka if possible for speed

* Alias `$distinct_id` to `distinct_id` in `keyMapping`

* Extend simulation to 120 days

* Fix experiment instrumentation

* Fix some error message

* Fix experiment flag

* Increase number of demo sim clusters

* Fix typing

* Remove unused agent actions

* Support Python 3.8

* Avoid `Union[Team, int]`

* Fix an arg

* Remove dodgy alias
2022-05-17 22:23:11 +02:00
Tim Glaser
e960bf3b64
perf(funnels): aggregate by distinct id for funnels (#9329)
* perf(funnels): aggregate by distinct id for funnels

* fix

* fi

* fix again

* fix
2022-04-01 20:34:55 +01:00
Harry Waye
446cb48a48
fix(clickhouse): resolve 21.8 -> 21.9 test issues (again) (#8846)
* fix(clickhouse): resolve 21.8 -> 21.9 test issues

This is the minimum change to make
ee/clickhouse/queries/funnels/test/test_funnel_unordered.py::TestFunnelUnorderedStepsBreakdown::test_funnel_aggregate_by_groups_breakdown_group
pass. There may be other tests still failing.

The issue was introduced with the [addition of
heredocs](https://github.com/ClickHouse/ClickHouse/pull/26671) into the
clickhouse syntax. heredocs use `$` as delimiters. We're using `$` for
column identifiers in quite a few places, so now we need to ensure that
we have quoted these before rendering into SQL.

* update other snapshots

* update snapshots

* fix(clickhouse): quote materialized column identifiers
2022-03-03 15:53:12 +00:00
Karl-Aksel Puulmann
55d5c6faa0
Groups: Show "related groups" under group and person pages. (#7461)
* Use GroupTypeIndex type in BE

* Consistent ordering for group types

* Better BE type for group type index

* Handle non-url safe keys in groups

Previously this would crash due to never decoding the url and not
handling it in the backend

* Allow fetching related groups from the API

* Solve minor type errors

* Add a tooltip

* data-attr for tracking links

* Add related groups onto person page

* Fix an import

* Kill useEffect
2021-12-02 15:21:15 +02:00
Karl-Aksel Puulmann
fd6980d96a
Groups: Refactor endpoints, single group page (#7399)
* Update wording

* Update view to use postgres tables

We keep these in sync now

* Add retrieve endpoint

* Link to a (blank) groups page

* Show events table and properties under group

* Update pagination for groups

* update testing utils

* Update tests

* Patch tests relying on returned models

* Remove duplicated line
2021-11-30 13:47:45 +02:00
Li Yi Yu
e0fe499a05
Groups pages table (#7039)
* wip

* get list of groups

* move backend endpoints

* frontend wip

* fix routes for groups

* add groups file

* try to fix tab nav

* fix groups query

* reformat results, add limits and offsets and next url

* move groups pages logic into own file

* fix and clean up tabs

* account for pagination and response reformatting

* lint fixes

* optional prev input

* typescript errors

* typescript fixes

* address feedback comments

* groups list logic test

* render properties expandable row

* fix test and lints

* prettier

* simplify table column title

* Fix a typing issue

* Use enum > boolean parameter

This makes what's going on more explicit

* Turn off pagination at the bottom of the table

* Rename table column

* Make pagination in groups work

Quite bugs fixed:
1. `previous` page was always shown, even if going into negative offsets
2. query_result could never be larger than `limit` with the code

* Cleanup code

* Make sidenav active under persons

* Use the correct query

* Add tests for pagination

* Update wording again

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-11-15 11:08:13 +02:00
Neil Kakkar
82352c4a62
Funnel Groups filtering (#6940)
* enable groups filtering

* rerun snapshots

* update team

* fix tests
2021-11-09 08:32:55 +00:00
Karl-Aksel Puulmann
a39596c092
Groups: Use materialized columns for groups (#6938)
* Migration to use materialized columns for groups

Workaround for https://github.com/PostHog/posthog/issues/6422

* Use groups materialized columns in queries

* Update mat column creation tests

* Simplify aggregation_target_field

* Fix migration

* Update snapshots
2021-11-08 15:49:39 +02:00
Neil Kakkar
a400296266
Backend: Groups Aggregation on Funnels (#6937)
* smallest change to make aggregation work
* use team in filter
2021-11-08 11:29:56 +00:00
Karl-Aksel Puulmann
273228cdcf
BE: Allow filtering by group properties in trends (#6761)
* Add group type, group_type_index

* Raise an error when handling unsupported properties in CH

* Improve repr

* Fix is_superset function

This was previously broken - sorting and zipping doesn't really work for
this intent.

* Add group_type_index to analysis results

* Add `group_types_to_query`

* Minor typing fixes

* Create groups tables in tests

* Simple first filter by groups query

* isort

* Use snapshot testing in event_query tests, add test for groups
2021-11-03 20:43:22 +02:00