diff --git a/.github/workflows/smarteole_example.yaml b/.github/workflows/smarteole_example.yaml index 7f889e8..3af17c9 100644 --- a/.github/workflows/smarteole_example.yaml +++ b/.github/workflows/smarteole_example.yaml @@ -6,6 +6,7 @@ on: - main paths-ignore: - 'examples/smarteole_example.ipynb' + pull_request: workflow_dispatch: diff --git a/examples/smarteole_example.ipynb b/examples/smarteole_example.ipynb index 775d23c..8329078 100644 --- a/examples/smarteole_example.ipynb +++ b/examples/smarteole_example.ipynb @@ -35,7 +35,7 @@ "from wind_up.models import PlotConfig\n", "from wind_up.reanalysis_data import ReanalysisDataset\n", "\n", - "sys.path.append(str(PROJECTROOT_DIR))\n", + "sys.path.append(str(PROJECTROOT_DIR / \"examples\"))\n", "from examples.helpers import download_zenodo_data" ] }, diff --git a/pyproject.toml b/pyproject.toml index 513e721..c5458b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,6 +161,12 @@ sequence = [ { cmd = "coverage report -m" }, ] +[tool.poe.tasks.smarteole-nb] +help = "Runs Smarteole notebook" +sequence = [ + { shell = "jupyter nbconvert --execute --to notebook --inplace examples/smarteole_example.ipynb" }, +] + [tool.poe.tasks.all] help = "Run all required pre-push commands" sequence = [{ ref = "lint" }, { ref = "test" }]