Skip to content
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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches:
- "**"
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * WED"
workflow_dispatch:

jobs:
test_colab:
uses: fem-on-colab/open-in-colab-workflow/.github/workflows/workflow_call.yml@main
with:
work_directory: notebooks_copy
notebook_pattern: "**/*.ipynb"
notebook_preparation: |
rsync -avz --include="*.ipynb" --exclude="*" . notebooks_copy/
test_script: |
python3 -m pytest --nbval notebooks_copy
publish_on: artifact@notebooks

warn:
runs-on: ubuntu-latest
if: github.repository == 'firedrakeproject/notebooks' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
steps:
- name: Warn if scheduled workflow is about to be disabled
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main
with:
workflow-filename: ci.yml
days-elapsed: 50
2 changes: 1 addition & 1 deletion 01-spd-helmholtz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 02-poisson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 03-elasticity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 04-burgers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 05-mixed-poisson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
11 changes: 10 additions & 1 deletion 06-pde-constrained-optimisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down Expand Up @@ -126,6 +126,15 @@
"This problem setup requires a mesh that is more complex than the built in ones Firedrake provides. Instead, it was created with [Gmsh](http://gmsh.info). It is loaded by using the `Mesh` constructor, passing the filename of the mesh in question."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!rm -f stokes-control.msh && wget https://raw.githubusercontent.com/firedrakeproject/notebooks/refs/heads/main/stokes-control.msh"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
2 changes: 1 addition & 1 deletion 07-geometric-multigrid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 08-composable-solvers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 09-hybridisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 10-sum-factorisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 11-extract-adjoint-solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 12-HPC_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"try:\n",
" import firedrake\n",
"except ImportError:\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
" import firedrake"
]
},
Expand Down
2 changes: 1 addition & 1 deletion utils/firedrake-colab-notebooks
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ colab_cell = nbformat.notebooknode.NotebookNode({
'source': '''try:
import firedrake
except ImportError:
!wget "https://fem-on-colab.github.io/releases/firedrake-install-real.sh" -O "/tmp/firedrake-install.sh" && bash "/tmp/firedrake-install.sh"
!wget "https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh" -O "/tmp/firedrake-install.sh" && bash "/tmp/firedrake-install.sh"
import firedrake'''
})

Expand Down