Fix multi-review findings: Gibbs ranking, worker-death hang, fp64 energies, FIRE decoupling #173
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # 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@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 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 | |
| # Parses the notebooks. Does NOT run them. | |
| # | |
| # This job was called "Test Notebooks", ran a step called "Test notebooks | |
| # execute", and installed `pytest nbmake` -- then never invoked nbmake. What | |
| # it actually did, and still does, is assert each file is JSON with the two | |
| # keys a notebook must have. Naming it accurately is the point of this job's | |
| # current shape: the misleading version read as coverage nobody had. | |
| # | |
| # Executing them belongs in the slow tier, next to the model cache: every one | |
| # of the 20 needs a neural network potential. Exactly one runs there for real | |
| # (see `Execute the single-point notebook` in tests.yml). The limit is CPU | |
| # time, measured rather than guessed: a single point over four records takes | |
| # 5.9 s, the same four records through `opt_geometry` take over 600 s, and | |
| # every other notebook either optimizes or runs `main()` end to end. | |
| # | |
| # So 19 are still parse-checked only, and an API change can invalidate them | |
| # without turning anything red. The narrower guard that does cover all 20 is | |
| # tests/test_notebook_properties.py, which fails when a notebook reads an SD | |
| # property no Auto3D writer sets. | |
| validate-notebooks: | |
| name: Validate Notebooks (JSON only) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: "3.12" | |
| # No dependencies: the check is stdlib `json` over files on disk. It | |
| # previously installed the package plus pytest and nbmake for a step that | |
| # imported none of them. | |
| - name: Validate notebook JSON | |
| run: | | |
| python -c " | |
| import json, sys | |
| from pathlib import Path | |
| bad = [] | |
| notebooks = sorted(Path('example').glob('*.ipynb')) | |
| if not notebooks: | |
| sys.exit('no notebooks found under example/') | |
| for nb in notebooks: | |
| try: | |
| data = json.loads(nb.read_text()) | |
| if 'cells' not in data or 'nbformat' not in data: | |
| bad.append(f'{nb}: missing cells/nbformat') | |
| else: | |
| print(f'ok {nb} ({len(data[\"cells\"])} cells)') | |
| except json.JSONDecodeError as e: | |
| bad.append(f'{nb}: {e}') | |
| if bad: | |
| sys.exit('invalid notebooks:\n ' + '\n '.join(bad)) | |
| print(f'{len(notebooks)} notebooks parsed; none executed') | |
| " |