:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): install only hogli for the api ratchet (#126602)
posthog[bot]358a2027fe26
diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.ymlindex 063323e45209..dcc58ed777b7 100644--- a/.github/workflows/ci-python.yml+++ b/.github/workflows/ci-python.yml@@ -582,7 +582,12 @@ jobs:uses: ./.github/actions/setup-uv- name: Install python dependencies- run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev+ run: |+ if grep -q '^from posthog.dataclasses import frozen' tools/hogli-commands/hogli_commands/api_ratchet.py; then+ UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev+ else+ UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --no-dev --package hogli+ fi# Skip on unrebased branches: the command may not be registered yet.- name: Ratchet product paths in lib/api.tsdiff --git a/tools/hogli-commands/hogli_commands/api_ratchet.py b/tools/hogli-commands/hogli_commands/api_ratchet.pyindex aa294d97ab5b..f07351336628 100644--- a/tools/hogli-commands/hogli_commands/api_ratchet.py+++ b/tools/hogli-commands/hogli_commands/api_ratchet.py@@ -60,8 +60,6 @@ from typing import Finalimport clickfrom hogli.manifest import REPO_ROOT-from posthog.dataclasses import frozen-API_TS: Final = Path("frontend/src/lib/api.ts")CORE_GENERATED: Final = Path("frontend/src/generated/core/api.ts")PRODUCT_GENERATED_GLOB: Final = "products/*/frontend/generated/api.ts"@@ -361,7 +359,7 @@ def _blocks_with_return(lines: list[str], paths: list[tuple[int, ...]]) -> frozereturn frozenset(has_return)-@frozen+@dataclass(frozen=True, kw_only=True, slots=True)class SameLevelIfGuard:"""A same-level if-block found before a return, and the variable it guards on."""