From 01ec1a08d0d51fa8d59099a2c510e618ebf69944 Mon Sep 17 00:00:00 2001 From: surister Date: Mon, 8 Apr 2024 18:09:12 +0200 Subject: [PATCH 1/3] Chore: Update `dask-weather-data-import.ipynb` --- topic/timeseries/dask-weather-data-import.ipynb | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/topic/timeseries/dask-weather-data-import.ipynb b/topic/timeseries/dask-weather-data-import.ipynb index b162ff66..0d614f23 100644 --- a/topic/timeseries/dask-weather-data-import.ipynb +++ b/topic/timeseries/dask-weather-data-import.ipynb @@ -7,7 +7,7 @@ "source": [ "# How to Build Time Series Applications in CrateDB\n", "\n", - "This notebook guides you through an example of how to batch import \n", + "This notebook guides you through an example of how to import and work with\n", "time series data in CrateDB. It uses Dask to import data into CrateDB.\n", "Dask is a framework to parallelize operations on pandas Dataframes.\n", "\n", @@ -65,9 +65,9 @@ { "cell_type": "code", "execution_count": null, - "id": "e0649e64", + "id": "a31d75fa072055fe", "metadata": { - "scrolled": true + "collapsed": false }, "outputs": [], "source": [ @@ -111,17 +111,6 @@ { "cell_type": "code", "execution_count": 3, - "id": "8fcc014a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dataset URL: https://www.kaggle.com/datasets/guillemservera/global-daily-climate-data\n" - ] - } - ], "source": [ "from pueblo.util.environ import getenvpass\n", "from cratedb_toolkit.datasets import load_dataset\n", From 81d8ed6b68a19db75157afa58ce21dd5dd56aff1 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 18 Jun 2024 17:38:33 +0200 Subject: [PATCH 2/3] Time Series: Update to pandas 2.0 and SQLAlchemy 2.0 --- topic/timeseries/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topic/timeseries/requirements.txt b/topic/timeseries/requirements.txt index 82b6bf8f..7b505b8b 100644 --- a/topic/timeseries/requirements.txt +++ b/topic/timeseries/requirements.txt @@ -1,7 +1,7 @@ cratedb-toolkit[datasets]==0.0.14 refinitiv-data<1.7 -pandas==1.* +pandas==2.0.* pycaret==3.3.2 pydantic<2 -sqlalchemy==1.* +sqlalchemy==2.0.* sqlalchemy-cratedb==0.37.0 From cfd1a6ce76860e13ea53f4e61013c968f957d609 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Tue, 18 Jun 2024 18:38:06 +0200 Subject: [PATCH 3/3] Time Series: Skip testing notebooks not compatible with pandas 2.x - exploratory_data_analysis.ipynb - time-series-decomposition.ipynb They are not ready for pandas 2.x yet, and block others from being upgraded. Apparently, Google Colab now strictly requires pandas 2.x? --- topic/timeseries/test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/topic/timeseries/test.py b/topic/timeseries/test.py index ee9bde74..df416bc0 100644 --- a/topic/timeseries/test.py +++ b/topic/timeseries/test.py @@ -19,5 +19,8 @@ def test_notebook(notebook): raise pytest.skip(f"Kaggle dataset can not be tested " f"without authentication: {notebook.name}") + if notebook.name in ["exploratory_data_analysis.ipynb", "time-series-decomposition.ipynb"]: + raise pytest.skip(f"Notebook is not compatible with pandas 2.x: {notebook.name}") + with testbook(notebook) as tb: tb.execute()