feat(pry): phase 0 — split routers, add tests, apify schema, pry api key #5

Merged
cryptorugmunch merged 2 commits from feat/phase0-router-split into main 2026-07-03 03:43:03 +02:00

Phase 0 reliability work for Pry:

  • Split scraping endpoints from api.py into routers/scraping.py
  • Split template endpoints into routers/templates.py with POST /v1/templates/batch
  • Introduce deps.py for shared singleton instances
  • Add e2e tests for scraping, templates, auth, and Apify schema (23 new tests)
  • Add reusable Apify actor input/output schema builder (apify_schema.py)
  • Add PRY_API_KEY startup warning and deploy key to Talos /srv/pry/.env
  • Register /v1/templates/batch as paid x402 operation
Phase 0 reliability work for Pry: - Split scraping endpoints from api.py into routers/scraping.py - Split template endpoints into routers/templates.py with POST /v1/templates/batch - Introduce deps.py for shared singleton instances - Add e2e tests for scraping, templates, auth, and Apify schema (23 new tests) - Add reusable Apify actor input/output schema builder (apify_schema.py) - Add PRY_API_KEY startup warning and deploy key to Talos /srv/pry/.env - Register /v1/templates/batch as paid x402 operation
cryptorugmunch added 3 commits 2026-07-03 01:31:13 +02:00
- Split scraping endpoints from api.py into routers/scraping.py
- Split template endpoints into routers/templates.py with POST /v1/templates/batch
- Introduce deps.py for shared singleton instances
- Add e2e tests for scraping, templates, auth, and Apify schema (23 new tests)
- Add reusable Apify actor input/output schema builder (apify_schema.py)
- Add PRY_API_KEY startup warning and deploy key to Talos /srv/pry/.env
- Register /v1/templates/batch as paid x402 operation
Merge remote-tracking branch 'origin/main'
Some checks failed
CI / lint (pull_request) Failing after 55s
CI / typecheck (pull_request) Failing after 2m6s
CI / Secret scan (gitleaks) (pull_request) Successful in 35s
CI / test (pull_request) Successful in 2m17s
CI / Security audit (bandit) (pull_request) Successful in 2m49s
c4628b8d6e
cryptorugmunch added 1 commit 2026-07-03 01:33:45 +02:00
fix(pry): load .env in docker-compose so PRY_API_KEY is honored
Some checks failed
CI / lint (pull_request) Failing after 2m36s
CI / test (pull_request) Successful in 2m8s
CI / typecheck (pull_request) Failing after 2m33s
CI / Secret scan (gitleaks) (pull_request) Successful in 54s
CI / Security audit (bandit) (pull_request) Successful in 1m23s
fae3f1c892
cryptorugmunch added 1 commit 2026-07-03 01:35:18 +02:00
fix(pry): avoid host port conflict by moving pry-flaresolverr to 127.0.0.1:8192
Some checks failed
CI / typecheck (pull_request) Failing after 6m39s
CI / lint (pull_request) Failing after 1m19s
CI / test (pull_request) Successful in 1m42s
CI / Secret scan (gitleaks) (pull_request) Successful in 32s
CI / Security audit (bandit) (pull_request) Successful in 50s
041525af5d
cryptorugmunch added 1 commit 2026-07-03 01:37:17 +02:00
docs(pry): update STATUS.md with phase 0 deploy status
Some checks failed
CI / test (pull_request) Successful in 5m34s
CI / Security audit (bandit) (pull_request) Successful in 33s
CI / lint (pull_request) Failing after 58s
CI / typecheck (pull_request) Failing after 6m17s
CI / Secret scan (gitleaks) (pull_request) Successful in 57s
a3cad41da2
cryptorugmunch added 2 commits 2026-07-03 03:37:11 +02:00
- Add alembic to dev deps and requirements.txt.
- Initialize alembic/ config with SQLite + Postgres support.
- Create 0001_initial_schema migration covering all 26 models.
- Add db.run_migrations() helper and  CLI command.
- Add docker-entrypoint.sh to run migrations before app start.
- Keep Base.metadata.create_all() for backward compatibility.
- Add tests verifying alembic current and upgrade head work.
feat(routers): split remaining 174 api.py routes into per-tag routers
Some checks failed
CI / lint (pull_request) Failing after 52s
CI / typecheck (pull_request) Failing after 56s
CI / Secret scan (gitleaks) (pull_request) Successful in 32s
CI / Security audit (bandit) (pull_request) Successful in 34s
CI / test (pull_request) Successful in 1m23s
9db3f26f95
- AST-extract all remaining routes from api.py into routers/*.py
- Group routes by OpenAPI tag (AI, Advanced, Agency, ..., x402)
- Keep existing auth/health/scraping/templates routers; add *_api.py for remaining routes of those tags
- Move shared helpers/models/variables with the routes that need them
- Update tests/test_api.py to import vision helpers from routers.vision
- Regenerate openapi.json (186 paths)
- All 497 tests pass; ruff clean
cryptorugmunch force-pushed feat/phase0-router-split from 9db3f26f95 to 9fee12796e 2026-07-03 03:42:39 +02:00 Compare
cryptorugmunch merged commit 8b52f14774 into main 2026-07-03 03:43:03 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: RugMunchMedia/pryscraper#5
No description provided.