Repository: aeon-toolkit/aeon
Pull request #1127 (2024-02-02 11:23:31)

[BUG] Fix overnight loading test
Fixes a failing overnight test caused by expansion of the regression problems 

aeon-actions-bot[bot]: 
## Thank you for contributing to `aeon`

I have added the following labels to this PR based on the title: **[ $\\color{#d73a4a}{\\textsf{bug}}$ ]**.
I would have added the following labels to this PR based on the changes made: **[ $\\color{#0B1D38}{\\textsf{datasets}}$ ]**, however some package labels are already present.

The [Checks](https://github.com/aeon-toolkit/aeon/pull/1127/checks) tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our `pre-commit` code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the `aeon` [Slack](
https://join.slack.com/t/aeon-toolkit/shared_invite/zt-22vwvut29-HDpCu~7VBUozyfL_8j3dLA) channel if you have any.
    

Patch:
diff --git a/aeon/datasets/dataset_collections.py b/aeon/datasets/dataset_collections.py
index 99c4ff77..fc834780 100644
--- a/aeon/datasets/dataset_collections.py
+++ b/aeon/datasets/dataset_collections.py
@@ -44,7 +44,7 @@ MODULE = os.path.join(os.path.dirname(aeon.__file__), "datasets")
 
 
 def get_available_tser_datasets(name="tser_soton", return_list=True):
-    """List available tser data.
+    """List available tser data as specified by lists.
 
     Parameters
     ----------
@@ -69,16 +69,14 @@ def get_available_tser_datasets(name="tser_soton", return_list=True):
             return sorted(list(tser_monash))
         else:
             return tser_monash
-    return []
+    return name in tser_soton
 
 
 def get_available_tsf_datasets(name=None):
     """List available tsf data."""
     if name is None:  # List them all
         return sorted(list(tsf_all))
-    if name in tsf_all:
-        return True
-    return False
+    return name in tsf_all
 
 
 def get_available_tsc_datasets(name=None):
@@ -99,9 +97,7 @@ def get_available_tsc_datasets(name=None):
     if name is None:  # List them all
         merged_set = univariate.union(multivariate)
         return sorted(list(merged_set))
-    if name in univariate or name in multivariate:
-        return True
-    return False
+    return name in univariate or name in multivariate
 
 
 def get_downloaded_tsc_tsr_datasets(extract_path=None):


Test patch:
diff --git a/aeon/datasets/tests/test_dataset_collections.py b/aeon/datasets/tests/test_dataset_collections.py
index f5409224..611f2e78 100644
--- a/aeon/datasets/tests/test_dataset_collections.py
+++ b/aeon/datasets/tests/test_dataset_collections.py
@@ -13,7 +13,7 @@ from aeon.testing.test_config import PR_TESTING
 
 @pytest.mark.skipif(
     PR_TESTING,
-    reason="Only run on overnights because of intermittent fail for read/write",
+    reason="Only run on overnights because of intermittent fail for read/write.",
 )
 def test_downloaded_tsf_datasets():
     """Test recovering downloaded data sets.
@@ -29,7 +29,7 @@ def test_downloaded_tsf_datasets():
 
 @pytest.mark.skipif(
     PR_TESTING,
-    reason="Only run on overnights because of intermittent fail for read/write",
+    reason="Only run on overnights because of intermittent fail for read/write.",
 )
 def test_list_available_tsc_datasets():
     """Test recovering lists of available data sets."""
@@ -43,12 +43,12 @@ def test_list_available_tsc_datasets():
 
 @pytest.mark.skipif(
     PR_TESTING,
-    reason="Only run on overnights because of intermittent fail for read/write",
+    reason="Only run on overnights because of intermittent fail for read/write.",
 )
 def test_list_available_tser_datasets():
     """Test recovering lists of available data sets."""
     res = get_available_tser_datasets()
-    assert len(res) == 18  # PGDalia excluded because of unequal length within case
+    assert len(res) == 63
     res = get_available_tser_datasets("FOO")
     assert not res
     res = get_available_tser_datasets("Covid3Month")
@@ -57,7 +57,7 @@ def test_list_available_tser_datasets():
 
 @pytest.mark.skipif(
     PR_TESTING,
-    reason="Only run on overnights because of intermittent fail for read/write",
+    reason="Only run on overnights because of intermittent fail for read/write.",
 )
 def test_list_available_tsf_datasets():
     """Test recovering lists of available data sets."""