Skip to content

Merge pull request #286 from massongit/update_scikit_learn #425

Merge pull request #286 from massongit/update_scikit_learn

Merge pull request #286 from massongit/update_scikit_learn #425

Workflow file for this run

name: run_notebooks
on:
push:
branches:
- master
pull_request:
permissions: { }
jobs:
run_notebooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run docker containers
run: docker compose up -d --wait
- name: Run notebooks
run: |
chmod -R 777 docker/
for f in $(find docker/work -type f -name "*.ipynb" -not -path "*/.ipynb_checkpoints/*" | sed -e "s:docker/work/::g"); do
echo "Run docker/work/${f}"
# 「UsageError: %%sql is a cell magic, but the cell body is empty. Did you mean the line magic %sql (single %)? 」を許容するため、UsageErrorを許容する設定にしている
docker compose exec -T notebook bash -c "cd work && jupyter nbconvert --to notebook --debug --NotebookClient.allow_error_names UsageError --execute ${f}"
# 実行時に「MetaData.__init__() got an unexpected keyword argument 'bind'」が発生していたら異常終了させる
if grep unexpected "$(echo "docker/work/${f}" | sed -e 's/\.ipynb/\.nbconvert.ipynb/g')"; then
exit 1
fi
echo
done