Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/uml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,52 @@ 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: Install pylint explicitly
run: python -m pip install pylint

- name: Verify pylint and pyreverse
run: |
python -m pip show pylint
which pyreverse
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: |
sudo apt-get update && sudo apt-get install -y graphviz
make uml

- 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
else
echo "changes_exist=true" >> $GITHUB_OUTPUT
fi

- name: Create PR for changes
if: steps.changes.outputs.changes_exist == 'true'
run: |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ docs = [
"linkify-it-py",
"myst-nb<=1.0.0",
"pathlib",
"pylint",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx_autodoc_defaultargs",
Expand Down