Skip to content

docs: align contributing guide with CI checks#522

Merged
marandaneto merged 1 commit intomainfrom
docs/align-contributing-with-ci
Apr 17, 2026
Merged

docs: align contributing guide with CI checks#522
marandaneto merged 1 commit intomainfrom
docs/align-contributing-with-ci

Conversation

@marandaneto
Copy link
Copy Markdown
Member

💡 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.md so contributors can run the same local checks that GitHub Actions uses.

💚 How did you test it?

  • Not run (docs-only changes)
  • Compared the updated commands against .github/workflows/ci.yml

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file
  • Added the release label to the PR

@marandaneto marandaneto requested a review from a team as a code owner April 17, 2026 12:24
@marandaneto marandaneto enabled auto-merge (squash) April 17, 2026 12:25
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 17, 2026

Prompt To Fix All 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.

Reviews (1): Last reviewed commit: "docs: align contributing guide with ci" | Re-trigger Greptile

Comment thread CONTRIBUTING.md
ruff check .
mypy --no-site-packages --config-file mypy.ini . | mypy-baseline filter
pytest --verbose --timeout=30
python -W error -c "import posthog"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@marandaneto marandaneto merged commit 15c1527 into main Apr 17, 2026
27 checks passed
@marandaneto marandaneto deleted the docs/align-contributing-with-ci branch April 17, 2026 12:27
@github-actions
Copy link
Copy Markdown
Contributor

posthog-python Compliance Report

Date: 2026-04-17 12:27:24 UTC
Duration: 160037ms

✅ All Tests Passed!

30/30 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 518ms
Format Validation.Event Has Uuid 1507ms
Format Validation.Event Has Lib Properties 1507ms
Format Validation.Distinct Id Is String 1507ms
Format Validation.Token Is Present 1507ms
Format Validation.Custom Properties Preserved 1507ms
Format Validation.Event Has Timestamp 1508ms
Retry Behavior.Retries On 503 9519ms
Retry Behavior.Does Not Retry On 400 3506ms
Retry Behavior.Does Not Retry On 401 3506ms
Retry Behavior.Respects Retry After Header 9514ms
Retry Behavior.Implements Backoff 23527ms
Retry Behavior.Retries On 500 7508ms
Retry Behavior.Retries On 502 7513ms
Retry Behavior.Retries On 504 7512ms
Retry Behavior.Max Retries Respected 23530ms
Deduplication.Generates Unique Uuids 1499ms
Deduplication.Preserves Uuid On Retry 7516ms
Deduplication.Preserves Uuid And Timestamp On Retry 14521ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7509ms
Deduplication.No Duplicate Events In Batch 1504ms
Deduplication.Different Events Have Different Uuids 1507ms
Compression.Sends Gzip When Enabled 1507ms
Batch Format.Uses Proper Batch Structure 1508ms
Batch Format.Flush With No Events Sends Nothing 1006ms
Batch Format.Multiple Events Batched Together 1505ms
Error Handling.Does Not Retry On 403 3509ms
Error Handling.Does Not Retry On 413 3508ms
Error Handling.Retries On 408 7512ms

Feature_Flags Tests

1/1 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 522ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants