Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b892108
Update daily_schedules.md
courtneydean33 Mar 18, 2026
98601bf
Merge pull request #492 from courtneydean33/patch-12
iamzoltan Mar 20, 2026
6652eb4
fix: enable jupyter-book execution cache instead of force-rebuild
iamzoltan Mar 20, 2026
a604510
chore: upgrade deprecated Node.js 20 GitHub Actions to latest versions
iamzoltan Mar 20, 2026
0313ff0
feat: add generate_book_v2.py for Jupyter Book 2 myst.yml generation
iamzoltan Mar 20, 2026
bb31398
feat: add publish-book-v2 workflow for Jupyter Book 2 pilot
iamzoltan Mar 20, 2026
86bdbf9
fix: use find_all (not deprecated findAll) and ignore book/myst.yml b…
iamzoltan Mar 20, 2026
0a9c74d
fix: copy CNAME into build output to preserve custom domain on deploy
iamzoltan Mar 20, 2026
726b16e
Merge pull request #494 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
89cd833
fix: convert JB1 sections→children in TOC, add book/ symlinks in work…
iamzoltan Mar 20, 2026
5eaaa3a
Merge pull request #495 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
5fef812
fix: add skip-execution tag to NotImplementedError stub cells for JB2…
iamzoltan Mar 20, 2026
fa17adc
Merge pull request #496 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
4aaac53
fix: use raises-exception on all code cells + post-process HTML to st…
iamzoltan Mar 20, 2026
d4182c3
refactor: rename tag_stub_cells to tag_cells_allow_errors
iamzoltan Mar 20, 2026
cc3a973
fix: only apply raises-exception tags for student notebooks, not inst…
iamzoltan Mar 20, 2026
a5e08dc
Merge pull request #497 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
ac6dfd9
Update generate_book_v2 and error parsing v2
iamzoltan Mar 20, 2026
09db1c9
Merge pull request #498 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
b8e2311
Update generate_book_v2 and error parsing v2 to fix bugs
iamzoltan Mar 20, 2026
68d010d
Merge pull request #499 from neuromatch/jupyter-book-2
iamzoltan Mar 20, 2026
089ce3e
Fix Bilibili autoplay and stub-error stripping in JB2 build
iamzoltan Mar 21, 2026
c8a4ed4
Add diagnostic output to parse_html_for_errors_v2.py
iamzoltan Mar 21, 2026
b27c373
Merge pull request #500 from neuromatch/jupyter-book-2
iamzoltan Mar 21, 2026
e765917
Fix favicon path and duplicate sidebar nav labels
iamzoltan Mar 21, 2026
b7df46f
Fix double title, broken edit link, and stale error cache
iamzoltan Mar 24, 2026
c4d8a61
Merge pull request #501 from neuromatch/jupyter-book-2
iamzoltan Mar 24, 2026
6bc957e
Fix error stripping: target page JSON not static HTML
iamzoltan Mar 24, 2026
da1c716
Rename parse_html_for_errors_v2.py -> parse_build_for_errors_v2.py
iamzoltan Mar 24, 2026
cf2c01f
Merge pull request #502 from neuromatch/jupyter-book-2
iamzoltan Mar 24, 2026
09b37f9
Remove daily survers from outro pages
iamzoltan Mar 30, 2026
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
2 changes: 1 addition & 1 deletion .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
steps:
- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-rendering-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
steps:
- name: Cache fonts
id: cache-fonts
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /usr/share/fonts/truetype/humor-sans
key: fonts-${{ runner.os }}-humor-sans-v1
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/publish-book-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: publish-book-v2

on:
workflow_dispatch:

env:
NB_KERNEL: python
ORG: neuromatch
NMA_REPO: NeuroAI_Course
NMA_MAIN_BRANCH: main
# Empty string = serve from domain root (correct for custom domain neuroai.neuromatch.io)
BASE_URL: ''

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-and-deploy-book-v2:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get commit message
run: |
readonly local msg=$(git log -1 --pretty=format:"%s")
echo "COMMIT_MESSAGE=$msg" >> $GITHUB_ENV
- name: Setup Python environment
uses: ./.github/actions/setup-python-env

- name: Setup Node.js (required by MyST theme engine)
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Jupyter Book 2
run: pip install "jupyter-book>=2.1"

- name: Setup CI tools
uses: ./.github/actions/setup-ci-tools
with:
commit-message: ${{ env.COMMIT_MESSAGE }}
stub-widgets: 'false'

- name: Setup rendering dependencies
if: "!contains(env.COMMIT_MESSAGE, 'skip ci')"
uses: ./.github/actions/setup-rendering-deps

- name: Get date for cache rotation
id: cache-date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT

- name: Cache JB2 execution outputs
uses: actions/cache@v4
with:
path: book/_build/execute
key: jb2-exec-v2-${{ steps.cache-date.outputs.date }}-${{ hashFiles('tutorials/**/*.ipynb', 'requirements.txt') }}
restore-keys: |
jb2-exec-v2-${{ steps.cache-date.outputs.date }}-
jb2-exec-v2-
- name: Cache MyST theme (avoids re-download on every run)
uses: actions/cache@v4
with:
path: book/_build/templates
key: jb2-templates-v1

- name: Create symlinks so book/ can resolve repo-root paths
run: |
ln -s ${{ github.workspace }}/tutorials book/tutorials
ln -s ${{ github.workspace }}/projects book/projects
ln -s ${{ github.workspace }}/prereqs book/prereqs
- name: Generate myst.yml from materials.yml
run: python generate_book_v2.py student

- name: Build book with Jupyter Book 2
working-directory: book
run: jupyter book build --html --execute
env:
BASE_URL: ${{ env.BASE_URL }}

- name: Strip error output divs from built HTML
run: python parse_build_for_errors_v2.py student

- name: Copy CNAME for custom domain
run: cp CNAME book/_build/html/CNAME

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload HTML artifact
uses: actions/upload-pages-artifact@v3
with:
path: book/_build/html

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/publish-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT

- name: Cache Jupyter execution
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: book/.jupyter-cache
key: jupyter-exec-${{ steps.cache-date.outputs.date }}-${{ hashFiles('tutorials/**/*.ipynb', 'requirements.txt') }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.vscode
.idea
_build
_toc.yml
_toc.yml
book/myst.yml
4 changes: 2 additions & 2 deletions book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ only_build_toc_files : true
#######################################################################################
# Execution settings
execute:
execute_notebooks : force # Whether to execute notebooks at build time. Must be one of ("auto", "force", "cache", "off")
cache : "" # A path to the jupyter cache that will be used to store execution artifacts. Defaults to `_build/.jupyter_cache/`
execute_notebooks : cache # Whether to execute notebooks at build time. Must be one of ("auto", "force", "cache", "off")
cache : "book/.jupyter-cache" # A path to the jupyter cache that will be used to store execution artifacts. Defaults to `_build/.jupyter_cache/`
exclude_patterns : [Bonus_Autoencoders/student/Bonus_Tutorial1.ipynb, Bonus_Autoencoders/student/Bonus_Tutorial2.ipynb, Bonus_Autoencoders/student/Bonus_Tutorial3.ipynb] # A list of patterns to *skip* in execution (e.g. a notebook that takes a really long time)
timeout : 360 # The maximum time (in seconds) each notebook cell is allowed to run.
run_in_temp : false # If `True`, then a temporary directory will be created and used as the command working directory (cwd),
Expand Down
Loading
Loading