feat(pry): production readiness pass — apify actor, async db, retry wiring, tests, observability, mypy

- Pin Dockerfile --workers 1

- Wire retry.py + circuit breakers into ultimate_scraper tiers

- Add Apify actor (apify_actor.py, Dockerfile.apify, .actor/actor.json)

- Add async SQLAlchemy support alongside sync db.py

- Add 31 HTTP integration tests (tests/test_api_integration.py + test_api_mcp.py)

- Add OTLP exporter support in observability.py

- Re-enable mypy var-annotated error code; fix annotations

- Improve CI workflow (pip cache, install -e .[dev], gitleaks, commitlint, 40% coverage gate)
This commit is contained in:
Crypto Rug Munch 2026-07-03 14:41:41 +02:00
parent 5a21133b1d
commit 345cd79bc9
21 changed files with 1979 additions and 44 deletions

25
Dockerfile.apify Normal file
View file

@ -0,0 +1,25 @@
# Pry — Apify Actor Dockerfile
# Lightweight image for Apify platform deployment.
# Unlike the main Dockerfile, this skips Playwright/Chromium
# (the Apify platform provides browser rendering via Puppeteer).
# Only the HTTP/TLS/cloudscraper tiers are available here.
FROM apify/actor-python:3.12
# Copy everything
COPY --chmod=755 . /usr/src/app
WORKDIR /usr/src/app
# Install runtime dependencies (no dev deps)
RUN pip install --no-cache-dir -r requirements.txt \
&& rm -rf /root/.cache
# Install Apify SDK (not in requirements.txt — only needed for the actor)
RUN pip install --no-cache-dir "apify~=1.7.0" \
&& rm -rf /root/.cache
# The actor entry point
ENV PRY_ACTOR=true
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["python3", "-m", "apify_actor"]