From 5620fa19c04511ce7bcfa1c4be4e0a488315ba96 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Thu, 10 Oct 2024 14:17:06 +0530 Subject: [PATCH 1/5] ci: use PyAnsys doc formattor and code-style checker. --- .github/workflows/ci.yml | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dc742df2dd..e6f58927e4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,29 +45,17 @@ jobs: name: Documentation Style Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 + - name: "Run PyAnsys documentation style checks" + uses: ansys/actions/doc-style@v8 with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install pre-commit - run: python -m pip install pre-commit - - - name: Run pre-commit for docformatter - run: pre-commit run --hook-stage manual --all-files --show-diff-on-failure docformatter + token: ${{ secrets.GITHUB_TOKEN }} - - name: Running Vale - uses: errata-ai/vale-action@reviewdog - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - with: - files: doc - reporter: github-pr-check - level: error - filter_mode: nofilter - fail_on_error: true + code-style: + name: Code style + runs-on: ubuntu-latest + steps: + - name: "Run PyAnsys code style checks" + uses: ansys/actions/code-style@v8 commit-style: name: "Run commit style checks" From ce10ce932da9b7f8d9e4086f77a00872e3113fde Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Thu, 10 Oct 2024 14:28:48 +0530 Subject: [PATCH 2/5] Update vale. --- .vale.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/.vale.ini b/.vale.ini index 0fa4461b4e4..90e738069dc 100644 --- a/.vale.ini +++ b/.vale.ini @@ -26,6 +26,7 @@ Vocab = ANSYS # Apply the following styles BasedOnStyles = Vale, Google +Vale.Terms = NO # Removing Google-specific rule - Not applicable under some circumstances Google.WordList = NO From f733350a450bbffa8f2aa18b53bf808e00279396 Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee Date: Thu, 10 Oct 2024 14:37:59 +0530 Subject: [PATCH 3/5] Updates. --- .github/workflows/ci.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f58927e4a..944bbd1ea9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,10 +45,29 @@ jobs: name: Documentation Style Check runs-on: ubuntu-latest steps: - - name: "Run PyAnsys documentation style checks" - uses: ansys/actions/doc-style@v8 + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: - token: ${{ secrets.GITHUB_TOKEN }} + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install pre-commit + run: python -m pip install 'pre-commit==3.8.0' + + - name: Run pre-commit for docformatter + run: pre-commit run --hook-stage manual --all-files --show-diff-on-failure docformatter + + - name: Running Vale + uses: errata-ai/vale-action@reviewdog + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + files: doc + reporter: github-pr-check + level: error + filter_mode: nofilter + fail_on_error: true code-style: name: Code style From ad6376bf715863a5f09068be8d525318919f003c Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee <109645853+prmukherj@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:42:51 +0530 Subject: [PATCH 4/5] Update .vale.ini --- .vale.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 90e738069dc..0fa4461b4e4 100644 --- a/.vale.ini +++ b/.vale.ini @@ -26,7 +26,6 @@ Vocab = ANSYS # Apply the following styles BasedOnStyles = Vale, Google -Vale.Terms = NO # Removing Google-specific rule - Not applicable under some circumstances Google.WordList = NO From 0822f63ea70a173e38c700928c26701610027bb2 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:34:52 +0200 Subject: [PATCH 5/5] feat: simplicfy action --- .github/workflows/ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 944bbd1ea9e..bfcaa3fd87d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,18 +46,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install pre-commit - run: python -m pip install 'pre-commit==3.8.0' - - - name: Run pre-commit for docformatter - run: pre-commit run --hook-stage manual --all-files --show-diff-on-failure docformatter - - name: Running Vale uses: errata-ai/vale-action@reviewdog env: