Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

&felipeangelimvieira, yarnabrina [MNT] CI step to test that notebooks run #1621

Merged
merged 14 commits into from
Aug 25, 2024
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
12 changes: 12 additions & 0 deletions build_tools/run_examples.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,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>61",
fkiraly marked this conversation as resolved.
Show resolved Hide resolved
]
Loading