diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7a3602b2..3088aef7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,22 @@ concurrency: cancel-in-progress: true jobs: + run-notebook-tutorials: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ".[dev,github-actions,graph,mqf2]" + - name: Run example notebooks + run: build_tools/run_examples.sh + shell: bash + pytest: name: Run pytest runs-on: ${{ matrix.os }} diff --git a/build_tools/run_examples.sh b/build_tools/run_examples.sh new file mode 100755 index 00000000..db1168fb --- /dev/null +++ b/build_tools/run_examples.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Script to run all example notebooks. +# copy-paste from sktime's run_examples.sh +set -euxo pipefail + +CMD="jupyter nbconvert --to notebook --inplace --execute --ExecutePreprocessor.timeout=600" + +for notebook in docs/source/tutorials/*.ipynb; do + echo "Running: $notebook" + $CMD "$notebook" +done diff --git a/pyproject.toml b/pyproject.toml index 9f82203c..8180f03d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,3 +102,12 @@ dev = [ github-actions = ["pytest-github-actions-annotate-failures"] graph = ["networkx"] mqf2 = ["cpflows"] + +[tool.setuptools] +py-modules = ["pytorch_forecasting"] + +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=70.0.0", +]