follow-up(statistics): P3 cleanups from #90 review (usual-weekday baselines) #97
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#97
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-ups from the pass-2 review of #90 (comment on #90). All P3; the P2s were fixed in
d710ba8before merge.Standards
datetime.date.fromisoformat(facility_cycle_bounds(None, reset).label)recurs inanalytics_service.py; extractactive_business_day(reset).validate_closed_statistics_day_asyncre-reads config the caller already read.ValueError → 422blocks instatistics_controller.pyandanalytics_controller.py. One helper or exception handler.baseline: str | Nonewhile the controllers useLiteral["same_weekday_4w"];UsualHourlyBaseline.reason/UsualDaypartsBaseline.reasonare barestr. Share oneLiteralalias inapp/schemas/.get_hourly_timeseries_async/get_dwell_dayparts_async. Fine for 4 samples; a narrower per-day aggregate would be clearer.CASEduplicated.is_cycle_data_trusted_asyncandget_trusted_calibration_history_asyncboth spell out RETROACTIVE > MANUAL > AUTOMATIC. Extract one SQL fragment.if shares else 0.0in the daypart baseline can't be reached now thatusablerequires entries.tests/test_statistics_baselines.pycompares a sum of rounded shares with== 100.0; usepytest.approx.Spec
INSUFFICIENT_USUAL_WEEKDAYSbranch untested (candidates exist but fewer than 2 are usable), andmean_share_percentis only checked in a case where every share is 100%.UsualDaypart./api/analytics/dwell/daypartswithdate=; the route parameter isday.🤖 Generated with Claude Code
The opening-hours question is settled in #105 (only compare days with matching opening hours); daypart clock labels moved to #106. The rest stays here.
🤖 Generated with Claude Code
gabogg referenced this issue2026-09-28 00:11:46 +00:00
Resolved by #167 (merged 2026-10-02,
103157c). Every item is done; the daypart item moved to #105/#106. Third-pass leftovers are tracked in #219.