-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(parsers): handle missing storage values for BE #6782
Conversation
if zoneKey == "BE" and value_length == expected_length - 1: | ||
logger.warning( | ||
f"BE only has {value_length} production values for {dt}, but should have {expected_length}. BE doesn't report 0 values for storage so we will continue." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this overall makes sense, but there is a risk that an important mode might be missing and thus this would falsely parse. But up to you to decide if that is enough of a problem/risk to do more work here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed but the alternative would be to set up a validation that checks all expected modes per zone. Possibly something we can and should do but I think this is fine for now as it's just limited to BE and there is a secondary level of validation that is happening in the backend as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving so you can continue, but see comment
To follow up on this:
Hopefully this means they will start sending 0 values and we can remove this again in the future. |
Issue
BE don't report data properly so it's now getting flagged and estimated by the new validation rules in the parser.
Description
The code changes in
parsers/ENTSOE.py
address the issue of missing production values for the BE (Belgium) zone. Previously, if the number of production values received for a specific datetime was one less than the expected length, a warning was logged and the datapoint was discarded. However, for the BE zone, this discrepancy is expected due to the absence of 0 values for storage. Therefore, the code now includes a specific check for the BE zone and allows for the expected length to be one less than the actual number of values.Note
I will also open a ticked with ENTSO-E and see if they can fix it on their end.
This is the issue:
Those blank spaces should be filled with values, probably 0.
Double check
poetry run test_parser "zone_key"
pnpx prettier@2 --write .
andpoetry run format
in the top level directory to format my changes.