Repository navigation
Conversation
…indow Context: - With --from or --until, the resampled data came from search_beliefs, which selects the events that occur at least in part within the window, but the original data was deleted with other bounds, so some of it stayed next to the resampled data. Change: - Delete the original data with the bounds that search_beliefs used, and with the original resolution, by building the delete query before setting the sensor's new resolution. Signed-off-by: Sajal Kumar Jana <[email protected]>
…d to the data Context: - Resampling to 30 minutes and back to an hour within a window left a 30-minute event at the end of the window. Change: - Resample the epex_da test data within a window and back, and check that only hourly event starts are left. Signed-off-by: Sajal Kumar Jana <[email protected]>
Context: - Bugfix to flexmeasures edit resample-data with --from or --until. Change: - Add entries to the main changelog and the CLI changelog. Signed-off-by: Sajal Kumar Jana <[email protected]>
Documentation build overview
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
flexmeasures edit resample-datawith--fromor--untilnow deletes the original data with the same bounds thatsearch_beliefsused to select it (events that occur at least in part within the window), using the sensor's original resolutiondocumentation/changelog.rst(and indocumentation/cli/change_log.rst)The delete query was built after
sensor.event_resolutionwas already set to the new resolution, and usedevent_start + resolution <= untilandevent_start >= from. So when downsampling, the original events in the last new step of the window were kept, and a--fromwithin an event kept that event. They stayed next to the resampled data, and with the sensor's new resolution they read as extra events.Look & Feel
A
kWsensor with a 15-minute resolution and 12 values (1 to 12) from 2026-01-01 00:00+01:00:Before, the 15-minute rows at 01:15, 01:30 and 01:45 (values 6, 7 and 8) stayed in the window next to the hourly beliefs at 00:00 and 01:00. After, only the hourly beliefs at 00:00 and 01:00 are in the window, and the data from 02:00 onwards is untouched.
With
--from 2026-01-01T01:10+01:00, the original 01:00 row (value 5) used to stay next to the resampled 01:00 beliefs; now it is replaced.How to test
test_resample_sensor_data_within_windowresamples theepex_datest data within a window to 30 minutes and back to an hour, once with a window on the hour and once with a window starting and ending within an event, and checks that only the hourly event starts are left. Both cases fail without the fix (an extra row at 15:30) and pass with it. I also ran the command above against a local database before and after the fix, and the full test suite.Further Improvements
...
Related Items
Closes #2926
Sign-off