KI-Konzil/_bmad-output/implementation-artifacts/stories/1-2-backend-python-umgebung-requirements.md
copilot-swe-agent[bot] d4cfb34423 Changes before error encountered
Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
2026-03-12 15:00:09 +00:00

2.1 KiB

Story 1.2: Backend-Python-Umgebung & Requirements

Status: done

Story

Als Backend-Entwickler, möchte ich eine vollständige requirements.txt mit allen Abhängigkeiten, so dass ich reproduzierbar installieren kann.

Acceptance Criteria

  1. pip install -r requirements.txt installiert FastAPI, LangGraph, langchain-anthropic, langchain-openai, SQLAlchemy, alembic, chromadb, tavily-python, pypdf, pytest
  2. pytest backend/tests/ läuft durch (0 oder mehr passed, 0 failed)
  3. asyncio_mode = auto ist in pytest.ini konfiguriert für async Tests
  4. Alle Pakete haben gepinnte Versionen für Reproduzierbarkeit

Tasks / Subtasks

  • Task 1: requirements.txt mit allen Abhängigkeiten erstellen (AC: 1, 4)
    • Subtask 1.1: Core: fastapi, uvicorn, pydantic
    • Subtask 1.2: AI: langgraph, langchain-anthropic, langchain-openai
    • Subtask 1.3: DB: sqlalchemy[asyncio], asyncpg, alembic
    • Subtask 1.4: Tools: chromadb, tavily-python, pypdf, langchain-text-splitters
    • Subtask 1.5: Test: pytest, pytest-asyncio, httpx, aiosqlite
  • Task 2: pytest.ini mit asyncio_mode = auto konfigurieren (AC: 2, 3)
  • Task 3: backend/__init__.py für Package-Erkennung

Dev Notes

  • aiosqlite wird für In-Memory-SQLite in Tests verwendet (kein PostgreSQL in CI)
  • httpx für async FastAPI-Test-Client (AsyncClient)

Project Structure Notes

  • backend/requirements.txt
  • backend/pytest.ini

References

  • [Source: CLAUDE.md#Python Code Style]
  • [Source: _bmad-output/planning-artifacts/architecture.md#Technische-Abhängigkeiten]

Dev Agent Record

Agent Model Used

Amelia (💻 BMAD Dev Agent)

Completion Notes List

  • aiosqlite ermöglicht In-Memory-SQLite für Tests ohne laufenden PostgreSQL-Server.
  • asyncio_mode = auto ist essentiell für pytest-asyncio-Kompatibilität mit allen async Fixtures.

File List

  • backend/requirements.txt
  • backend/pytest.ini
  • backend/__init__.py