Files
transcription/docs/mvp/mvp-step5-results.md
T

1.9 KiB
Raw Blame History

Step 5 is implemented and passing

What I implemented

App/bootstrap

  • Added src/transcription/app.py:
    • create_app() factory
    • FastAPI lifespan startup/shutdown:
      • setup_logging()
      • create_all()
      • ensure upload_dir and prompt_dir
      • start/stop worker thread (run_worker_loop)
    • includes health router
    • registers NiceGUI pages

API

  • Added src/transcription/api/__init__.py
  • Added src/transcription/api/health.py:
    • GET /healthz returns {"status": "ok"}

UI

  • Added src/transcription/ui/upload_page.py:
    • upload page route
    • accepted extensions helper
    • upload submit helper to Step 4 service (create_upload_job)
    • success/error state messaging
  • Added src/transcription/ui/jobs_page.py:
    • jobs list page
    • job detail page
    • fetch_jobs() and fetch_job_detail() helpers
  • Updated src/transcription/ui/__init__.py:
    • explicit page registration
    • NiceGUI mounted via ui.run_with(app, mount_path="/ui", ...)

Dependencies

  • Added runtime dependencies:
    • fastapi
    • nicegui

Tests created and filled (scaffold → fill)

  • tests/test_app.py
  • tests/api/test_health.py
  • tests/ui/test_pages_registration.py
  • tests/ui/test_upload_page.py
  • tests/ui/test_jobs_page.py

All scaffolded method names/docstrings were preserved and filled with executable assertions.


Validation results (strict sequence)

  • uv run pytest --collect-only -q
  • uv run pytest -m unit -q
  • uv run pytest tests/api/test_health.py -q
  • uv run pytest tests/ui/test_pages_registration.py -q
  • uv run pytest tests/test_app.py -q
  • uv run pytest tests/ui/test_upload_page.py -q
  • uv run pytest tests/ui/test_jobs_page.py -q
  • uv run pytest -q

Full suite is green.


Note

Youll see one warning from FastAPI/Starlette test client about httpx deprecation; it does not affect correctness and all tests pass.