biolab / orange3-timeseries

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

maintenance, tox, github actions #145

Closed JakaKokosar closed 3 years ago

JakaKokosar commented 3 years ago
Issue

https://github.com/biolab/orange3/issues/5145

Description of changes

Replace travis with GH actions and add tox configuration.

Fix Orange.util.OrangeDeprecationWarning: Direct calls to Table's constructor are deprecated and will be removed. Replace this call with Table.from_table

TODO:

======================================================================
ERROR: test_migrate_settings_from_version_1_time (widgets.tests.test_owspiralogram.TestOWSpiralogram)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangecontrib/timeseries/widgets/tests/test_owspiralogram.py", line 108, in test_migrate_settings_from_version_1_time
    self.send_signal(w.Inputs.time_series, self.philadelphia, widget=w)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/tests/base.py", line 400, in send_signal
    return self.send_signals([(input, value)], *args,
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/tests/base.py", line 426, in send_signals
    self._send_signal(widget, input, value, *args)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/tests/base.py", line 450, in _send_signal
    handler(value, *args)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangecontrib/timeseries/widgets/owspiralogram.py", line 387, in set_data
    self.openContext(data.domain)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/widget.py", line 1061, in openContext
    self.settingsHandler.open_context(self, *a)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/Orange/widgets/settings.py", line 125, in open_context
    super().open_context(widget, domain, *self.encode_domain(domain))
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/settings.py", line 819, in open_context
    self.find_or_create_context(widget, *args)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/settings.py", line 845, in find_or_create_context
    best_context, best_score = self.find_context(widget.context_settings, args, move_up=True)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/orangewidget/settings.py", line 871, in find_context
    score = self.match(context, *args)
  File "/home/runner/work/orange3-timeseries/orange3-timeseries/.tox/py-orange-latest/lib/python3.8/site-packages/Orange/widgets/settings.py", line 206, in match
    if context.attributes == attrs and context.metas == metas:
AttributeError: 'Context' object has no attribute 'attributes'
PrimozGodec commented 3 years ago

@JakaKokosar this is the error which started to happen due to some recent changes in core Orange. I will try to take a look in this. It also happened on Travis in the other PR.

janezd commented 3 years ago

@PrimozGodec, @JakaKokosar, these test construct invalid Context, but previous implementation of DomainContextHandler tolerated it. We could make the implementation more tolerant at the cost of simplicity and speed, but I think it's better to fix the tests.

The changes in DomainContextHandler should not cause problems with any properly constructed context, so they only break tests with half-baked mock contexts.

janezd commented 3 years ago

See #147.

codecov-io commented 3 years ago

Codecov Report

Merging #145 (d310b0a) into master (c1e67a9) will increase coverage by 0.09%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   72.34%   72.43%   +0.09%     
==========================================
  Files           7        7              
  Lines         799      809      +10     
  Branches      132      133       +1     
==========================================
+ Hits          578      586       +8     
  Misses        171      171              
- Partials       50       52       +2     
Impacted Files Coverage Δ
orangecontrib/timeseries/functions.py 77.09% <100.00%> (-0.58%) :arrow_down:
orangecontrib/timeseries/timeseries.py 85.11% <100.00%> (+0.74%) :arrow_up:
orangecontrib/timeseries/models.py 67.82% <0.00%> (+0.16%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c1e67a9...d310b0a. Read the comment docs.