-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
IQBCalculator.calculate_iqb_score currently accepts data=None and silently falls back to an internal sample dataset. This hides
missing-input errors and allows scores to be generated from placeholder data without the caller realizing it. The code already flags this as technical debt via a TODO to remove the default sample.
Problem
- Calling
calculate_iqb_score()without real measurement data still returns a score - Integration bugs can pass unnoticed
- Results may be generated from fake/default values
- The method contract is misleading:
dataappears optional, but meaningful scoring requires real input
Expected Behavior
calculate_iqb_scorerequires explicit input data- No internal fallback sample is used
- Callers and tests must pass real sample fixtures
Proposed Change
- Make
dataa required parameter in the method signature - Remove the internal sample dictionary fallback
- Update all affected tests that currently call the method without data
- Leave
print_detailsbehavior unchanged (out of scope)
Why This Matters
- Enforces explicit API usage
- Prevents accidental scoring with placeholder data
- Surfaces integration errors early
- Improves correctness and reliability
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels