Skip to content
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

Merged
merged 3 commits into from
May 29, 2024

Conversation

VIKTORVAV99
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 commented May 27, 2024

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:
image
Those blank spaces should be filled with values, probably 0.

Double check

  • I have tested my parser changes locally with poetry run test_parser "zone_key"
  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

@github-actions github-actions bot added parser python Pull requests that update Python code labels May 27, 2024
@VIKTORVAV99 VIKTORVAV99 changed the title fix(parsers): handle missing production values for BE zone fix(parsers): handle missing storage values for BE May 27, 2024
Comment on lines +821 to +824
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."
)
Copy link
Member

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 :)

Copy link
Member Author

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.

Copy link
Member

@madsnedergaard madsnedergaard left a 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

@VIKTORVAV99 VIKTORVAV99 enabled auto-merge (squash) May 29, 2024 14:12
@VIKTORVAV99 VIKTORVAV99 merged commit 36bdafe into master May 29, 2024
19 checks passed
@VIKTORVAV99 VIKTORVAV99 deleted the vik/workaround_for_BE branch May 29, 2024 14:15
@VIKTORVAV99
Copy link
Member Author

To follow up on this:
I reached out to ENTSO-E which got back to me with the following from Elia:

"Values published by Elia are either production either consumption. When flow goes into one direction, we don’t send 0 for the opposite direction, and this is for us a normal behavior.
This being said, I can understand your concern in relation with API structure, and I will provide your valuable feedback to my colleagues in business and IT, in order to fix this. I cannot give your at this stage neither an engagement from our side, nor a delay for adaptation."

Hopefully this means they will start sending 0 values and we can remove this again in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants