From 9da3cad205499cfd8a129d4821d39f6106695d60 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:12:09 +0530 Subject: T0000: Update helper.py --- src/tests/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/helper.py b/src/tests/helper.py index f417979..ea1ec74 100644 --- a/src/tests/helper.py +++ b/src/tests/helper.py @@ -28,3 +28,4 @@ def prepare_module(file_path='', module_name=''): print('True') print() if False: print('False') + if True: print('True Again') -- cgit v1.2.3 From e621128cfc2e7b70aa423e48bd4f6e09c10c516f Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:21:23 +0530 Subject: T0000: Update darker-lint.yml --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 08c4eac..bf596c5 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-python@v5 - uses: akaihola/darker@v2.1.1 with: - options: "--check --diff --isort --color" + options: "--check --diff --isort --color --revision current" src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" -- cgit v1.2.3 From c3833f7f5f68803b844e04caf04fd62bffff9c8a Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:26:21 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index bf596c5..92b26ce 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -16,7 +16,8 @@ jobs: - uses: actions/setup-python@v5 - uses: akaihola/darker@v2.1.1 with: - options: "--check --diff --isort --color --revision current" + options: "--check --diff --isort --color" src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" + revision: "current" -- cgit v1.2.3 From f8d440ddda6541faf6d9db9215e4eefd6cf3b62e Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:30:07 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 92b26ce..b2d5d9d 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,4 +20,4 @@ jobs: src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" - revision: "current" + revision: "current...HEAD" -- cgit v1.2.3 From a61c0e9c31b8b6513b7a2d932063957af74e4509 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:47:00 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index b2d5d9d..4e26d45 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -14,10 +14,28 @@ jobs: with: fetch-depth: 0 - uses: actions/setup-python@v5 + + - name: Get head commit ID + id: get-head-commit + run: | + HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") + echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" + + - name: Get base commit ID + id: get-base-commit + run: | + BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") + echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" + + - name: Use commit IDs + run: | + echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" + echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" + - uses: akaihola/darker@v2.1.1 with: options: "--check --diff --isort --color" src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" - revision: "current...HEAD" + revision: "${{ steps.get-base-commit.outputs.base_commit }}...${{ steps.get-head-commit.outputs.head_commit }}" -- cgit v1.2.3 From 0b4bc6cd6c5b4d218a0f12ded584cb372ea46468 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:13:13 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 4e26d45..16f57bd 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -38,4 +38,4 @@ jobs: src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" - revision: "${{ steps.get-base-commit.outputs.base_commit }}...${{ steps.get-head-commit.outputs.head_commit }}" + revision: "current..." -- cgit v1.2.3 From d375e1b87ded38cabce46bdcefb87612c667c30a Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:30:06 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 48 +++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 16f57bd..9a0e6d0 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -15,27 +15,35 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 - - name: Get head commit ID - id: get-head-commit + - name: darker install run: | - HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") - echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" - - - name: Get base commit ID - id: get-base-commit + pip install --upgrade darker~=2.1.1 + + - name: analyze run: | - BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") - echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" + darker --revision current . - - name: Use commit IDs - run: | - echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" - echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" + # - name: Get head commit ID + # id: get-head-commit + # run: | + # HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") + # echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" - - uses: akaihola/darker@v2.1.1 - with: - options: "--check --diff --isort --color" - src: "." - version: "~=2.1.1" - lint: "flake8,pylint==2.13.1" - revision: "current..." + # - name: Get base commit ID + # id: get-base-commit + # run: | + # BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") + # echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" + + # - name: Use commit IDs + # run: | + # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" + # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" + + # - uses: akaihola/darker@v2.1.1 + # with: + # options: "--check --diff --isort --color" + # src: "." + # version: "~=2.1.1" + # lint: "flake8,pylint==2.13.1" + # revision: "current..." -- cgit v1.2.3 From e53a149d73f5dbd5643601f1a605bb9589650fb9 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:37:22 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 9a0e6d0..0cf72f2 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -18,10 +18,10 @@ jobs: - name: darker install run: | pip install --upgrade darker~=2.1.1 - + - name: analyze run: | - darker --revision current . + darker -r :PRE-COMMIT: . # - name: Get head commit ID # id: get-head-commit -- cgit v1.2.3 From aa94c8c6a2678aaf59f7ef3b9277ab7aff2bb4b2 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:54:27 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 0cf72f2..4183b93 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - uses: actions/setup-python@v5 - name: darker install @@ -21,7 +22,7 @@ jobs: - name: analyze run: | - darker -r :PRE-COMMIT: . + darker -r current . # - name: Get head commit ID # id: get-head-commit -- cgit v1.2.3 From 504fc8b634637b8a13e99a892a2566c2448d647f Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:20:33 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 4183b93..23841dd 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,9 +20,17 @@ jobs: run: | pip install --upgrade darker~=2.1.1 - - name: analyze + - name: Fetch current branch run: | - darker -r current . + git fetch origin current:current + + - name: Analyze Code with Darker + run: | + darker -r current HEAD . + + # - name: analyze + # run: | + # darker -r current . # - name: Get head commit ID # id: get-head-commit -- cgit v1.2.3 From 7529bff47a77071981c72810abb956e41da6a2d3 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:22:28 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 23841dd..de9ab45 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -26,7 +26,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current HEAD . + darker -r "current" "feature/test-darker" . # - name: analyze # run: | -- cgit v1.2.3 From ca6dfb96ef60edd324b4ce1b0f12da92ee0b6fba Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:27:56 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index de9ab45..ae766ad 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -14,6 +14,7 @@ jobs: with: fetch-depth: 0 fetch-tags: true + ref: feature/test-darker - uses: actions/setup-python@v5 - name: darker install @@ -26,7 +27,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r "current" "feature/test-darker" . + darker -r current...HEAD # - name: analyze # run: | -- cgit v1.2.3 From 9c83bc65255ca33a6c5cc9d35d8aab57661cd440 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:29:01 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index ae766ad..bf4ff09 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -27,7 +27,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD + darker -r current...HEAD . # - name: analyze # run: | -- cgit v1.2.3 From 10f90ac9ac9d0b4b340a530fe719aa548e60d955 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:30:29 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index bf4ff09..9bda80f 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -27,7 +27,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD . + darker -r current...HEAD --diff . # - name: analyze # run: | -- cgit v1.2.3 From 2c5a358ac9ce5b2da72e4ff3db53e9368a0b1ad1 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:38:12 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 9bda80f..02296f1 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -27,7 +27,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --diff . + darker -r current...HEAD --diff --check . # - name: analyze # run: | -- cgit v1.2.3 From c301867340b6fa0bd78ff1e0aebecd1ed88a8383 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:40:16 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 02296f1..63ddad8 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -27,7 +27,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --diff --check . + darker -r current...HEAD --diff --check --lint . # - name: analyze # run: | -- cgit v1.2.3 From 8783f3434551f0f26cff28fbb0eaf1d2c9618357 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:44:10 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 63ddad8..ddab35a 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -17,17 +17,17 @@ jobs: ref: feature/test-darker - uses: actions/setup-python@v5 - - name: darker install - run: | - pip install --upgrade darker~=2.1.1 + # - name: darker install + # run: | + # pip install --upgrade darker~=2.1.1 - name: Fetch current branch run: | git fetch origin current:current - - name: Analyze Code with Darker - run: | - darker -r current...HEAD --diff --check --lint . + # - name: Analyze Code with Darker + # run: | + # darker -r current...HEAD --diff --check . # - name: analyze # run: | @@ -50,10 +50,10 @@ jobs: # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" - # - uses: akaihola/darker@v2.1.1 - # with: - # options: "--check --diff --isort --color" - # src: "." - # version: "~=2.1.1" - # lint: "flake8,pylint==2.13.1" - # revision: "current..." + - uses: akaihola/darker@v2.1.1 + with: + options: "--check --diff --isort --color" + src: "." + version: "~=2.1.1" + lint: "flake8,pylint==2.13.1" + revision: "current...HEAD" -- cgit v1.2.3 From 18ccc20d7c88a26abe74223317a9721be5ea0e9b Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:45:45 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index ddab35a..984e282 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -52,8 +52,7 @@ jobs: - uses: akaihola/darker@v2.1.1 with: - options: "--check --diff --isort --color" + options: "--revsion current...HEAD --check --diff --isort --color" src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" - revision: "current...HEAD" -- cgit v1.2.3 From 402a93047a7a8436c6bef0a274e42e532d4e255d Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:46:40 +0530 Subject: T0000: testts --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 984e282..ba355fb 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -52,7 +52,7 @@ jobs: - uses: akaihola/darker@v2.1.1 with: - options: "--revsion current...HEAD --check --diff --isort --color" + options: "--revision current...HEAD --check --diff --isort --color" src: "." version: "~=2.1.1" lint: "flake8,pylint==2.13.1" -- cgit v1.2.3 From 693d381b699f6dd1241bc60427fa9524445efc11 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:48:24 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index ba355fb..6933b38 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -25,9 +25,9 @@ jobs: run: | git fetch origin current:current - # - name: Analyze Code with Darker - # run: | - # darker -r current...HEAD --diff --check . + - name: Analyze Code with Darker + run: | + darker -r current...HEAD --diff --check --diff --isort --color -c . # - name: analyze # run: | -- cgit v1.2.3 From 0aa305971f11c3277b192e86e2c887fa235d1081 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:49:17 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 6933b38..4bc285f 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -17,9 +17,9 @@ jobs: ref: feature/test-darker - uses: actions/setup-python@v5 - # - name: darker install - # run: | - # pip install --upgrade darker~=2.1.1 + - name: darker install + run: | + pip install --upgrade darker~=2.1.1 - name: Fetch current branch run: | -- cgit v1.2.3 From a791f4578d350b8817c6f358d13ff75d47b78d03 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:53:06 +0530 Subject: T0000: test --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ef013c2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.darker] +src = ["."] +line-length = 88 +skip-string-normalization = true \ No newline at end of file -- cgit v1.2.3 From f79f41489f61163065666546de504f2aac0556d9 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:55:32 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 4bc285f..beeb7aa 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,6 +20,7 @@ jobs: - name: darker install run: | pip install --upgrade darker~=2.1.1 + pip install darker[isort] - name: Fetch current branch run: | -- cgit v1.2.3 From 248c5cf87b99f900b60cda16e851d886eb7b5602 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:58:02 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index beeb7aa..4f68c8b 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --diff --check --diff --isort --color -c . + darker -r current...HEAD --diff --check --diff --isort --color -c src/tests/*.py # - name: analyze # run: | -- cgit v1.2.3 From 2e54be33cef245da2d029a81270f91a030cba66c Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 18:06:56 +0530 Subject: T0000: tests --- .github/workflows/darker-lint.yml | 14 +++++++------- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 4f68c8b..9fdfbd5 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --diff --check --diff --isort --color -c src/tests/*.py + darker -r current...HEAD --check --diff --isort --color -c src/tests/*.py # - name: analyze # run: | @@ -51,9 +51,9 @@ jobs: # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" - - uses: akaihola/darker@v2.1.1 - with: - options: "--revision current...HEAD --check --diff --isort --color" - src: "." - version: "~=2.1.1" - lint: "flake8,pylint==2.13.1" + # - uses: akaihola/darker@v2.1.1 + # with: + # options: "--revision current...HEAD --check --diff --isort --color" + # src: "." + # version: "~=2.1.1" + # lint: "flake8,pylint==2.13.1" diff --git a/pyproject.toml b/pyproject.toml index ef013c2..5acb9be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ [tool.darker] src = ["."] line-length = 88 -skip-string-normalization = true \ No newline at end of file +skip-string-normalization = true -- cgit v1.2.3 From abc5f7806edbd8591529a3bdb90a6d8af1dcf283 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:22:39 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 3 ++- pyproject.toml | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 pyproject.toml diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 9fdfbd5..c339e55 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -28,7 +28,8 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --check --diff --isort --color -c src/tests/*.py + darker -r current...HEAD --check --diff --lint "pylint --errors-only" --color -c src/tests/*.py + # - name: analyze # run: | diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 5acb9be..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,4 +0,0 @@ -[tool.darker] -src = ["."] -line-length = 88 -skip-string-normalization = true -- cgit v1.2.3 From f7d41f36bd8ec930a7caed9813bc9465e2f14f04 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:24:33 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index c339e55..c69d0fa 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --check --diff --lint "pylint --errors-only" --color -c src/tests/*.py + darker -r current...HEAD --check --diff --lint "pylint --errors-only" --color . # - name: analyze -- cgit v1.2.3 From ed09677a6b1e0bf737cc502d3d061f7fb199a1e7 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:35:07 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index c69d0fa..250d355 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -13,8 +13,8 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - fetch-tags: true ref: feature/test-darker + - uses: actions/setup-python@v5 - name: darker install @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current...HEAD --check --diff --lint "pylint --errors-only" --color . + darker -r current... --check --diff --lint "pylint --errors-only" --color ./src # - name: analyze -- cgit v1.2.3 From c1d0fc01bef37853c4db4941bf5d62e21d44f3f4 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:38:55 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 250d355..53b8643 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,7 +20,7 @@ jobs: - name: darker install run: | pip install --upgrade darker~=2.1.1 - pip install darker[isort] + pip install black==22.12.0 isort==5.11.4 mypy==0.990 flake8==5.0.4 pylint==2.15.5 - name: Fetch current branch run: | @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current... --check --diff --lint "pylint --errors-only" --color ./src + darker -r current... --check --diff --lint "pylint --errors-only" --isort --color ./src # - name: analyze -- cgit v1.2.3 From 80365940d59a44d2de6afecbcc50c233ed59a648 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:43:29 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 53b8643..2670876 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current... --check --diff --lint "pylint --errors-only" --isort --color ./src + darker -r current... --check --diff --lint "flake8" --isort --color ./src # - name: analyze -- cgit v1.2.3 From d55f8d802195b306d6b7da8c3821c3dfd39c4885 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:58:36 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 2670876..5b222ff 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -19,8 +19,8 @@ jobs: - name: darker install run: | - pip install --upgrade darker~=2.1.1 - pip install black==22.12.0 isort==5.11.4 mypy==0.990 flake8==5.0.4 pylint==2.15.5 + pip install git+https://github.com/akaihola/darker.git@acb622567d1a26b0c6dcbb1b171c1c8340ee6c22 + pip install black==22.12.0 isort==5.11.4 mypy==0.990 flake8==5.0.4 pylint==2.15.5 ruff>=0.0.292 - name: Fetch current branch run: | @@ -28,7 +28,7 @@ jobs: - name: Analyze Code with Darker run: | - darker -r current... --check --diff --lint "flake8" --isort --color ./src + darker -r current... --check --diff --lint "ruff check" --isort --color ./src # - name: analyze -- cgit v1.2.3 From 312b0aa64966bea9837b3a82cba72eb5f2263826 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:03:21 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 5b222ff..75e5601 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,7 +20,7 @@ jobs: - name: darker install run: | pip install git+https://github.com/akaihola/darker.git@acb622567d1a26b0c6dcbb1b171c1c8340ee6c22 - pip install black==22.12.0 isort==5.11.4 mypy==0.990 flake8==5.0.4 pylint==2.15.5 ruff>=0.0.292 + pip install ruff>=0.0.292 - name: Fetch current branch run: | -- cgit v1.2.3 From 1ff3353db2150e42e2fda7c3b4bdb714fa6edd80 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:10:21 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 75e5601..c9caa04 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -19,7 +19,7 @@ jobs: - name: darker install run: | - pip install git+https://github.com/akaihola/darker.git@acb622567d1a26b0c6dcbb1b171c1c8340ee6c22 + pip install git+https://github.com/akaihola/darker.git@master pip install ruff>=0.0.292 - name: Fetch current branch -- cgit v1.2.3 From 35cb1b42d24d3336275e2c826085b1557580345f Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:21:26 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index c9caa04..12b8d48 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -20,7 +20,7 @@ jobs: - name: darker install run: | pip install git+https://github.com/akaihola/darker.git@master - pip install ruff>=0.0.292 + pip install isort==5.11.4 ruff>=0.0.292 - name: Fetch current branch run: | -- cgit v1.2.3 From 24bf524ad7bd1f4165a7a02b118cfc152e28a5ae Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 23:32:10 +0530 Subject: T0000: cleanup --- .github/workflows/darker-lint.yml | 40 +++++---------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 12b8d48..43ee5bf 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -1,5 +1,5 @@ --- -name: Darker Lint +name: Darker-Ruff Lint on: pull_request: @@ -13,48 +13,18 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: feature/test-darker + ref: ${{ github.event.pull_request.head.ref }} - uses: actions/setup-python@v5 - name: darker install run: | - pip install git+https://github.com/akaihola/darker.git@master - pip install isort==5.11.4 ruff>=0.0.292 + pip install git+https://github.com/akaihola/darker.git@master isort==5.11.4 ruff>=0.0.292 - - name: Fetch current branch + - name: Fetch base branch run: | - git fetch origin current:current + git fetch origin ref: ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} - name: Analyze Code with Darker run: | darker -r current... --check --diff --lint "ruff check" --isort --color ./src - - - # - name: analyze - # run: | - # darker -r current . - - # - name: Get head commit ID - # id: get-head-commit - # run: | - # HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") - # echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" - - # - name: Get base commit ID - # id: get-base-commit - # run: | - # BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") - # echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" - - # - name: Use commit IDs - # run: | - # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" - # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" - - # - uses: akaihola/darker@v2.1.1 - # with: - # options: "--revision current...HEAD --check --diff --isort --color" - # src: "." - # version: "~=2.1.1" - # lint: "flake8,pylint==2.13.1" -- cgit v1.2.3 From 36e79d360e74ff298c768482b058ea8986cd23a8 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 23:36:22 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 43ee5bf..c8a20c9 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -1,11 +1,14 @@ --- -name: Darker-Ruff Lint +name: Darker Lint on: pull_request: branches: - current +env: + base_ref: ${{ github.event.pull_request.base.ref }} + jobs: darker-lint: runs-on: ubuntu-latest @@ -23,8 +26,37 @@ jobs: - name: Fetch base branch run: | - git fetch origin ref: ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} + git fetch origin ${base_ref}:${base_ref} - name: Analyze Code with Darker run: | - darker -r current... --check --diff --lint "ruff check" --isort --color ./src + darker -r ${base_ref}... --check --diff --lint "ruff check" --isort --color ./src + + + # - name: analyze + # run: | + # darker -r current . + + # - name: Get head commit ID + # id: get-head-commit + # run: | + # HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") + # echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" + + # - name: Get base commit ID + # id: get-base-commit + # run: | + # BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") + # echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" + + # - name: Use commit IDs + # run: | + # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" + # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" + + # - uses: akaihola/darker@v2.1.1 + # with: + # options: "--revision current...HEAD --check --diff --isort --color" + # src: "." + # version: "~=2.1.1" + # lint: "flake8,pylint==2.13.1" -- cgit v1.2.3 From 4d212324792fc66d90103db0c635aae4743f3425 Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Mon, 26 Aug 2024 23:40:29 +0530 Subject: T0000: check --- .github/workflows/darker-lint.yml | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index c8a20c9..5db2e83 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -1,5 +1,5 @@ --- -name: Darker Lint +name: Darker-Ruff Lint on: pull_request: @@ -28,35 +28,6 @@ jobs: run: | git fetch origin ${base_ref}:${base_ref} - - name: Analyze Code with Darker + - name: Analyze Code run: | - darker -r ${base_ref}... --check --diff --lint "ruff check" --isort --color ./src - - - # - name: analyze - # run: | - # darker -r current . - - # - name: Get head commit ID - # id: get-head-commit - # run: | - # HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH") - # echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT" - - # - name: Get base commit ID - # id: get-base-commit - # run: | - # BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH") - # echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT" - - # - name: Use commit IDs - # run: | - # echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}" - # echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}" - - # - uses: akaihola/darker@v2.1.1 - # with: - # options: "--revision current...HEAD --check --diff --isort --color" - # src: "." - # version: "~=2.1.1" - # lint: "flake8,pylint==2.13.1" + darker -r ${base_ref}... --check --diff --lint "ruff check" --isort --color ./src \ No newline at end of file -- cgit v1.2.3 From aa23e5707382d6a5f352b215a16c53cfa645481b Mon Sep 17 00:00:00 2001 From: Vijayakumar A <36878324+kumvijaya@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:04:37 +0530 Subject: T0000: test --- .github/workflows/darker-lint.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml index 5db2e83..c4ca348 100644 --- a/.github/workflows/darker-lint.yml +++ b/.github/workflows/darker-lint.yml @@ -2,16 +2,23 @@ name: Darker-Ruff Lint on: - pull_request: + pull_request_target: branches: - current +permissions: + pull-requests: write + contents: read + env: base_ref: ${{ github.event.pull_request.base.ref }} jobs: darker-lint: runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read steps: - uses: actions/checkout@v4 with: -- cgit v1.2.3