Skip to content

Commit 77190c2

Browse files
authored
document prep_local (#265)
1 parent b775339 commit 77190c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,19 @@ Assuming you have a [local version of PostHog](https://posthog.com/docs/developi
4646
### Releasing Versions
4747

4848
Updates are released using GitHub Actions: after bumping `version.py` in `master` and adding to `CHANGELOG.md`, go to [our release workflow's page](https://github.com/PostHog/posthog-python/actions/workflows/release.yaml) and dispatch it manually, using workflow from `master`.
49+
50+
51+
### Testing changes locally with the PostHog app
52+
53+
You can run `make prep_local`, and it'll create a new folder alongside the SDK repo one called `posthog-python-local`, which you can then import into the posthog project by changing pyproject.toml to look like this:
54+
```toml
55+
dependencies = [
56+
...
57+
"posthoganalytics" #NOTE: no version number
58+
...
59+
]
60+
...
61+
[tools.uv.sources]
62+
posthoganalytics = { path = "../posthog-python-local" }
63+
```
64+
This'll let you build and test SDK changes fully locally, incorporating them into your local posthog app stack. It mainly takes care of the `posthog -> posthoganalytics` module renaming. You'll need to re-run `make prep_local` each time you make a change, and re-run `uv sync --active` in the posthog app project.

0 commit comments

Comments
 (0)