feat(grz-db,grzctl): add selected_for_qc submission column to submission database (#531)
Summary
Introduce persisted QC selection decisions via selected_for_qc and a QC queue table, aligning should_qc() behavior with the streaming approach of submissions.
Changes
- Add selected_for_qc: bool | None to the submission model.
- Add an Alembic migration to create the selected_for_qc column on submissions.
- Backfill selected_for_qc = true for historical submissions already in QCING / QCED.
- Add a QC queue table (qc_queue) to track submissions that passed basic QC, ordered by basic_qc_passed_at.
- Keep the QC queue in sync when basic_qc_passed changes (insert/remove queue entry; force selected_for_qc=false on basic_qc_passed=false).
- Update should_qc() so selected_for_qc is the primary, persisted decision signal:
- selected_for_qc=True returns True (cached yes)
- selected_for_qc=False returns False (cached no)
- selected_for_qc=None computes the decision and persists True or False
- Keep selection logic backward-compatible by also counting historical QCING / QCED states as “selected” when evaluating monthly/quarterly targets.
- Improve CLI handling: grzctl db should-qc exits cleanly with an error message when the submission is not eligible/missing required metadata.
- Update/extend tests to reflect persisted selected_for_qc behavior and the random-selection stage.
Notes
- selected_for_qc represents a durable selection decision, not a transient hint: both positive and negative outcomes are persisted to ensure idempotent behavior across repeated should_qc() calls.
- Historical rows are initialized from existing QCING / QCED states. For new rows, should_qc() is the source of truth for setting selected_for_qc.
- The QC queue table reflects the “passed basic QC → eligible for selection” step in streaming_approach_flo.md.
Fixes #530
Co-authored-by: Till Hartmann till.hartmann@bih-charite.de Co-authored-by: Florian R. Hölzlwimmer Hoeze@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
GRZ Tools Monorepo
This monorepo hosts the following packages:
grz-cli- A command-line tool for validating, encrypting and uploading submissions to a GRZ.grz-pydantic-models- Pydantic models for schemas related to the genomDE Model Project.grzctl- GRZ internal tooling.grz-common- Common code shared between packages ingrz-tools.grz-db- Libraries, SQL models and alembic migrations for the GRZ internal submission DB.grz-cli
The
grz-clipackage is the primary CLI for submissions to the GRZs. It provides functionality for:For detailed installation and usage instructions, please refer to the grz-cli README.
Development setup
See CONTRIBUTING.md for instructions on setting up a development environment.
Legacy Information
Previous grz-cli repository content is still available in the
archive/pre-monorepobranch.