Skip to content

Remove old rolling viewpoint forecasting infrastructure#2075

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/clean-up-old-rolling-forecasting-code
Closed

Remove old rolling viewpoint forecasting infrastructure#2075
Copilot wants to merge 3 commits intomainfrom
copilot/clean-up-old-rolling-forecasting-code

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

The codebase retained rolling viewpoint forecasting infrastructure after the migration to fixed-point forecasting: a NotImplementedError stub, the working-but-misnamed make_rolling_viewpoint_forecasts, an overly restrictive horizon allowlist (supported_horizons), and its orphaned InvalidHorizonException.

Changes

  • data/services/forecasting.py

    • Remove make_fixed_viewpoint_forecasts (was raise NotImplementedError stub)
    • Rename make_rolling_viewpoint_forecastsmake_forecasts; update create_forecasting_jobs and handle_forecasting_exception accordingly
    • Remove supported_horizons() call and the InvalidHorizonException raise that blocked forecasting for horizons outside [1h, 6h, 24h, 48h]
  • utils/time_utils.py — Remove supported_horizons() (no remaining callers)

  • data/models/forecasting/exceptions.py — Remove orphaned InvalidHorizonException class

  • data/tests/test_forecasting_jobs.py — Remove test_failed_forecasting_invalid_horizon (tested the now-removed validation)

The fallback-to-naive-model behaviour in handle_forecasting_exception is preserved; it now correctly references make_forecasts.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view --json number --root y bash 42bdf9bf1e93f628d3e661a5ac322d60072/2a832965bc3a2b16d7bd54c7dabcd8d924da890d438336a3c31dee2db2265c29.pid 0be0ea4aa4b9132b/usr/bin/runc a4ad0a7a01ece153--root 8868270e2026a72b/var/run/docker/runtime-runc/moby --no�� --noprofile s1615070855 /usr/local/bin/rjson by/bfca6af4ab756grep 8a1acf2beb64f716-q (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community bot commented Mar 31, 2026

Documentation build overview

📚 flexmeasures | 🛠️ Build #32058162 | 📁 Comparing 9aad0ec against latest (7976140)


🔍 Preview build

Show files changed (6 files in total): 📝 6 modified | ➕ 0 added | ➖ 0 deleted
File Status
changelog.html 📝 modified
genindex.html 📝 modified
_autosummary/flexmeasures.data.models.forecasting.exceptions.html 📝 modified
_autosummary/flexmeasures.data.services.forecasting.html 📝 modified
_autosummary/flexmeasures.utils.time_utils.html 📝 modified
api/v3_0.html 📝 modified

Copilot AI and others added 2 commits March 31, 2026 13:48
Agent-Logs-Url: https://github.com/FlexMeasures/flexmeasures/sessions/0ca5a6ca-dff1-4438-a875-41c2b76a1495

Co-authored-by: BelhsanHmida <149331360+BelhsanHmida@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove old rolling forecasting code after fixed-point migration Remove old rolling viewpoint forecasting infrastructure Mar 31, 2026
Copilot AI requested a review from BelhsanHmida March 31, 2026 13:55
@BelhsanHmida
Copy link
Copy Markdown
Contributor

closed replaced by #2082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up old rolling forecasting code after fixed-point migration

2 participants