You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,22 @@ Please see the [Python integration docs](https://posthog.com/docs/integrations/p
14
14
2. Run `source env/bin/activate` (activates the virtual environment)
15
15
3. Run `python3 -m pip install -e ".[test]"` (installs the package in develop mode, along with test dependencies)
16
16
* or `uv pip install -e ".[test]"`
17
-
4. Run `make test`
17
+
4. you have to run `pre-commit install` to have auto linting pre commit
18
+
5. Run `make test`
18
19
1. To run a specific test do `pytest -k test_no_api_key`
19
20
21
+
## PostHog recommends `uv` so...
22
+
23
+
```bash
24
+
uv python install 3.9.19
25
+
uv python pin 3.9.19
26
+
uv venv env
27
+
source env/bin/activate
28
+
uv pip install --editable ".[dev,test]"
29
+
pre-commit install
30
+
make test
31
+
```
32
+
20
33
### Running Locally
21
34
22
35
Assuming you have a [local version of PostHog](https://posthog.com/docs/developing-locally) running, you can run `python3 example.py` to see the library in action.
posthog/request.py:0: error: Library stubs not installed for "dateutil.tz" [import-untyped]
@@ -38,4 +37,4 @@ posthog/ai/utils.py:0: note: Perhaps you meant "typing.Any" instead of "any"?
38
37
posthog/ai/utils.py:0: error: Function "builtins.any" is not valid as a type [valid-type]
39
38
posthog/ai/utils.py:0: note: Perhaps you meant "typing.Any" instead of "any"?
40
39
sentry_django_example/sentry_django_example/settings.py:0: error: Need type annotation for "ALLOWED_HOSTS" (hint: "ALLOWED_HOSTS: list[<type>] = ...") [var-annotated]
41
-
sentry_django_example/sentry_django_example/settings.py:0: error: Incompatible types in assignment (expression has type "str", variable has type "None") [assignment]
40
+
sentry_django_example/sentry_django_example/settings.py:0: error: Incompatible types in assignment (expression has type "str", variable has type "None") [assignment]
0 commit comments