Skip to content

Commit 1c4dca2

Browse files
committed
Add Manual Notebook CI workflow for executing and rebuilding Nexus-ready notebooks
1 parent 3cc2d8c commit 1c4dca2

File tree

2 files changed

+74
-6
lines changed

2 files changed

+74
-6
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Manual Notebook CI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
profile:
7+
description: "Execution profile"
8+
required: true
9+
default: "fast"
10+
type: choice
11+
options:
12+
- fast
13+
- full
14+
15+
jobs:
16+
execute-notebooks:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
submodules: true
25+
26+
- name: Setup micromamba
27+
uses: mamba-org/setup-micromamba@v2
28+
with:
29+
environment-file: env.yml
30+
environment-name: rges-pit-dc
31+
cache-environment: true
32+
33+
- name: Install runner + transformer deps
34+
shell: bash -l {0}
35+
run: |
36+
python -m pip install --upgrade pip
37+
python -m pip install pyyaml nbclient nbformat
38+
39+
- name: Rebuild Nexus-ready notebooks (RRN/build)
40+
shell: bash -l {0}
41+
run: |
42+
rm -rf RRN/build
43+
python scripts/notebook_transformer.py --force
44+
45+
- name: Execute notebooks
46+
shell: bash -l {0}
47+
run: |
48+
SKIP_TAGS=""
49+
if [ "${{ inputs.profile }}" = "fast" ]; then
50+
SKIP_TAGS="slow,ci-skip"
51+
else
52+
SKIP_TAGS="ci-skip"
53+
fi
54+
55+
python scripts/execute_notebooks_ci.py \
56+
--glob "RRN/build/*.ipynb" \
57+
--skip-tags "$SKIP_TAGS" \
58+
--timeout 1800

TODO.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
- `reges-pit/nexus-notebooks`
2929
- [ ] add global `refdata_dependencies.yaml` (match `spacetelescope/roman_notebooks` format)
3030
- [ ] decide notebook discovery regexes (paths/substrings STScI wrangler should scan)
31-
- [ ] organize notebooks in directories where each dir has its own `requirements.txt`
32-
- [ ] add optional top-level `environment.yml` (mamba spec for non-pip / low-level deps only)
33-
- [ ] move any per-notebook helper `.py` into the same notebook directories
34-
- [ ] if using shared modules, create a top-level shared dir + symlink into each notebook dir that imports it
35-
- [ ] update automation: publish/update the Nexus repo from `RRN/export/` (no PRs to `roman_notebooks`)
31+
- `notebooks/*.ipynb`
32+
- [-] organize notebooks in directories where each dir has its own `requirements.txt`
33+
- [x] add optional top-level `environment.yml` (mamba spec for non-pip / low-level deps only)
34+
- [-] move any per-notebook helper `.py` into the same notebook directories
35+
- they are downloaded in cells
36+
- [-] if using shared modules, create a top-level shared dir + symlink into each notebook dir that imports it
37+
- [x] update automation: publish/update the Nexus repo from `RRN/export_submodule/` (no PRs to `roman_notebooks`)
3638
- [ ] send STScI the repo URL + chosen regex list + any notes on expected execution order
3739

3840
## Nexus
@@ -44,6 +46,8 @@
4446
- [-] edit the tools notebook to match the Colab/RRN freindly style
4547
- [ ] add Citations sections in all notebooks (is this already done?)
4648
- [ ] delete the `roman_notebooks` PR + fork
49+
- [ ] test that the notebooks run using the provided yaml
50+
- [ ] tag long cells to avoid in quick tests
4751

4852
## Microlensing Tools Notebook
4953
- [ ] table formatting
@@ -59,4 +63,10 @@
5963
- [ ] proof read
6064
- [ ] test run
6165
- [ ] check data import functions
62-
- [ ] Add to nexus export list
66+
- [ ] Add to nexus export list
67+
68+
## Website
69+
- [ ] remove mention of workshop sign-up
70+
- [ ] update with real data links
71+
- [x] change PR from fork to PR from branch
72+
- [ ] delete website fork (dc-copy)

0 commit comments

Comments
 (0)