Skip to content

Commit be87d93

Browse files
authored
Merge pull request #5 from francesco-ballarin/main
Update installation URLs and add CI
2 parents 1fa363c + 4053f5e commit be87d93

14 files changed

+56
-13
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "0 0 * * WED"
12+
workflow_dispatch:
13+
14+
jobs:
15+
test_colab:
16+
uses: fem-on-colab/open-in-colab-workflow/.github/workflows/workflow_call.yml@main
17+
with:
18+
work_directory: notebooks_copy
19+
notebook_pattern: "**/*.ipynb"
20+
notebook_preparation: |
21+
rsync -avz --include="*.ipynb" --exclude="*" . notebooks_copy/
22+
test_script: |
23+
python3 -m pytest --nbval notebooks_copy
24+
publish_on: artifact@notebooks
25+
26+
warn:
27+
runs-on: ubuntu-latest
28+
if: github.repository == 'firedrakeproject/notebooks' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
29+
steps:
30+
- name: Warn if scheduled workflow is about to be disabled
31+
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main
32+
with:
33+
workflow-filename: ci.yml
34+
days-elapsed: 50

01-spd-helmholtz.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

02-poisson.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

03-elasticity.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

04-burgers.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

05-mixed-poisson.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

06-pde-constrained-optimisation.ipynb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},
@@ -126,6 +126,15 @@
126126
"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."
127127
]
128128
},
129+
{
130+
"cell_type": "code",
131+
"execution_count": null,
132+
"metadata": {},
133+
"outputs": [],
134+
"source": [
135+
"!rm -f stokes-control.msh && wget https://raw.githubusercontent.com/firedrakeproject/notebooks/refs/heads/main/stokes-control.msh"
136+
]
137+
},
129138
{
130139
"cell_type": "code",
131140
"execution_count": null,

07-geometric-multigrid.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

08-composable-solvers.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

09-hybridisation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"try:\n",
1010
" import firedrake\n",
1111
"except ImportError:\n",
12-
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
12+
" !wget \"https://fem-on-colab.github.io/releases/firedrake-install-release-real.sh\" -O \"/tmp/firedrake-install.sh\" && bash \"/tmp/firedrake-install.sh\"\n",
1313
" import firedrake"
1414
]
1515
},

0 commit comments

Comments
 (0)