From 63631cac1ffcf47a794480fa70fc5180ef81a636 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 28 Mar 2025 09:38:04 +0000 Subject: [PATCH 1/7] fixes for uml workflow --- Makefile | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 352f8a09..9410b607 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,5 @@ test: pytest uml: + pip install .[docs] pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests diff --git a/pyproject.toml b/pyproject.toml index 5b3013bf..43134f38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ docs = [ "linkify-it-py", "myst-nb<=1.0.0", "pathlib", + "pylint", "sphinx", "sphinx-autodoc-typehints", "sphinx_autodoc_defaultargs", From 8d9e18f4cf99d2990c6b549348983640398fca48 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 09:20:44 +0100 Subject: [PATCH 2/7] fix path of images in "Detect UML changes" job --- .github/workflows/uml.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uml.yml b/.github/workflows/uml.yml index a8afc78f..b2a83768 100644 --- a/.github/workflows/uml.yml +++ b/.github/workflows/uml.yml @@ -29,7 +29,7 @@ jobs: - name: Detect UML changes id: changes run: | - git add docs/source/uml/*.png + git add docs/source/_static/*.png if git diff --staged --exit-code; then echo "No changes to commit" echo "changes_exist=false" >> $GITHUB_OUTPUT From f09f61708d49e00cff0225d93c57e45fcaca3827 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 09:22:48 +0100 Subject: [PATCH 3/7] change makefile to just install pylint directly for the uml task --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9410b607..60339dab 100644 --- a/Makefile +++ b/Makefile @@ -19,5 +19,5 @@ test: pytest uml: - pip install .[docs] + pip install pylint pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests From 004af5f9955ec3bdc938ec31d6466150a819f524 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 09:51:14 +0100 Subject: [PATCH 4/7] experiment to make install of pylint better --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 60339dab..e25e0bc0 100644 --- a/Makefile +++ b/Makefile @@ -19,5 +19,6 @@ test: pytest uml: - pip install pylint + conda install pylint + pip install 'causalpy[docs]' pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests From 4323d34ee9d2b7db340bc945487b7216ca4ce432 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 10:01:44 +0100 Subject: [PATCH 5/7] trying another solution --- .github/workflows/uml.yml | 12 +++++++++++- Makefile | 2 -- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/uml.yml b/.github/workflows/uml.yml index b2a83768..a4c8494b 100644 --- a/.github/workflows/uml.yml +++ b/.github/workflows/uml.yml @@ -9,23 +9,32 @@ jobs: runs-on: ubuntu-latest permissions: write-all steps: + - name: Checkout repository uses: actions/checkout@v4 with: ref: main + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install 'causalpy[docs]' + sudo apt-get update && sudo apt-get install -y graphviz + - name: Configure Git Identity run: | git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: Update the UML Diagrams run: | - sudo apt-get update && sudo apt-get install -y graphviz make uml + - name: Detect UML changes id: changes run: | @@ -36,6 +45,7 @@ jobs: else echo "changes_exist=true" >> $GITHUB_OUTPUT fi + - name: Create PR for changes if: steps.changes.outputs.changes_exist == 'true' run: | diff --git a/Makefile b/Makefile index e25e0bc0..352f8a09 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,4 @@ test: pytest uml: - conda install pylint - pip install 'causalpy[docs]' pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests From 3a4ea04b825c6cf181c197da4fcb2e13a87a102f Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 10:08:44 +0100 Subject: [PATCH 6/7] add install debugging step --- .github/workflows/uml.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/uml.yml b/.github/workflows/uml.yml index a4c8494b..389fc711 100644 --- a/.github/workflows/uml.yml +++ b/.github/workflows/uml.yml @@ -31,6 +31,12 @@ jobs: git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: Debug pyreverse installation + run: | + python -m pip show pylint + which pyreverse + pyreverse --version || echo "pyreverse not found" + - name: Update the UML Diagrams run: | make uml From 437c99fbedd0a05dd45f9db50d6b6a8d187bdf78 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Fri, 4 Apr 2025 10:16:56 +0100 Subject: [PATCH 7/7] try explicit installation of pyreverse --- .github/workflows/uml.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/uml.yml b/.github/workflows/uml.yml index 389fc711..57ee4d04 100644 --- a/.github/workflows/uml.yml +++ b/.github/workflows/uml.yml @@ -26,16 +26,19 @@ jobs: pip install 'causalpy[docs]' sudo apt-get update && sudo apt-get install -y graphviz - - name: Configure Git Identity - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: Install pylint explicitly + run: python -m pip install pylint - - name: Debug pyreverse installation + - name: Verify pylint and pyreverse run: | python -m pip show pylint which pyreverse - pyreverse --version || echo "pyreverse not found" + pyreverse --version + + - name: Configure Git Identity + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' - name: Update the UML Diagrams run: |