Skip to content

Time Series: Properly store and restore selection #292

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

janezd
Copy link
Collaborator

@janezd janezd commented Apr 21, 2025

Issue

Fixes #290.

Description of changes

selection was not stored properly (now it is) and it was cleared when reinitializing the model (now it's not; I block the signals from selection model).

As a bonus, migration takes care of existing workflows, which should now with correct selections.

Includes
  • Code changes
  • Tests

@janezd janezd requested a review from Copilot April 21, 2025 16:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses Issue #290 by properly storing and restoring the selection in time series workflows while preventing unintended signal clearing during model reinitialization. Key changes include:

  • Introducing a new setting, pending_selection, to hold saved selections
  • Updating the selection update logic in _selection_changed and set_data
  • Adding tests to validate selection restoration and migration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
orangecontrib/timeseries/widgets/tests/test_owdifference.py Added tests for restored selection and settings migration
orangecontrib/timeseries/widgets/owdifference.py Revised selection handling to use pending_selection and updated migration logic
Comments suppressed due to low confidence (1)

orangecontrib/timeseries/widgets/owdifference.py:108

  • [nitpick] The simultaneous assignment to both 'pending_selection' and 'selection' could be confusing; add a clarifying comment or consider refactoring to clearly differentiate their roles if they are intended to serve separate purposes.
self.pending_selection = self.selection = [

@janezd janezd force-pushed the timeseries-remember-selection branch from f6233be to 3c742ad Compare April 22, 2025 14:05
@VesnaT VesnaT merged commit c19df2c into biolab:master Apr 25, 2025
19 checks passed
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.

Difference: update documentation to reflect that selected variables must be manually redefined after reopening workflow file
2 participants