-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (93 loc) · 3.54 KB
/
run-all-notebooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# This notebook will run all Python notebooks
#
# The environment variable NOTEBOOKS should contain all notebooks, so if you
# create a new one or notice a missing notebook, please feel free to add it!
name: run all notebooks
on:
workflow_dispatch:
schedule:
- cron: '40 12 * * 1'
jobs:
run_all_notebooks:
runs-on: ubuntu-latest
env:
NOTEBOOKS: |
(
"examples/core_examples/FileIO_DataStore.ipynb"
"examples/core_examples/hyperbolic_magnitude_test.ipynb"
"examples/core_examples/iterator_test.ipynb"
"examples/core_examples/Run_Pipe.ipynb"
"examples/core_examples/Pipe_Example.ipynb"
"examples/creation_examples/posterior-demo.ipynb"
"examples/creation_examples/degradation-demo.ipynb"
"examples/creation_examples/example_GridSelection_for_HSC.ipynb"
"examples/creation_examples/example_SpecSelection_for_zCOSMOS.ipynb"
"examples/estimation_examples/NZDir.ipynb"
"examples/estimation_examples/test_sampled_summarizers.ipynb"
"examples/goldenspike_examples/goldenspike.ipynb"
)
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel numpy # For somoclu
pip install .
pip install git+https://github.com/LSSTDESC/rail_bpz@lynn/rail-directory-match
pip install flake8 pytest pytest-cov mockmpi pytest-timeout
pip install -r docs/requirements.txt
pip install -r docs/nbconvert-requirements.txt
pip install jupyter nbconvert nbformat
- name: Core notebooks
shell: bash
run: |
allnotebooks=${{ env.NOTEBOOKS }}
for notebook in ${allnotebooks[*]}; do
if [[ $notebook == *"core_examples"* ]]; then
jupyter nbconvert --to html --execute "$notebook"
fi
done
- name: Creation notebooks
shell: bash
run: |
allnotebooks=${{ env.NOTEBOOKS }}
for notebook in ${allnotebooks[*]}; do
if [[ $notebook == *"creation_examples"* ]]; then
jupyter nbconvert --to html --execute "$notebook"
fi
done
- name: Estimation notebooks
shell: bash
run: |
allnotebooks=${{ env.NOTEBOOKS }}
for notebook in ${allnotebooks[*]}; do
if [[ $notebook =~ "estimation_examples" ]]; then
jupyter nbconvert --to html --execute "$notebook"
fi
done
- name: Goldenspike notebooks
shell: bash
run: |
allnotebooks=${{ env.NOTEBOOKS }}
for notebook in ${allnotebooks[*]}; do
if [[ $notebook =~ "goldenspike_examples" ]]; then
jupyter nbconvert --to html --execute "$notebook"
fi
done
- name: Other notebooks
shell: bash
run: |
allnotebooks=${{ env.NOTEBOOKS }}
for notebook in ${allnotebooks[*]}; do
if [[ ! $notebook =~ "core_examples" &&
! $notebook =~ "creation_examples" &&
! $notebook =~ "estimation_examples" &&
! $notebook =~ "goldenspike_examples" ]]; then
jupyter nbconvert --to html --execute "$notebook"
fi
done