0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Tim Glaser
4b1e896888
888 filter on elements (#986)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test

* Add endpoint to get stats on elements

* Add sensible limit

* Put migration back

* Pass team_id as property
2020-06-12 10:03:32 +02:00
Tim Glaser
646d854cc9
Revert "888 filter on elements (#981)" (#985)
This reverts commit a41ef7f7c2.
2020-06-11 16:59:05 +02:00
Tim Glaser
a41ef7f7c2
888 filter on elements (#981)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test

* Add endpoint to get stats on elements

* Add sensible limit

* Put migration back
2020-06-11 16:32:10 +02:00
Tim Glaser
37fa876732
Revert "Closes #888 filter on elements (#917)" (#968)
This reverts commit ac46f09429.
2020-06-09 17:58:18 +01:00
Tim Glaser
ac46f09429
Closes #888 filter on elements (#917)
* Closes #888 filter on elements

* Add joinfield as requirement

* Fix tests

* Use correct element

* Fix paths query

* Delete old migration test

* Clean up

* Add frontend filters for elements, closes #419

* Add element api

* Fix paths and add test

* Keep elements field, otherwise breaks parititons

* Don't use join field

* Remove other join field references

* Fix test
2020-06-08 14:58:51 +01:00
James Greenhill
0f1d74dee6
Add Django-debug-toolbar for profiling requests performance (#768)
* Add Django-debug-toolbar for profiling requests performance

* Only require and import debug-toolbar in dev

* don't bother checking types for debug_toolbar

* mypy configs and try/except for import of debug_toolbar

* include debug toolbar url config
2020-05-18 18:15:31 +01:00
Tim Glaser
7da9287656
595 offload storing events to workers (#615)
* Adds to #595 move capture workload to tasks

* Move tests to tasks

* Move tests from api to tasks

* Finish moving tests around

* Closes #611 alias should find based on alias rather than distinct_id

* Make sure batch still works

* Add tests for slack
2020-04-17 15:38:17 +01:00
Sanket Dasgupta
3738f33e30
Remove drf-yasg in favor of new docs website (#596)
The new documentation at https://docs.posthog.com supersedes
this.

Fixes https://github.com/PostHog/posthog/issues/574
2020-04-15 16:24:10 +01:00
Tim Glaser
4782d54d1f
Configure mypy (#562)
* server/mypy: Enable no_implicit_optional

no_implicit_optional Changes the treatment of arguments with a default value of None by not implicitly making their type Optional.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#none-and-optional-handling

* server/mypy: Enable warn_unused_ignores

warn_unused_ignores: Warns about unneeded # type: ignore comments.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings

It's best to exclude packages with no typing in mypy.ini rather than in
the code. This waym if tin the future these packages add types it's can
easily be disabled (by removing the exclusion in mypy.ini).

* api/user: Fix user password was not really validated

* api/test/base: Remove unreachable code

Team is created in setup, so no reason for it not to be there (unless
setUp is overriden by child, which as far as I can see is currently not
happening),

* server/mypy: Enable check_untyped_defs

check_untyped_defs: Type-checks the interior of functions without type annotations.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls

* server/mypy: Enable strict_equality

strict_equality: Prohibit equality checks, identity checks, and container checks between non-overlapping types.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#miscellaneous-strictness-flags

* server/mypy: Enable warn_unreachable

Added a fixme for a possible oversight in function that parses JSON.

warn_unreachable: Shows a warning when encountering any code
inferred to be unreachable or redundant after performing type
analysis.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings

* api/posthog: fix possible bug when batch is not a list

Current code assumes batch is a valid list. If batch is not a list, the
capture handling will cause a 500 error.

* fix stricter mypy

* Use response.json instead of .data

Co-authored-by: Haki Benita <hakibenita@gmail.com>
2020-04-14 11:05:45 +01:00
Marius Andra
3ec4db5ce7 ignore celery for mypy 2020-04-07 14:02:09 +02:00
Tim Glaser
cf8995b574 Add GitLab API URL 2020-04-06 11:08:59 +01:00
Tim Glaser
5336c93658 Add posthog analytics module
- Make sure each user has a distinct id that we can pass
2020-02-10 13:18:01 -08:00
Tim Glaser
7b0b04f0ad Move api stuff around 2020-01-24 11:00:25 -08:00