Skip to content

Conversation

@Reem-Albadwy
Copy link
Contributor

@Reem-Albadwy Reem-Albadwy commented Dec 20, 2025

Pull Request

Description

This PR adds support for Belgian solar PV forecast data using the Elia Open Data API.

The changes include:

  • Adding a dedicated Belgium forecast fetcher under solar_consumer/data/fetch_be_data.py
  • Using the Elia records API with a rolling time window and retry logic to improve robustness and avoid pagination limits
  • Ensuring both national ("Belgium") and regional forecasts are returned
  • Adding an integration test to validate that national and regional data are present

This follows the existing repository structure by keeping country-specific logic in the data module.

Fixes #127

How Has This Been Tested?

  • Ran the integration test locally:
    pytest tests/integration/test_fetch_be_forecast.py

  • Verified the returned DataFrame contains the expected columns:

    • target_datetime_utc
    • solar_generation_kw
    • region
    • forecast_type
  • Confirmed both national and at least one regional forecast are returned when data is available

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (not required)
  • I have added tests that prove my fix is effective
  • I have checked my code and corrected any misspellings

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this, this looks great. Ive added a few comments that I think are minor changes. Would you be able to look at them?

@Reem-Albadwy
Copy link
Contributor Author

Thanks so much for this, this looks great. Ive added a few comments that I think are minor changes. Would you be able to look at them?

Thanks! I’ve pushed updates addressing all the comments — happy to tweak anything further if needed

@peterdudfield
Copy link
Contributor

Thanks so much for this, this looks great. Ive added a few comments that I think are minor changes. Would you be able to look at them?

Thanks! I’ve pushed updates addressing all the comments — happy to tweak anything further if needed

They looks really good.

Would you just be able to update the Readme, and then we can get it merged?

@Reem-Albadwy
Copy link
Contributor Author

Thanks so much for this, this looks great. Ive added a few comments that I think are minor changes. Would you be able to look at them?

Thanks! I’ve pushed updates addressing all the comments — happy to tweak anything further if needed

They looks really good.

Would you just be able to update the Readme, and then we can get it merged?

Done — I’ve updated the README. Happy to contribute to this issue.

@Reem-Albadwy
Copy link
Contributor Author

@peterdudfield, Could you let me know if there are any updates on this PR?

@peterdudfield
Copy link
Contributor

Hey This looks really great thanks @Reem-Albadwy . I think this is ready to merge

@Reem-Albadwy
Copy link
Contributor Author

@peterdudfield, Glad to hear that! Thank you

@peterdudfield peterdudfield merged commit c839ead into openclimatefix:main Jan 5, 2026
4 checks passed
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.

Get Belguim data

2 participants