Skip to content

service: read_sample_questionnaire() reads from tests/, excluded from Docker image #24

Description

@mdvnavy

Location

client_discovery/service.pyread_sample_questionnaire() (~line 19-21)

Problem

def read_sample_questionnaire() -> str:
    return (BASE_DIR / "tests" / "fixtures" / "complete_questionnaire.md").read_text(encoding="utf-8")

This reads only from tests/fixtures/..., but .dockerignore excludes tests/ from the container image. If this module is used in Cloud Run (or any build that omits tests/), the sample loader will crash with FileNotFoundError.

Fix

Mirror the app's runtime-first sample lookup — ship the sample under samples/sample_questionnaire.md (or similar runtime location) and use tests/fixtures/... only as a fallback during local/test runs.

Source

Originally raised in review of PR #21 (now docs-only): outdated thread PRRT_kwDOSzLAqc6JYBhc. Confirmed still present on main.

/tracked-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions