From dab7c3e66daf8bdcb9178c706232f8551765332c Mon Sep 17 00:00:00 2001 From: Alek050 Date: Tue, 24 Mar 2026 14:57:35 +0100 Subject: [PATCH 1/2] add kernelspec message and check --- .github/workflows/check_kernelspec.yml | 29 ++++++++++++++++++++++++++ big_data_environment.yml | 1 + practicals_jn_book/requirements.txt | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check_kernelspec.yml diff --git a/.github/workflows/check_kernelspec.yml b/.github/workflows/check_kernelspec.yml new file mode 100644 index 0000000..865f11f --- /dev/null +++ b/.github/workflows/check_kernelspec.yml @@ -0,0 +1,29 @@ +name: Check notebook kernelspecs + +on: + pull_request: + branches: [ main ] + +jobs: + check-kernelspec: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install nbformat + run: pip install nbformat + + - name: Check and fix kernelspecs + run: | + python .github/scripts/clean_kernelspecs.py + if ! git diff --exit-code; then + echo "ERROR: Notebooks had incorrect kernelspecs!" + echo "Please run .github/scripts/clean_kernelspecs.py locally, recommit, and push." + git diff + exit 1 + fi \ No newline at end of file diff --git a/big_data_environment.yml b/big_data_environment.yml index 9e5a5fb..954703e 100644 --- a/big_data_environment.yml +++ b/big_data_environment.yml @@ -14,3 +14,4 @@ dependencies: - pyqt - nbconvert - jupyter-book=1.0 + - nbformat diff --git a/practicals_jn_book/requirements.txt b/practicals_jn_book/requirements.txt index 805cbf2..3044ba0 100644 --- a/practicals_jn_book/requirements.txt +++ b/practicals_jn_book/requirements.txt @@ -6,4 +6,4 @@ scipy>=1.15 matplotlib==3.10.0 jupyter-book==1.0 pyarrow>=19.0 -nbformat +nbformat \ No newline at end of file From c2d30975b3d338295ad03c903e48b3b4c1f679a8 Mon Sep 17 00:00:00 2001 From: Alek050 Date: Tue, 24 Mar 2026 15:04:00 +0100 Subject: [PATCH 2/2] ran specs --- practicals_jn_book/week_1/finalbook_part1.ipynb | 4 ++-- practicals_jn_book/week_1/finalbook_part2.ipynb | 4 ++-- practicals_jn_book/week_2/finalbook.ipynb | 2 +- practicals_jn_book/week_3/finalbook.ipynb | 2 +- practicals_jn_book/week_4/finalbook.ipynb | 2 +- practicals_jn_book/week_5/finalbook.ipynb | 2 +- practicals_jn_book/week_6/finalbook.ipynb | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/practicals_jn_book/week_1/finalbook_part1.ipynb b/practicals_jn_book/week_1/finalbook_part1.ipynb index d8627d3..54bda40 100644 --- a/practicals_jn_book/week_1/finalbook_part1.ipynb +++ b/practicals_jn_book/week_1/finalbook_part1.ipynb @@ -714,9 +714,9 @@ "celltoolbar": "Tags", "hide_input": false, "kernelspec": { - "display_name": "Python [conda env:big_data_environment]", + "display_name": "Python 3", "language": "python", - "name": "conda-env-big_data_environment-py" + "name": "python3" }, "language_info": { "codemirror_mode": { diff --git a/practicals_jn_book/week_1/finalbook_part2.ipynb b/practicals_jn_book/week_1/finalbook_part2.ipynb index f34a313..213d340 100644 --- a/practicals_jn_book/week_1/finalbook_part2.ipynb +++ b/practicals_jn_book/week_1/finalbook_part2.ipynb @@ -3328,9 +3328,9 @@ "celltoolbar": "Tags", "hide_input": false, "kernelspec": { - "display_name": "Python [conda env:big_data_environment]", + "display_name": "Python 3", "language": "python", - "name": "conda-env-big_data_environment-py" + "name": "python3" }, "language_info": { "codemirror_mode": { diff --git a/practicals_jn_book/week_2/finalbook.ipynb b/practicals_jn_book/week_2/finalbook.ipynb index 68dd759..af6ef46 100644 --- a/practicals_jn_book/week_2/finalbook.ipynb +++ b/practicals_jn_book/week_2/finalbook.ipynb @@ -3480,7 +3480,7 @@ "celltoolbar": "Tags", "hide_input": false, "kernelspec": { - "display_name": "big_data_environment", + "display_name": "Python 3", "language": "python", "name": "python3" }, diff --git a/practicals_jn_book/week_3/finalbook.ipynb b/practicals_jn_book/week_3/finalbook.ipynb index 6e46178..c6d4565 100644 --- a/practicals_jn_book/week_3/finalbook.ipynb +++ b/practicals_jn_book/week_3/finalbook.ipynb @@ -1663,7 +1663,7 @@ "celltoolbar": "Tags", "hide_input": false, "kernelspec": { - "display_name": "big_data_environment", + "display_name": "Python 3", "language": "python", "name": "python3" }, diff --git a/practicals_jn_book/week_4/finalbook.ipynb b/practicals_jn_book/week_4/finalbook.ipynb index 3391a5d..9b3ac39 100644 --- a/practicals_jn_book/week_4/finalbook.ipynb +++ b/practicals_jn_book/week_4/finalbook.ipynb @@ -11023,7 +11023,7 @@ "metadata": { "celltoolbar": "Tags", "kernelspec": { - "display_name": "big_data_environment", + "display_name": "Python 3", "language": "python", "name": "python3" }, diff --git a/practicals_jn_book/week_5/finalbook.ipynb b/practicals_jn_book/week_5/finalbook.ipynb index e639195..c6e24b0 100644 --- a/practicals_jn_book/week_5/finalbook.ipynb +++ b/practicals_jn_book/week_5/finalbook.ipynb @@ -1313,7 +1313,7 @@ "metadata": { "celltoolbar": "Tags", "kernelspec": { - "display_name": "big_data_environment", + "display_name": "Python 3", "language": "python", "name": "python3" }, diff --git a/practicals_jn_book/week_6/finalbook.ipynb b/practicals_jn_book/week_6/finalbook.ipynb index ef725c3..d9ec5e4 100644 --- a/practicals_jn_book/week_6/finalbook.ipynb +++ b/practicals_jn_book/week_6/finalbook.ipynb @@ -875,7 +875,7 @@ "celltoolbar": "Tags", "hide_input": false, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" },