From 244d2cf987cce4220510166b94811997036695b7 Mon Sep 17 00:00:00 2001 From: Samuel Northover-Naylor Date: Mon, 18 Nov 2024 14:45:44 +0000 Subject: [PATCH] corrections --- .github/workflows/lint-and-test.yaml | 4 ---- .github/workflows/smarteole_example.yaml | 9 ++++++--- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index ed31b1f..66b8186 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -4,13 +4,9 @@ on: push: branches: - main - paths-ignore: - - 'examples/smarteole_example.ipynb' pull_request: branches: - main - paths-ignore: - - 'examples/smarteole_example.ipynb' workflow_dispatch: diff --git a/.github/workflows/smarteole_example.yaml b/.github/workflows/smarteole_example.yaml index e1b1113..4e9294b 100644 --- a/.github/workflows/smarteole_example.yaml +++ b/.github/workflows/smarteole_example.yaml @@ -4,8 +4,6 @@ on: push: branches: - main - paths-ignore: - - 'examples/smarteole_example.ipynb' pull_request: workflow_dispatch: @@ -15,6 +13,7 @@ permissions: env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + NOTEBOOK_UPDATE_COMMIT_MESSAGE: "Update smarteole example notebook" jobs: lint-and-test: @@ -53,12 +52,16 @@ jobs: run: | source .venv/bin/activate pip install -U .[all] + - name: 'revert temporary changes that were made on pyproject.toml' + run: | + sed -i 's!\["wind_up\*", "examples"\]!\["wind_up\*"\]!' pyproject.toml - name: 'lint check & test' run: | source .venv/bin/activate poe lint-check poe test - name: 'execute smarteole example notebook and push changes' + if: ${{ github.event.head_commit.message }} != ${{ env.BRANCH_NAME }} run: | source .venv/bin/activate poe smarteole-nb @@ -66,6 +69,6 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" if git status | grep -q modified; then - git commit -m "Update smarteole example notebook" + git commit -m ${{ env.BRANCH_NAME }} git push fi diff --git a/pyproject.toml b/pyproject.toml index 7fdd6cc..295e84e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ all = ["res-wind-up[dev,examples]"] [tool.setuptools.packages.find] where = ["."] -include = ["wind_up*", "examples"] +include = ["wind_up*"] [tool.ruff] line-length = 120