• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 34330049935
85%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 08:48AM UTC
Jobs 1
Files 182
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2026 08:36AM UTC coverage: 85.016% (-0.003%) from 85.019%
34330049935

push

github

web-flow
Fix inverted sign of aggregate-consumption schedules (#2499)

* Fix inverted sign of aggregate-consumption schedules

The flex-context's aggregate-consumption and aggregate-production sensors record the
aggregate power schedule of all devices scheduled together. Their sign convention is
implied by the field name and, as documented, is meant to be recorded on the sensor
itself through the consumption_is_positive attribute.

That attribute was never set for either field: the code that sets it only walked the
flex-model's per-device consumption/production output sensors, and the make_schedule
safety net only recognizes results named consumption_schedule/production_schedule,
whereas aggregate schedules are emitted as storage_schedule. So an aggregate sensor
kept the default production-positive convention for power sensors, and the scheduler's
consumption-positive values were saved sign-flipped: consumption showed up as
production and vice versa. The aggregate-production sensor was unaffected, because
there the two conventions cancelled out.

Mark both sensors at job-creation time (so a conflicting attribute is still reported
before the job is enqueued) and again after compute(), as a safety net for direct
make_schedule calls.

The API test covering these sensors encoded the bug rather than catching it, negating
the stored values on the way in. It now reads them as stored, and covers the case from
the issue as well: with only aggregate-consumption defined, the sensor records the full
aggregate schedule, which is compared against the sum of the scheduled device flows.

Closes #2496

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nk1JXQKQNvKa8iuvdqqWW
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Add PR link to changelog entry

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nk1JXQKQNvKa8iuvdqqWW
Signed-off-by: F.N. Claessen <claessen@seita.... (continued)

23 of 27 new or added lines in 1 file covered. (85.19%)

18508 of 21770 relevant lines covered (85.02%)

0.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
90.39
-0.61% flexmeasures/data/services/scheduling.py
Jobs
ID Job ID Ran Files Coverage
1 34330049935.1 09 Sep 2026 08:48AM UTC 182
85.02
GitHub Action Run
Source Files on build 34330049935
  • Tree
  • List 182
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34330049935
  • bbb09fab on github
  • Prev Build on main (#34325410544)
  • Next Build on main (#34356530691)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc