Skip to content

Commit ca23f0f

Browse files
feat: when using from table to time series feature must be given (#572)
Closes #571 ### Summary of Changes TimeSeries no longer is subclass of TaggedTable only of Table <!-- Please provide a summary of changes in this pull request, ensuring all changes are explained. --> --------- Co-authored-by: megalinter-bot <[email protected]>
1 parent f6a3ca7 commit ca23f0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+486
-515
lines changed

src/safeds/data/tabular/containers/_table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3-
import sys
43
import functools
54
import io
5+
import sys
66
import warnings
77
from pathlib import Path
88
from typing import TYPE_CHECKING, Any, TypeVar
@@ -1774,7 +1774,7 @@ def time_columns(self, target_name: str, time_name: str, feature_names: list[str
17741774
"""
17751775
from ._time_series import TimeSeries
17761776

1777-
return TimeSeries._from_table_to_time_series(self, target_name, time_name, feature_names)
1777+
return TimeSeries._from_table(self, target_name, time_name, feature_names)
17781778

17791779
def transform_column(self, name: str, transformer: Callable[[Row], Any]) -> Table:
17801780
"""

src/safeds/data/tabular/containers/_time_series.py

Lines changed: 196 additions & 163 deletions
Large diffs are not rendered by default.

tests/helpers/_assertions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def assert_that_time_series_are_equal(table1: TimeSeries, table2: TimeSeries) ->
5353
The timeseries to compare the first timeseries to.
5454
"""
5555
assert table1.schema == table2.schema
56-
assert table1.features == table2.features
57-
assert table1.target == table2.target
56+
assert table1._feature_names == table2._feature_names
57+
assert table1.features == table2._features
58+
assert table1.target == table2._target
5859
assert table1.time == table2.time
5960
assert table1 == table2

tests/safeds/data/tabular/containers/_table/_tagged_table/_time_series/test_eq.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

tests/safeds/data/tabular/containers/_table/_tagged_table/_time_series/test_hash.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

tests/safeds/data/tabular/containers/_table/_tagged_table/_time_series/test_sizeof.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)