Repository navigation
Conversation
Backcheck Coverage is now the share of eligible unique survey IDs with a matching backcheck, shown against the target %, and no longer needs comparison columns. A Targets row shows backchecks done against ceil(survey_target x target% / 100) when the survey target is set. The target % resolves from the settings panel, then the page config, then 10% with a warning; clearing the panel falls back to the page config. An optional eligibility filter restricts the base. The enumerator view of the error statistics table shows per-enumerator coverage, including enumerators with no backchecks; the backchecker view shows backchecks done. Closes #318 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s cleared Clearing the backcheck target input left the widget at None for the rest of the session, so the 10% default applied and the "no target set" warning showed even when the page config had a target. The input's change callback now saves the cleared value and restores the page config target in the input. A saved target outside 0-100 (from the old count-based input) is ignored instead of failing validation. Also reads the target from BackcheckCoverage in the coverage card, and moves the breaking BackcheckSettings and error-statistics changes under Changed in the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in Targets The summary's count cards now share one row, and a Targets section shows Backcheck Coverage next to Backchecks vs Expected. The progress bar is gone; Backchecks vs Expected shows how many backchecks above or below the expected total as its delta, like coverage's points vs target. The wider card also stops the "done / expected (%)" value from being truncated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A valid 0% target crashes the summary, and the required expected-total progress bar is missing.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds target-based backcheck coverage tracking across calculations, settings, reports, and documentation.
Changes:
- Adds overall and per-staff coverage calculations with eligibility filtering.
- Adds target configuration and expected-backcheck UI metrics.
- Updates tests, documentation, and page wiring.
| File | Description |
|---|---|
src/datasure/checks/backchecks/coverage.py |
Implements coverage calculations. |
src/datasure/checks/backchecks/models.py |
Extends backcheck settings. |
src/datasure/checks/backchecks/compute.py |
Updates settings resolution and statistics. |
src/datasure/checks/backchecks/settings_ui.py |
Adds target and eligibility controls. |
src/datasure/checks/backchecks/report_ui.py |
Renders target metrics and staff coverage. |
src/datasure/views/output_view_template.py |
Passes the survey target to backchecks. |
src/datasure/utils/onboarding_utils.py |
Updates onboarding guidance. |
tests/checks/backchecks/test_coverage.py |
Tests coverage behavior. |
tests/checks/backchecks/test_settings_ui.py |
Updates settings tests. |
tests/checks/backchecks/test_report_ui.py |
Updates summary tests. |
tests/checks/backchecks/test_models.py |
Updates model defaults. |
tests/checks/backchecks/test_compute.py |
Updates statistics expectations. |
tests/checks/backchecks/conftest.py |
Extends Streamlit mocks. |
docs/USER_GUIDE.md |
Documents target tracking. |
CHANGELOG.md |
Records features and breaking changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A 0% target with a survey target set expects 0 backchecks, which leaves the progress percentage unset, and formatting it crashed the summary. The card now shows "done / 0" without a percentage, and keeps the deviation delta. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Pull Request Summary 🚀
Closes #318. Stacked on #319 (#300): this PR targets
fix/300-backcheck-date-joinand should be retargeted tomainonce #300 merges.What does this PR do? 📝
The backchecks report now tracks progress against the backcheck target.
Why is this change needed? 🤔
The backcheck target % was set in two places but nothing read it (#299). The old "Backcheck Coverage %" divided matched keys by raw survey rows and read 0% until comparison columns were configured. The table's "Surveys" and "Backchecks" columns were always equal. Teams had no way to see whether backchecks were keeping pace with the target, overall or per enumerator.
How was this implemented? 🛠️
checks/backchecks/coverage.py, with no Streamlit dependency:Breaking for internal callers: the target % setting no longer defaults to 10, and the error-rate statistics no longer return "Surveys" and "Backchecks". Both are listed under Changed in the CHANGELOG.
How to test or reproduce ? 🧪
just test. The newtests/checks/backchecks/test_coverage.pycovers target resolution (panel, page config, default, cleared and out-of-range values), the eligibility filter, on-track %, points vs target, expected backchecks (rounding up, over 100%, unset), and per-enumerator and per-backchecker coverage.Screenshots (if applicable) 📷
Checklist ✅
src/; the rest are the new coverage tests (about 300 lines) and the CHANGELOG and user guide updates.fix/300-backcheck-date-join; no conflicts.Reviewer Emoji Legend
:code::smiley::+1::100:...and I want the author to know it! This is a way to highlight positive parts of a code review.
:star: :star: :star:And I am providing reasons why it needs to be addressed as well as suggested improvements.
:star: :star:And I am providing suggestions where it could be improved either in this PR or later.
:star:...and consider this a suggestion, not a requirement.
:question:This should be a fully formed question with sufficient information and context that requires a response.
:memo::pick:This does not require any changes and is often better left unsaid. This may include stylistic, formatting, or organization suggestions and should likely be prevented/enforced by linting if they really matter
:recycle:Should include enough context to be actionable and not be considered a nitpick.
🤖 Generated with Claude Code