biolab / orange3-timeseries

🍊 :chart_with_upwards_trend: Orange add-on for analyzing, visualizing, manipulating, and forecasting time series data.
Other
62 stars 40 forks source link

[ENH] As Timeseries: Assign time stamps when using implied order #240

Closed janezd closed 1 year ago

janezd commented 1 year ago
Issue
Description of changes
Screen Shot 2022-11-03 at 13 15 09

This changes the previous functionality because it always adds a variable. Should the user have an option to remove it? On the other hand, one could consider previous functionality broken because it allowed constructing a TimeSeries with time_variable == None (which was in fact unexpected and broke some widgets).

Includes
codecov-commenter commented 1 year ago

Codecov Report

Base: 73.76% // Head: 74.74% // Increases project coverage by +0.98% :tada:

Coverage data is based on head (6d2c03d) compared to base (0d5716e). Patch coverage: 94.40% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #240 +/- ## ========================================== + Coverage 73.76% 74.74% +0.98% ========================================== Files 28 28 Lines 4322 4499 +177 Branches 584 598 +14 ========================================== + Hits 3188 3363 +175 - Misses 1006 1007 +1 - Partials 128 129 +1 ``` | [Impacted Files](https://codecov.io/gh/biolab/orange3-timeseries/pull/240?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | Coverage Δ | | |---|---|---| | [orangecontrib/timeseries/timeseries.py](https://codecov.io/gh/biolab/orange3-timeseries/pull/240/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY29udHJpYi90aW1lc2VyaWVzL3RpbWVzZXJpZXMucHk=) | `87.43% <71.79%> (-2.91%)` | :arrow_down: | | [...econtrib/timeseries/widgets/owtabletotimeseries.py](https://codecov.io/gh/biolab/orange3-timeseries/pull/240/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY29udHJpYi90aW1lc2VyaWVzL3dpZGdldHMvb3d0YWJsZXRvdGltZXNlcmllcy5weQ==) | `98.73% <98.57%> (+6.73%)` | :arrow_up: | | [orangecontrib/timeseries/widgets/owperiodogram.py](https://codecov.io/gh/biolab/orange3-timeseries/pull/240/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY29udHJpYi90aW1lc2VyaWVzL3dpZGdldHMvb3dwZXJpb2RvZ3JhbS5weQ==) | `93.02% <0.00%> (+4.65%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

markotoplak commented 1 year ago

@VesnaT was showing me her "focus" bug.

I know I am old-fashioned, but if I navigate with Tab or shift+Tab I would not expect any changes in the widget's state. Therefore, I am against the current on-focus behaviour. Instead, we could make the same action only if the line edit is clicked.

That would also likely avoid the bug Vesna is getting. :)

janezd commented 1 year ago

@markotoplak, I agree. I also thought there's a signal clicked, but alas not. QCheckbox has it, QLineEdit doesn't.

@VesnaT, could you please try replacing focusInEvent with mousePressEvent and see whether this resolves the problem?

@janezd, if this works, a proper event for the test call (which you don't want to have to assemble again) is

                    edit.mousePressEvent(QMouseEvent(
                        QMouseEvent.MouseButtonPress,
                        QPointF(3, 3), edit.mapToGlobal(QPoint(3, 3)),
                        Qt.LeftButton, Qt.LeftButton, Qt.NoModifier))