-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[energidataservice] Define grid tariff filters in YAML #17690
Conversation
Signed-off-by: Jacob Laursen <[email protected]>
5163721
to
149a162
Compare
I'm marking this ready for review now, even though it's only the "middle" step/baseline. Tariff definitions are now in YAML, but periodization is not yet supported. It's a bit more complicated than I initially thought. For example, when a console command requests persistence of period 01.01.2024-31.01.2024 and the tariff filter is changed per 16.01.2024, we need to calculate intersecting periods and handle them individually:
This needs to be rewritten: Lines 483 to 498 in f37f39c
And this also needs to be more sophisticated: Lines 302 to 316 in f37f39c
All in all, it requires more work and testing. I still think using YAML even without periodization is an improvement in its own right. |
@lsiepel - any chance of giving this some mileage with M3? 😉 |
Would have been nice, but Kai can start the build any moment, so better to not frustrate the build proces. |
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.
Thanks LGTM
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Ciprian Pascu <[email protected]>
This should make grid tariff filters more readable and therefore easier to maintain.
The current draft is a baseline providing only the same functionality as with the filters provided by code. The next step is to add support for periodization.
With the introduction of #16656, historic tariffs can be persisted. When grid company make changes to the way they publish tariffs, filters need to be adapted. This can include moving a cutoff date and querying new charge code types and notes. Without periodization of the filters, it's not possible to persist historic tariffs. Additionally, it's not possible to take into account upcoming filter changes.