Skip to content
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

CI: Test Jupyter Notebooks also on Python 3.10 #425

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dataframe-dask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dataframe-pandas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ml-automl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11' ]
python-version: [ '3.10', '3.11' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ml-langchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11' ]
python-version: [ '3.10', '3.11' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ml-mlflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11' ]
python-version: [ '3.10', '3.11' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/timeseries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.11' ]
python-version: [ '3.10', '3.11' ]
cratedb-version: [ 'nightly' ]

services:
Expand Down
1 change: 1 addition & 0 deletions topic/timeseries/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def reset_database_tables():

reset_tables = [
"cities",
"machine_data",
"weather_data",
"weather_stations",
]
Expand Down
2 changes: 1 addition & 1 deletion topic/timeseries/exploratory_data_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"#!pip install -r requirements.txt\n",
"\n",
"# Note: If you are running in an environment like Google Colab, please use the absolute path of the requirements:\n",
"#!pip install -r https://raw.githubusercontent.com/crate/cratedb-examples/main/topic/timeseries/requirements.txt"
"#!pip install -r https://github.com/crate/cratedb-examples/raw/main/topic/timeseries/requirements.txt"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion topic/timeseries/time-series-decomposition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"#!pip install -r requirements.txt\n",
"\n",
"# Note: If you are running in an environment like Google Colab, please use the absolute path of the requirements:\n",
"#!pip install -r https://raw.githubusercontent.com/crate/cratedb-examples/main/topic/timeseries/requirements.txt"
"#!pip install -r https://github.com/crate/cratedb-examples/raw/main/topic/timeseries/requirements.txt"
]
},
{
Expand Down
29 changes: 13 additions & 16 deletions topic/timeseries/timeseries-anomaly-detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install -r requirements.txt\n",
"%pip install -r requirements.txt\n",
"\n",
"# Note: If you are running in an environment like Google Colab, please use the absolute path of the requirements:\n",
"#!pip install -r https://raw.githubusercontent.com/crate/cratedb-examples/main/topic/timeseries/requirements.txt"
"#%pip install -r https://github.com/crate/cratedb-examples/raw/main/topic/timeseries/requirements.txt"
]
},
{
Expand Down Expand Up @@ -88,7 +88,7 @@
"In this step, we will create the table and populate it with the dataset from [nab-machine-failure.csv]. If you are using CrateDB Cloud, you can use the [URL import] available in the console, otherwise, use the `COPY FROM` statement used below. You can run it in the console in the Admin UI or you can use [Crash], in this case, we are using SQLAlchemy.\n",
"\n",
"[URL import]: https://cratedb.com/docs/cloud/en/latest/reference/overview.html#import-from-url\n",
"[nab-machine-failure.csv]: https://github.com/crate/cratedb-datasets/raw/main/timeseries/nab-machine-failure.csv\",\n",
"[nab-machine-failure.csv]: https://github.com/crate/cratedb-datasets/raw/main/timeseries/nab-machine-failure.csv\n",
"[Crash]: https://cratedb.com/docs/crate/crash/en/latest/getting-started.html"
]
},
Expand All @@ -98,25 +98,22 @@
"metadata": {},
"outputs": [],
"source": [
"# Use this connection string template for CrateDB Cloud Clusters\n",
"# crate://<USER>:<PASSWORD>@<HOST>\n",
"CONNECTION_STRING = os.environ.get(\n",
" \"CRATEDB_CONNECTION_STRING\",\n",
" \"crate://<USER>:<PASSWORD>@<HOST>\",\n",
")\n",
"\n",
"# Use this connection string template for CrateDB running locally\n",
"#CONNECTION_STRING = os.environ.get(\n",
"# \"CRATEDB_CONNECTION_STRING\",\n",
"# \"crate://localhost:4200\",\n",
"# )\n",
" \"crate://localhost:4200\",\n",
" )\n",
"\n",
"engine = sa.create_engine(CONNECTION_STRING, echo=os.environ.get('DEBUG'))\n",
"\n",
"query_create_table = 'CREATE TABLE machine_data (\"timestamp\" TIMESTAMP, \"value\" DOUBLE PRECISION)' \n",
"query_copy_from = \"COPY machine_data FROM 'https://github.com/crate/cratedb-datasets/raw/main/timeseries/nab-machine-failure.csv';\"\n",
"sql_ddl = 'CREATE TABLE machine_data (\"timestamp\" TIMESTAMP, \"value\" DOUBLE PRECISION)'\n",
"sql_load = \"COPY machine_data FROM 'https://github.com/crate/cratedb-datasets/raw/main/timeseries/nab-machine-failure.csv';\"\n",
"sql_refresh = \"REFRESH TABLE machine_data;\"\n",
"\n",
"with engine.connect() as conn:\n",
" conn.execute(sa.text(query_create_table))\n",
" conn.execute(sa.text(query_copy_from))\n"
" conn.execute(sa.text(sql_ddl))\n",
" conn.execute(sa.text(sql_load))\n",
" conn.execute(sa.text(sql_refresh))"
]
},
{
Expand Down
Loading