Skip to content

Commit 6b48a91

Browse files
committed
Complete versioning refactor with pre-built documentation
- Unified build system with smart caching (only rebuilds latest) - Per-version static content: API, notebooks, outputs, figures, indexes - Version selector in sidebar for API and examples pages - Versioned Pyodide execution (installs correct package version) - Notebook execution with mplstyle support and python3 kernel - Remove footer, update scroll-to-top position - Fix version change reactivity with invalidateAll
1 parent 4a4118e commit 6b48a91

1,443 files changed

Lines changed: 237436 additions & 14713 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,69 +27,42 @@ jobs:
2727
python-version: '3.11'
2828

2929
- name: Install Python dependencies
30-
run: pip install -r scripts/requirements.txt
30+
run: |
31+
pip install -r scripts/requirements.txt
32+
python -m ipykernel install --user --name python3 --display-name "Python 3"
3133
32-
- name: Clone PathSim repositories for API extraction
34+
- name: Clone PathSim repositories
3335
run: |
3436
git clone https://github.com/pathsim/pathsim.git ../pathsim || { echo "Failed to clone pathsim"; exit 1; }
3537
git clone https://github.com/pathsim/pathsim-chem.git ../pathsim-chem || { echo "Failed to clone pathsim-chem"; exit 1; }
3638
git clone https://github.com/pathsim/pathsim-vehicle.git ../pathsim-vehicle || { echo "Failed to clone pathsim-vehicle"; exit 1; }
3739
38-
- name: Fetch all tags and verify repos
40+
- name: Fetch all tags
3941
run: |
4042
for repo in pathsim pathsim-chem pathsim-vehicle; do
41-
if [ ! -d "../$repo/.git" ]; then
42-
echo "Error: Repository $repo not properly cloned"
43-
exit 1
44-
fi
4543
git -C ../$repo fetch --tags
4644
latest_tag=$(git -C ../$repo describe --tags --abbrev=0 2>/dev/null || echo 'no tags')
47-
echo "✓ $repo: branch=$(git -C ../$repo rev-parse --abbrev-ref HEAD), latest_tag=$latest_tag"
48-
done
49-
50-
# Always extract latest API (for src/lib/api/generated/)
51-
- name: Extract latest API
52-
run: python scripts/extract-api.py
53-
54-
# Prepare notebooks BEFORE version extraction (repos still on main)
55-
- name: Prepare notebooks
56-
run: python scripts/prepare-notebooks.py
57-
58-
# Execute notebooks to generate outputs (parallel)
59-
- name: Execute notebooks
60-
run: python scripts/execute-notebooks.py
61-
62-
# Smart extraction: only missing versions + always re-extract latest
63-
# This checks out tags, so must run after notebook prep
64-
- name: Extract versioned API
65-
run: python scripts/extract-versions.py
66-
67-
# Ensure repos are back on main branch
68-
- name: Restore repos to main branch
69-
run: |
70-
for repo in pathsim pathsim-chem pathsim-vehicle; do
71-
git -C ../$repo checkout main 2>/dev/null || git -C ../$repo checkout master 2>/dev/null || true
72-
echo "✓ $repo on $(git -C ../$repo rev-parse --abbrev-ref HEAD)"
45+
echo "✓ $repo: latest_tag=$latest_tag"
7346
done
7447
75-
# Always regenerate manifests (to pick up new versions)
76-
- name: Generate version manifests
77-
run: python scripts/generate-manifests.py
48+
# Build all versions (API, notebooks, outputs, figures)
49+
# Uses smart caching: historical versions only built once, latest always rebuilt
50+
- name: Build documentation
51+
run: python scripts/build.py
7852

79-
- name: Build search and crossref indexes
53+
# Build global search and crossref indexes
54+
- name: Build indexes
8055
run: python scripts/build-indexes.py
8156

8257
- name: Commit generated files
8358
run: |
8459
git config user.name "github-actions[bot]"
8560
git config user.email "github-actions[bot]@users.noreply.github.com"
86-
# Commit API data, versioned cache, and notebooks
87-
git add src/lib/api/generated/ static/api/versions/
88-
git add static/notebooks/ 2>/dev/null || true
61+
git add static/ src/lib/api/generated/
8962
if git diff --staged --quiet; then
9063
echo "No changes to commit"
9164
else
92-
git commit -m "Update generated API data and notebooks [skip ci]"
65+
git commit -m "Update generated content [skip ci]"
9366
git push
9467
fi
9568

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ coverage/
3030
# Misc
3131
*.local
3232
*.bat
33+
__pycache__/

0 commit comments

Comments
 (0)