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

FlexMeasures / flexmeasures / 26493993418
81%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 06:18AM UTC
Jobs 1
Files 166
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

27 May 2026 06:06AM UTC coverage: 80.508% (+0.02%) from 80.49%
26493993418

push

github

web-flow
 Derive seasonal lags from sensor resolution (#2157)

* feat(forecasting): allow configurable seasonal lag steps

Context:
- Forecasting daily seasonality was hard-coded to 24 lag steps.
- That only represents one day for hourly sensors.

Change:
- Add a seasonal_lag_steps parameter to CustomLGBM.
- Keep the previous 24-step default for compatibility.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* feat(forecasting): derive seasonal lags from sensor resolution

Context:
- Daily lag steps depend on the target sensor resolution.
- PT15M sensors need 96 steps to represent one day, not 24.

Change:
- Compute one-day lag steps from the target sensor event resolution.
- Pass the derived value into CustomLGBM during training.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* fix(forecast): fall back for short seasonal histories

Context:
- Resolution-aware daily lags need enough training samples for the full requested horizon.
- Three days of PT15M data with a 48h horizon used to produce forecasts on main and should not become a hard failure.

Change:
- Fall back to the legacy 24-step lag pattern when the training window cannot support daily lags for the farthest horizon.
- Add regression coverage for under-sampled and sufficiently sampled PT15M histories.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* fix(forecast): validate seasonal lag steps

Context:
- Copilot noted externally configurable lag steps could be zero or negative.
- Invalid values would break modulo-based lag setup.

Change:
- Reject seasonal and fallback lag step values below 1.
- Fix the nearby seasonal-lag comment typo.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* fix(forecast): avoid truncated daily lag steps

Context:
- Dividing one day by sensor resolution with int() silently truncated non-divisor resolutions.
- That could train on an offset that was close to, but not exactly, one day.
... (continued)

38 of 41 new or added lines in 2 files covered. (92.68%)

12812 of 15914 relevant lines covered (80.51%)

0.81 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
92.0
-4.15% flexmeasures/data/models/forecasting/custom_models/lgbm_model.py
Jobs
ID Job ID Ran Files Coverage
1 26493993418.1 27 May 2026 06:18AM UTC 166
80.51
GitHub Action Run
Source Files on build 26493993418
  • Tree
  • List 166
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26493993418
  • 945abea6 on github
  • Prev Build on main (#26452435113)
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