Skip to content

Commit 15c1527

Browse files
authored
docs: align contributing guide with CI checks (#522)
docs: align contributing guide with ci
1 parent fe12309 commit 15c1527

1 file changed

Lines changed: 13 additions & 22 deletions

File tree

CONTRIBUTING.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,26 @@ Thanks for your interest in improving the PostHog Python SDK.
66

77
This repo requires all commits to be signed. To configure commit signing, see the [PostHog handbook](https://posthog.com/handbook/engineering/security#commit-signing).
88

9-
## Testing locally
9+
## Setup
1010

1111
We recommend using [uv](https://docs.astral.sh/uv/).
1212

13-
1. Create a virtual environment:
14-
- `uv venv env`
15-
- or `python3 -m venv env`
16-
2. Activate it:
17-
- `source env/bin/activate`
18-
3. Install the package in editable mode with development and test dependencies:
19-
- `uv sync --extra dev --extra test`
20-
- or `pip install -e ".[dev,test]"`
21-
4. Install pre-commit hooks:
22-
- `pre-commit install`
23-
5. Run the test suite:
24-
- `make test`
25-
6. Run a specific test if needed:
26-
- `pytest -k test_no_api_key`
27-
28-
## Recommended `uv` workflow
29-
3013
```bash
31-
uv python install 3.12
32-
uv python pin 3.12
3314
uv venv
3415
source .venv/bin/activate
3516
uv sync --extra dev --extra test
36-
pre-commit install
37-
make test
17+
```
18+
19+
## CI-aligned checks
20+
21+
Run the same core checks CI uses before opening a PR:
22+
23+
```bash
24+
ruff format --check .
25+
ruff check .
26+
mypy --no-site-packages --config-file mypy.ini . | mypy-baseline filter
27+
pytest --verbose --timeout=30
28+
python -W error -c "import posthog"
3829
```
3930

4031
## Running locally

0 commit comments

Comments
 (0)