diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 34af55d8..311dc06c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/run-notebooks.yml b/.github/workflows/run-notebooks.yml new file mode 100644 index 00000000..92a428e8 --- /dev/null +++ b/.github/workflows/run-notebooks.yml @@ -0,0 +1,36 @@ +name: Test jupyter notebook tutorials + +on: + push: + branches: + - main # only rerun tutorials when making PRs or changing main + - v3 + pull_request: + branches: + - '*' + +jobs: + build: + + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install jupyter setuptools wheel + python -m pip install -r requirements.txt + python -m pip install . --no-build-isolation + - name: Run tutorial notebooks + run: | + jupyter execute docs/tutorials/*.ipynb + diff --git a/docs/conf.py b/docs/conf.py index aec47aa4..620271f0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,8 +51,8 @@ # Disable notebook timeout nbsphinx_timeout = -1 -# Always re-run notebooks when building docss -nbsphinx_execute = "always" +# Only re-run notebooks that have no outputs +nbsphinx_execute = "auto" # Allow notebook errors nbsphinx_allow_errors = False