Skip to content

Commit ed6cb69

Browse files
committed
Harden execute workflow against local kernel names
Pin nbconvert to CI's python3 kernel via --ExecutePreprocessor.kernel_name=python3, so notebooks committed with a contributor-local kernel name (e.g. pixi's sdata-plot-notebooks kernel from kernel-install) still execute correctly in CI.
1 parent b4cad04 commit ed6cb69

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/execute.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ jobs:
7979
- name: Re-execute selected notebooks
8080
if: steps.pick.outputs.files != ''
8181
run: |
82+
# Pin kernel_name to python3 so notebooks committed with a
83+
# contributor-local kernel name (e.g. from a pixi `kernel-install`
84+
# task) still execute against CI's stock python3 kernel.
8285
while IFS= read -r nb; do
8386
[ -z "$nb" ] && continue
8487
echo "Executing $nb"
85-
jupyter nbconvert --to notebook --execute --inplace "$nb"
88+
jupyter nbconvert --to notebook --execute --inplace \
89+
--ExecutePreprocessor.kernel_name=python3 "$nb"
8690
done <<< "${{ steps.pick.outputs.files }}"

0 commit comments

Comments
 (0)