Skip to content

[Bug/Test Data] Seed all value types + lab values + samples; fix GET /annotations 404 #17

@jeandavidt

Description

@jeandavidt

Problems

1. Missing value-type coverage in seed data

sql/seed_v2.2.0.sql seeds Scalar channels but Vector/Matrix/Image values are either commented out or missing. The Data Explorer's Vector, Matrix, and Image tabs have nothing to display in a fresh Docker environment.

2. Annotations seed commented out

The annotation insert in sql/seed_v2.2.0.sql is commented out, so the annotations page always shows "No annotations found" and users cannot test annotation features against real data.

3. API bug — GET /annotations returns 404

app/api_client.py calls GET /annotations (optionally with ?channel_id=), but no handler exists for this route in api/v1/endpoints/annotations.py. Defined routes are:

  • GET /annotations/recent
  • GET /annotations/by-type/{type_name}
  • PUT /annotations/{annotation_id}
  • DELETE /annotations/{annotation_id}

A plain GET /annotations handler (with optional channel_id query param) is missing → every page load of the Annotations page returns 404 Not Found:

Cannot load annotations: Not Found

Acceptance Criteria

  • sql/seed_v2.2.0.sql contains at least 1 channel + values for each of: Scalar, Vector, Matrix, Image
  • At least 1 LabAnalysis with associated LabValues seeded
  • At least 1 Sample seeded
  • At least 1 Annotation seeded (uncommented / updated to current schema)
  • GET /annotations endpoint added to api/v1/endpoints/annotations.py, accepting optional ?channel_id= query param
  • Annotations page loads without error on a fresh Docker container

Files to Modify

  • sql/seed_v2.2.0.sql — add/uncomment Vector, Matrix, Image, Annotation inserts; verify LabAnalysis/LabValue/Sample rows
  • api/v1/endpoints/annotations.py — add GET "" handler with optional channel_id query param
  • api/v1/repositories/annotation_repository.py — add list_annotations(conn, channel_id=None) query

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendAPI / server-side changesbugSomething isn't workingtest-dataSeed data / test fixtures

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions