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

FlexMeasures / flexmeasures / 28506511684

01 Jul 2026 09:08AM UTC coverage: 80.671%. First build
28506511684

Pull #2235

github

Flix6x
fix: skip aggregate computation for unused commodities
When a multi-commodity flex_context includes a commodity (e.g., heat)
but no devices exist for that commodity, the sum() of an empty list
returns integer 0 instead of a pandas Series. This caused AttributeError
when calling .round() on the result later in compute().
Fixed by checking if any devices contribute to the commodity before
attempting to aggregate. If no devices exist for a commodity, skip
creating an aggregate schedule for it.

Signed-off-by: F.N. Claessen <claessen@seita.nl>
Pull Request #2235: Feature: flex-context per commodity as list

148 of 160 new or added lines in 9 files covered. (92.5%)

13464 of 16690 relevant lines covered (80.67%)

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


Build SHA Not Found

The commit SHA "1e7857bf5eee05a2b3919a20b7c8a56624bd57f9" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

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