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

Dynamically check missing data in points #20

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

angryvoegi
Copy link
Contributor

Hi Dario

Thank you for accepting my last pull request. Unfortunately, another change slipped into the same pull request yesterday shortly before your merge (checks for missing positions). This change had not yet been sufficiently tested and was therefore incorrect.
This pull request fixes this error.

In the API response, it can happen that only one value is sent if the same value occurs twice in succession. Example: [{'position': 1, 'quantity': 500}, {'position': 3, 'quantity': 450}]. In this case, position 1 and 2 have the same 'quantity', but position 2 is not returned (see screenshot).
The parser now checks whether there are gaps in the positions and if so, these gaps are filled with the previous value. If values are missing at the end (and no positions are missing), the last value for the missing positions is appended.

I hope this change meets your expectations and I apologize again that my first pull request was faulty.

Best regards

entsoe

…as produced when pulling data that does not have the 'quantity' object in the point structure (for example DayAheadPrices). This should now be fixed
@DarioHett
Copy link
Owner

Add a test.

@angryvoegi
Copy link
Contributor Author

Done.

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.

2 participants