MAINT-20 part 1 review: restore three lost lines, rewrap ragged comments
Comment, docstring and DECISIONS only (same-code script OK; python -OO bytecode now identical for all six files). - peakguard.charge_room_w: one-line docstring + SAFETY-125 pointer (cut whole). - peakguard.shaping_suspended: keep 'the one place this conjunction is written; do not inline it'. - price_forecast module note: an hour with no price and no yesterday is left out, never filled (test_price.py 14d cites the module note for it). - Refill comment blocks the cut left ragged; DECISIONS pointers on one line. - FCST-04 note: _yesterday_of(), not _previous_day(); FCST-03 note: the 49 stronger cases are why the rule is a real change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6e2fde63ff
commit
63dda4b0d3
@@ -6,8 +6,10 @@ price. This module owns the fill and the gate; the widening arithmetic is in
|
||||
price.py. The flag is never passed through: a carried point is built only by
|
||||
`_carried()` (no flag parameter), a published point is passed by identity, and
|
||||
`_audit()` raises on a mismatch. The fill keys on the Brussels wall-clock hour,
|
||||
and a sub-hourly feed is never decimated. `begin_phase()` is the price-justified
|
||||
entry point only; the calendar path is untouched. All of it:
|
||||
and a sub-hourly feed is never decimated. An hour with neither a published
|
||||
price nor a yesterday value is left out, never filled (`at()` raises `Absence`,
|
||||
11.4 applies). `begin_phase()` is the price-justified entry point only; the
|
||||
calendar path is untouched. All of it:
|
||||
DECISIONS/FCST-03-the-hours-not-yet-published.md."""
|
||||
|
||||
import logging
|
||||
@@ -124,8 +126,7 @@ def fill_from_yesterday(read: PriceRead, *, yesterday: PriceRead,
|
||||
published = _published_by_hour(read)
|
||||
|
||||
# Yesterday's profile, keyed by BRUSSELS WALL-CLOCK HOUR. First point wins
|
||||
# when
|
||||
# yesterday itself was a 25-hour day.
|
||||
# when yesterday itself was a 25-hour day.
|
||||
by_local_hour = {}
|
||||
yesterday.match(
|
||||
series=lambda r: [by_local_hour.setdefault(brussels(p.start).hour, p)
|
||||
|
||||
Reference in New Issue
Block a user