Skip to content

[MNT] Test that all notebooks run #664

Open

Description

@tschm

Copy from ISLP_labs

Activity

  1. tschm commented on Nov 12, 2025

    @tschm
    ContributorAuthor
    # testing all notebooks
    name: TEST
    
    on:
      - push
    
    jobs:
      test:
        runs-on: ubuntu-latest
    
        strategy:
          matrix:
            python-version: ['3.11', '3.12']
            notebook: [ Ch02-statlearn-lab.ipynb,
                        Ch03-linreg-lab.ipynb,
                        Ch04-classification-lab.ipynb,
                        Ch05-resample-lab.ipynb,
                        Ch06-varselect-lab.ipynb,
                        Ch07-nonlin-lab.ipynb,
                        Ch08-baggboost-lab.ipynb,
                        Ch09-svm-lab.ipynb,
                        Ch10-deeplearning-lab.ipynb,
                        Ch11-surv-lab.ipynb,
                        Ch12-unsup-lab.ipynb,
                        Ch13-multiple-lab.ipynb]
            exclude:
              - python-version: '3.11'
                notebook: Ch10-deeplearning-lab.ipynb
    
          fail-fast: false
    
        steps:
        - uses: actions/checkout@v4
    
        - name: Install uv
          uses: astral-sh/setup-uv@v5
          with:
            version: "0.5.15"
    
        - name: Set up Python
          shell: bash
          run: |
            uv python install ${{ matrix.python-version }}
    
        - name: Create venv
          shell: bash
          run: uv venv --python ${{ matrix.python-version }}
    
        - name: Install requirements
          shell: bash
          run: |
            uv pip install --upgrade pip
            uv pip install -r requirements.txt
            uv pip install pytest nbmake
    
        - name: Test
          shell: bash
          run: |
            uv run pytest --nbmake --nbmake-timeout=3600 -vv ${{ matrix.notebook }}
  2. fkiraly commented on Nov 14, 2025

    @fkiraly
    Collaborator

    Closed by #665

    Can you please use closing keywords so that merging PR automatically closes corresponding issues?

    https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

  3. added
    maintenanceContinuous integration, unit testing & package distribution
    on Nov 14, 2025
  4. changed the title [-]Test that all notebooks run[/-] [+][MNT] Test that all notebooks run[/+] on Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceContinuous integration, unit testing & package distribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions