Skip to content

Live optimization progress display in auto3d run #41

Live optimization progress display in auto3d run

Live optimization progress display in auto3d run #41

Workflow file for this run

name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'src/**'
- 'example/**'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- 'src/**'
- 'example/**'
- '.github/workflows/docs.yml'
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r docs/requirements.txt
- name: Build Sphinx documentation
run: |
cd docs
make html
- name: Check for Sphinx warnings
run: |
cd docs
make html 2>&1 | tee build.log
# Fail if there are errors (warnings are ok)
if grep -q "ERROR" build.log; then
echo "Documentation build has errors!"
exit 1
fi
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html/
retention-days: 7
linkcheck:
name: Check Links
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r docs/requirements.txt
- name: Check links
run: |
cd docs
make linkcheck || true # Don't fail on broken external links
continue-on-error: true
test-notebooks:
name: Test Notebooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest nbmake
- name: Test notebooks execute
run: |
# Test that notebooks are valid (syntax check only, don't execute)
python -c "
import json
from pathlib import Path
for nb in Path('example').glob('*.ipynb'):
print(f'Checking {nb}...')
with open(nb) as f:
data = json.load(f)
assert 'cells' in data
assert 'nbformat' in data
print(f' OK: {len(data[\"cells\"])} cells')
"