From 2e81f1cb19e5029c921a05183e9377ab295b7dcf Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 10:48:07 -0500 Subject: [PATCH 1/6] add workflow --- .github/workflows/notebook-testing.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/notebook-testing.yml diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml new file mode 100644 index 000000000..a39fe4ea1 --- /dev/null +++ b/.github/workflows/notebook-testing.yml @@ -0,0 +1,34 @@ +name: CI for Jupyter Notebooks + +on: + push: + branches: + - 454-notebook-testing + pull_request: + branches: + - 454-notebook-testing + +jobs: + test-notebooks: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nbconvert nbclient + + - name: Run Jupyter Notebooks + run: | + for notebook in $(find . -name '*.ipynb'); do + echo "Executing $notebook" + jupyter nbconvert --to notebook --execute --inplace $notebook + done From 556d0bd7945c10ca9f2e5f177b1e077ef78731f7 Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 10:50:20 -0500 Subject: [PATCH 2/6] small tinks --- .github/workflows/notebook-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml index a39fe4ea1..e29237f31 100644 --- a/.github/workflows/notebook-testing.yml +++ b/.github/workflows/notebook-testing.yml @@ -17,14 +17,14 @@ jobs: uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.8" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nbconvert nbclient + pip install nbconvert nbclient ipykernel - name: Run Jupyter Notebooks run: | From e1b199fe1448e8b738aaa64aa316f27558b2637e Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 10:53:42 -0500 Subject: [PATCH 3/6] pip install before notebook --- .github/workflows/notebook-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml index e29237f31..2306ee4f3 100644 --- a/.github/workflows/notebook-testing.yml +++ b/.github/workflows/notebook-testing.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nbconvert nbclient ipykernel + pip install nbconvert nbclient ipykernel git+https://github.com/apache/mahout.git@main - name: Run Jupyter Notebooks run: | From 6f7acd5071c05b5bc38bb1356581a3f588c345e7 Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 10:54:58 -0500 Subject: [PATCH 4/6] bump python version --- .github/workflows/notebook-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml index 2306ee4f3..d264e7d87 100644 --- a/.github/workflows/notebook-testing.yml +++ b/.github/workflows/notebook-testing.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.9" - name: Install dependencies run: | From 1f7aea257ee2c39537fb77821962856fdcea79ee Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 11:13:36 -0500 Subject: [PATCH 5/6] install dependencies in notebook --- .github/workflows/notebook-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml index d264e7d87..780d0e62f 100644 --- a/.github/workflows/notebook-testing.yml +++ b/.github/workflows/notebook-testing.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nbconvert nbclient ipykernel git+https://github.com/apache/mahout.git@main + pip install nbconvert nbclient ipykernel - name: Run Jupyter Notebooks run: | From 0ad0f77b3fe558f4f2bee6590fc5f4567345e7ba Mon Sep 17 00:00:00 2001 From: rawkintrevo Date: Thu, 5 Sep 2024 11:23:41 -0500 Subject: [PATCH 6/6] re-aim at main --- .github/workflows/notebook-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml index 780d0e62f..56c105d32 100644 --- a/.github/workflows/notebook-testing.yml +++ b/.github/workflows/notebook-testing.yml @@ -3,10 +3,10 @@ name: CI for Jupyter Notebooks on: push: branches: - - 454-notebook-testing + - main pull_request: branches: - - 454-notebook-testing + - main jobs: test-notebooks: