docs: align contributing guide with CI checks#522
Conversation
Prompt To Fix All With AIThis is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 28
Comment:
**Import check environment differs from CI**
CI's `import-check` job runs `pip install .` (no extras) before `python -W error -c "import posthog"`, specifically to verify the base package imports cleanly with only its required dependencies. Locally, this runs against the full `--extra dev --extra test` environment (which includes `openai`, `anthropic`, `langchain`, etc.), so any warning that only surfaces in a minimal-install environment would not be reproduced.
A closer local equivalent would be:
```bash
uv run --no-dev --no-extra dev --no-extra test python -W error -c "import posthog"
```
or simply `pip install . && python -W error -c "import posthog"` in a fresh venv.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "docs: align contributing guide with ci" | Re-trigger Greptile |
| ruff check . | ||
| mypy --no-site-packages --config-file mypy.ini . | mypy-baseline filter | ||
| pytest --verbose --timeout=30 | ||
| python -W error -c "import posthog" |
There was a problem hiding this comment.
Import check environment differs from CI
CI's import-check job runs pip install . (no extras) before python -W error -c "import posthog", specifically to verify the base package imports cleanly with only its required dependencies. Locally, this runs against the full --extra dev --extra test environment (which includes openai, anthropic, langchain, etc.), so any warning that only surfaces in a minimal-install environment would not be reproduced.
A closer local equivalent would be:
uv run --no-dev --no-extra dev --no-extra test python -W error -c "import posthog"or simply pip install . && python -W error -c "import posthog" in a fresh venv.
Prompt To Fix With AI
This is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 28
Comment:
**Import check environment differs from CI**
CI's `import-check` job runs `pip install .` (no extras) before `python -W error -c "import posthog"`, specifically to verify the base package imports cleanly with only its required dependencies. Locally, this runs against the full `--extra dev --extra test` environment (which includes `openai`, `anthropic`, `langchain`, etc.), so any warning that only surfaces in a minimal-install environment would not be reproduced.
A closer local equivalent would be:
```bash
uv run --no-dev --no-extra dev --no-extra test python -W error -c "import posthog"
```
or simply `pip install . && python -W error -c "import posthog"` in a fresh venv.
How can I resolve this? If you propose a fix, please make it concise.
posthog-python Compliance ReportDate: 2026-04-17 12:27:24 UTC ✅ All Tests Passed!30/30 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 1/1 tests passed View Details
|
💡 Motivation and Context
The contributing guide had fallen behind the current CI workflow and did not mention the full set of code quality and import checks we run today.
This PR updates
CONTRIBUTING.mdso contributors can run the same local checks that GitHub Actions uses.💚 How did you test it?
.github/workflows/ci.yml📝 Checklist
If releasing new changes
sampo addto generate a changeset filereleaselabel to the PR