Skip to content

Commit 84670a8

Browse files
Reconfigure for jupyter build execute (#57)
* Refactor data loading * Refactor data loading * Reconfigure for jupyter execution
1 parent 728938b commit 84670a8

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,30 @@ jobs:
3434
uses: actions/setup-python@v4
3535
with:
3636
python-version: '3.10'
37-
37+
- name: Install system dependencies for Jupyter
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y pandoc
3841
# Install Python dependencies
3942
- name: Install Python dependencies
4043
run: |
4144
python -m venv venv
4245
source venv/bin/activate
4346
pip install -r binder/requirements.txt
47+
- name: Install and configure Jupyter
48+
run: |
49+
python -m ipykernel install --user
50+
jupyter kernelspec list --json
4451
- uses: actions/setup-node@v4
4552
with:
4653
node-version: 18.x
4754
- name: Install MyST Markdown
4855
run: npm install -g mystmd
4956
- name: Build HTML Assets
50-
run: myst build --execute --html
57+
run: |
58+
export JUPYTER_PATH=$(python -c "import jupyter_core; print(jupyter_core.paths.jupyter_path()[0])")
59+
mkdir -p $JUPYTER_PATH
60+
myst build --execute --html
5161
- name: Upload artifact
5262
uses: actions/upload-pages-artifact@v3
5363
with:

binder/requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ nbformat>=4.2.0
1111
pandas
1212
nibabel
1313
jupyter
14-
scikit-learn
14+
scikit-learn
15+
ipykernel
16+
myst-nb
17+
jupyter-cache

0 commit comments

Comments
 (0)