From 10ff390ef9b406a5f5b36afb32e374eee4479741 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 00:20:43 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20remove=2018=20unused=20heavy=20deps=20?= =?UTF-8?q?=E2=80=94=20Docker=20image=20~4GB=20=E2=86=92=20~800MB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed packages never imported or only in try/except: - crewai (pulls torch ~2GB), mem0ai, langgraph, langchain-* - camel-tools, weasyprint, statsforecast (zero imports) - pandas, paramiko, psycopg2-binary (zero imports in app/) - pytest/factory-boy (testing only), celery-redbeat (workers only) 454 routes, 40/40 tests pass. https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs --- salesflow-saas/backend/requirements.txt | 62 ++++++++----------------- 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/salesflow-saas/backend/requirements.txt b/salesflow-saas/backend/requirements.txt index 0cf2bda2..f799b5e5 100644 --- a/salesflow-saas/backend/requirements.txt +++ b/salesflow-saas/backend/requirements.txt @@ -3,82 +3,58 @@ fastapi==0.115.5 uvicorn[standard]==0.32.1 pydantic>=2.10.0,<3 pydantic-settings>=2.10.1,<3 -pydantic-extra-types[phonenumbers]>=2.0.0 # Saudi phone validation (+966) +pydantic-extra-types[phonenumbers]>=2.0.0 python-multipart==0.0.12 # === Database === sqlalchemy==2.0.36 asyncpg==0.30.0 -psycopg2-binary==2.9.10 alembic==1.14.0 pgvector==0.3.6 # === AI / LLM Providers === -litellm>=1.74.0,<2 # httpx>=0.28 compatible (older litellm capped httpx<0.28) -instructor>=1.14.0 # Structured LLM outputs via Pydantic models +litellm>=1.74.0,<2 +instructor>=1.14.0 groq==0.12.0 -openai>=2.8.0,<3 # litellm 1.8x+ requires openai>=2.8; mem0ai 1.x supports it -langchain==0.3.28 -langchain-groq==0.2.1 -langchain-community==0.3.28 -langchain-anthropic==0.2.0 -langgraph==0.2.53 -crewai>=0.95.0,<1 # aligns with litellm/langchain stack; 0.80 pulled incompatible crewai-tools -mem0ai>=1.0.0,<2 # 0.1.x capped openai<2; incompatible with current litellm +openai>=2.8.0,<3 -# === Arabic NLP === -camel-tools>=1.5.0 # Arabic morphology, NER, dialect detection (NYU Abu Dhabi) -pyarabic>=0.6.15 # Arabic text normalization, diacritics removal +# === Arabic NLP (lightweight) === +pyarabic>=0.6.15 # === WhatsApp Business API === -pywa>=3.0.0 # Direct WhatsApp Cloud API (async, webhooks, templates) -twilio==9.3.7 # Twilio fallback +pywa>=3.0.0 +twilio==9.3.7 # === Communication === httpx>=0.28.1,<0.29.0 -resend>=2.0.0 # Transactional email API (free tier, FastAPI-native) +resend>=2.0.0 # === Saudi-specific === -hijridate>=2.4.0 # Hijri-Gregorian calendar (Umm al-Qura, official Saudi) -phonenumbers>=8.13.0 # Saudi phone number validation and formatting - -# === PDF Generation (Arabic RTL) === -weasyprint>=60.0 # HTML/CSS to PDF with Arabic RTL support +hijridate>=2.4.0 +phonenumbers>=8.13.0 # === Security === -PyJWT[crypto]>=2.8.0 # JWT (replaces abandoned python-jose) +PyJWT[crypto]>=2.8.0 passlib[bcrypt]==1.7.4 bcrypt>=4.0.1,<5 -slowapi>=0.1.9 # API rate limiting with Redis backend +slowapi>=0.1.9 -# === Caching & Performance === +# === Caching === redis==5.2.0 -fastapi-cache2>=0.2.1 # Response caching with Redis backend -celery-redbeat>=2.2.0 # Dynamic Celery Beat scheduler (Redis-backed) +fastapi-cache2>=0.2.1 # === Monitoring & Logging === -sentry-sdk[fastapi]>=2.0.0 # Error tracking + performance monitoring -prometheus-fastapi-instrumentator>=7.0.0 # Prometheus metrics -structlog>=24.0.0 # Structured JSON logging with tenant context - -# === Testing === -pytest==8.3.4 -pytest-asyncio==0.24.0 # Async test support — pinned for CI stability -pytest-cov==5.0.0 # Coverage reporting — pinned for stability -factory-boy>=3.3.0 # Test data factories for SQLAlchemy models - -# === Forecasting === -statsforecast>=1.7.0 # Fast statistical time-series forecasting +sentry-sdk[fastapi]>=2.0.0 +prometheus-fastapi-instrumentator>=7.0.0 +structlog>=24.0.0 # === Data & Utilities === beautifulsoup4==4.12.3 lxml==5.3.0 requests>=2.32.5,<3 python-dateutil==2.9.0 -pandas==2.2.3 -numpy>=1.26.2,<2 # camel-tools requires numpy<2; langchain needs >=1.26.2 on Py3.12 +numpy>=1.26.2,<2 python-decouple==3.8 -paramiko==3.5.0 qrcode==8.0 Pillow==11.0.0 xmltodict==0.14.2