docs: standardize PyPI badges and make versioning dynamic #325
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: Test Notebooks | |
| on: | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| branches: [ "master", "main" ] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test_notebooks: | |
| # The Colab Docker container's kernel sends 'colab_request' messages that | |
| # require the Colab UI backend, causing DeadKernelError when run headlessly. | |
| # We use a standard runner + clean Jupyter install instead. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package and notebook dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,plm,gnn,ai]" | |
| # Notebook visualization / interactivity / ML dependencies | |
| pip install jupyter nbconvert \ | |
| umap-learn matplotlib seaborn plotly ipywidgets \ | |
| py3Dmol "jax[cpu]" | |
| - name: Test Tutorials | |
| run: | | |
| # Run unique tutorials not covered in other steps | |
| jupyter nbconvert --to notebook --execute --output-dir=/tmp/nbout \ | |
| --ExecutePreprocessor.timeout=1800 \ | |
| examples/ml_integration/plm_embeddings.ipynb | |
| - name: Test Interactive Examples | |
| run: | | |
| # protein_quality_assessment.ipynb: runs minimize_energy=True on a 53-residue | |
| # protein — consistently times out on shared CI CPUs. Skipped; test locally. | |
| # | |
| # Plotly fig.show() pattern: notebooks use fig.show(renderer='json' if os.getenv('CI') else None) | |
| # This serialises the figure to stdout immediately in headless CI instead of | |
| # trying to open a browser window, which would block indefinitely. | |
| # All google.colab imports in interactive_tutorials use try/except guards and | |
| # correctly detect non-Colab environments without any mocking needed. | |
| jupyter nbconvert --to notebook --execute --output-dir=/tmp/nbout \ | |
| --ExecutePreprocessor.timeout=900 \ | |
| examples/interactive_tutorials/folding_landscape.ipynb \ | |
| examples/interactive_tutorials/gfp_molecular_forge.ipynb \ | |
| examples/interactive_tutorials/latent_space_explorer.ipynb \ | |
| examples/interactive_tutorials/nerf_geometry_lab.ipynb \ | |
| examples/interactive_tutorials/virtual_nmr_spectrometer.ipynb \ | |
| examples/interactive_tutorials/rdc_alignment_explorer.ipynb | |
| - name: Test ML Integration Examples | |
| run: | | |
| jupyter nbconvert --to notebook --execute --output-dir=/tmp/nbout \ | |
| --ExecutePreprocessor.timeout=1800 \ | |
| examples/ml_integration/*.ipynb | |
| - name: Test ML Loading Examples | |
| run: | | |
| # mlx_handover.ipynb requires Apple Silicon (MLX is macOS-only) — skipped in Linux CI. | |
| jupyter nbconvert --to notebook --execute --output-dir=/tmp/nbout \ | |
| --ExecutePreprocessor.timeout=600 \ | |
| examples/ml_loading/jax_handover.ipynb \ | |
| examples/ml_loading/pytorch_handover.ipynb |