-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add temporal operations #832
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
Changes from 105 commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
60fdde4
chaged on request
Gerhardsa0 ea01e75
chaged on request
Gerhardsa0 ec43790
chaged on request
Gerhardsa0 94ee24d
style: apply automated linter fixes
megalinter-bot cb36228
added from_str_to_temporal
Gerhardsa0 dc99f1a
picture
Gerhardsa0 a00eefa
Merge branch '740-feat-add-continues-prediction-to-outputconvertion' …
Gerhardsa0 5195ad2
merged continues pr
Gerhardsa0 0a817f4
linter change
Gerhardsa0 cce7b0e
style: apply automated linter fixes
megalinter-bot 68bc442
Merge branch 'main' into 765-feat-add-temporal-operations
lars-reimann 0529d38
tutorial added
Gerhardsa0 f5059e7
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 9ccb738
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 af3244e
added inverse for prediction
Gerhardsa0 f023b1b
test
Gerhardsa0 6e8c006
saved some changes for now
Gerhardsa0 4fc06da
added structure for temporal operations
Gerhardsa0 959b981
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 81dd2e6
added lists for visualization in lineplot
Gerhardsa0 ac2bc29
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 362426c
saved for tdy
Gerhardsa0 6409526
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 991a0e7
finished merge and added visualization
Gerhardsa0 1d2be7b
added temporal operations
Gerhardsa0 87b88c2
removed prediction name from convertionm
Gerhardsa0 1f7f6d3
moved continues to time series dataset
Gerhardsa0 045f6c9
removed learning error
Gerhardsa0 bdf976a
snapshots
Gerhardsa0 db0438c
linter changes
Gerhardsa0 b41c2ba
style: apply automated linter fixes
megalinter-bot 27dca0f
style: apply automated linter fixes
megalinter-bot d24fc93
linter changes
Gerhardsa0 64770da
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 bdf3d72
style: apply automated linter fixes
megalinter-bot 46b0fa2
fixed shape for dataloading
Gerhardsa0 4d98956
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 92cca07
linter changes
Gerhardsa0 3685248
linter changes
Gerhardsa0 c3ddf6c
linter changes
Gerhardsa0 5e45869
linter changes
Gerhardsa0 78ca195
adjusted dimensions
Gerhardsa0 da286d2
style: apply automated linter fixes
megalinter-bot 14c1241
added temporal cells
Gerhardsa0 f97ca31
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 1bfebc4
added temporal cells
Gerhardsa0 7bf9926
style: apply automated linter fixes
megalinter-bot 0d40ad6
adjusted test
Gerhardsa0 e1ca06e
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 3671ca7
adjusted test
Gerhardsa0 10cb57b
adjusted test
Gerhardsa0 56a54ab
style: apply automated linter fixes
megalinter-bot 9d2367c
adjusted test
Gerhardsa0 73bedc3
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 dbe8907
adjusted test
Gerhardsa0 7d9bdb0
code coverage
Gerhardsa0 d210d70
linter fix
Gerhardsa0 7452aef
style: apply automated linter fixes
megalinter-bot 658d12e
added code cov
Gerhardsa0 666e11f
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 267371a
style: apply automated linter fixes
megalinter-bot 792c484
added formatstring
Gerhardsa0 8af6014
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 556eed4
code cov doesnt use the warn
Gerhardsa0 57b1305
code cov doesnt use the warn
Gerhardsa0 daa766c
linter fixes
Gerhardsa0 4213af3
style: apply automated linter fixes
megalinter-bot b766c63
test should work
Gerhardsa0 5e9da42
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 6131534
style: apply automated linter fixes
megalinter-bot 920125c
test should work
Gerhardsa0 b433180
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 abb5cd3
test should work
Gerhardsa0 ac51634
fixing tests
Gerhardsa0 13d19d7
fixing tests
Gerhardsa0 b3bc80f
style: apply automated linter fixes
megalinter-bot c82e78e
fixing tests
Gerhardsa0 391141b
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 0165394
fixing tests
Gerhardsa0 51d7a15
added self written format checker
Gerhardsa0 2ecaff7
linter fixes
Gerhardsa0 f8db6be
style: apply automated linter fixes
megalinter-bot 228c8c6
fixed doc build
Gerhardsa0 928d22b
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 6937d2c
fixed doc build
Gerhardsa0 536e16f
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 adc041e
removed time_name from time_series dataset
Gerhardsa0 97ac579
linter changes
Gerhardsa0 9468b4a
Merge branch 'main' into 765-feat-add-temporal-operations
Gerhardsa0 98746db
style: apply automated linter fixes
megalinter-bot 5ed4186
style: apply automated linter fixes
megalinter-bot 1c67a0d
fixed docs
Gerhardsa0 4d35801
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 9443c21
fixed docs
Gerhardsa0 d39a737
fixed docs
Gerhardsa0 d28436b
fixed code cov
Gerhardsa0 1b83eb2
fixed linter
Gerhardsa0 3eb9d13
added temporal operations
Gerhardsa0 d59628b
Merge branch 'main' of https://github.com/Safe-DS/Library into 765-fe…
Gerhardsa0 c89865e
fixed comments
Gerhardsa0 c5a2119
style: apply automated linter fixes
megalinter-bot 55c507b
style: apply automated linter fixes
megalinter-bot a030244
fixed comments
Gerhardsa0 bc5a0a0
Merge remote-tracking branch 'origin/765-feat-add-temporal-operations…
Gerhardsa0 94b4de1
fixed comments
Gerhardsa0 61200a4
Update src/safeds/data/tabular/containers/_temporal_cell.py
Gerhardsa0 3e7ced4
Update src/safeds/data/tabular/containers/_temporal_cell.py
Gerhardsa0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_century.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(18, datetime.datetime(1800, 1, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(21, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_day(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.century(), expected) |
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_day.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(9, datetime.datetime(2022, 1, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(1, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_day(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.day(), expected) |
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_month.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(3, datetime.datetime(2022, 3, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(1, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_month(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.month(), expected) |
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_week.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(10, datetime.datetime(2023, 3, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(52, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_week(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.week(), expected) |
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_weekday.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(4, datetime.datetime(2023, 3, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(6, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_weekday(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.weekday(), expected) |
20 changes: 20 additions & 0 deletions
20
tests/safeds/data/tabular/containers/_temporal_cell/test_year.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
import pytest | ||
|
||
from tests.helpers import assert_cell_operation_works | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("expected", "input_date"), | ||
[ | ||
(2023, datetime.datetime(2023, 3, 9, 23, 29, 1, tzinfo=datetime.UTC)), | ||
(2022, datetime.date(2022, 1, 1)), | ||
], | ||
ids=[ | ||
"ISO datetime", | ||
"ISO date", | ||
], | ||
) | ||
def test_get_year(input_date: datetime.date, expected: bool) -> None: | ||
assert_cell_operation_works(input_date, lambda cell: cell.dt.year(), expected) |
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.
Uh oh!
There was an error while loading. Please reload this page.