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

FlexMeasures / flexmeasures / 28902397985

07 Jul 2026 10:14PM UTC coverage: 81.03% (-0.05%) from 81.08%
28902397985

Pull #1946

github

Flix6x
fix: count only device models, not stock entries, when enumerating devices in _prepare

The commodity_to_devices mapping and the num_flexible_devices count
were built from the re-copied flex_model, which includes stock-model
entries. This overran the sensors list (IndexError at sensor_d =
sensors[d]) whenever the flex-model contained a stock entry, and gave
stock entries bogus device indices in commodity groups. Enumerate
device_models instead, keeping the earlier num_flexible_devices =
len(device_models) and matching _compute_commodity_aggregate_schedules,
which already uses self._device_models.

Signed-off-by: F.N. Claessen <claessen@seita.nl>
Pull Request #1946: Add multi‑commodity support to device scheduler

465 of 503 new or added lines in 12 files covered. (92.45%)

41 existing lines in 5 files now uncovered.

14032 of 17317 relevant lines covered (81.03%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

74.56
/flexmeasures/utils/coding_utils.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc