From 6a543083d641a59ae97acdcc19f77ff3a427892a Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:25:02 -0700 Subject: [PATCH 1/7] add pylint github workflow --- .github/pylint.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/pylint.yml diff --git a/.github/pylint.yml b/.github/pylint.yml new file mode 100644 index 0000000..18dc811 --- /dev/null +++ b/.github/pylint.yml @@ -0,0 +1,50 @@ +name: Pylint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + + - name: Run pylint and check score threshold + run: | + echo "Running pylint..." + pylint_output=$(pylint $(git ls-files '*.py' | grep -v '^qt/') || true) + + echo "$pylint_output" + + score=$(echo "$pylint_output" | grep 'Your code has been rated at' | awk '{print $7}' | cut -d'/' -f1) + + echo "Pylint score: $score" + + threshold=7.0 + awk -v s="$score" -v t="$threshold" 'BEGIN { + if (s+0 < t+0) { + print "Pylint score below threshold" + exit 1 + } else { + print "Pylint score acceptable" + exit 0 + } + }' From b2151636f65176c6d25f1753b8295e8c82bf604b Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:29:13 -0700 Subject: [PATCH 2/7] add this branch to pylint workflow --- .github/pylint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pylint.yml b/.github/pylint.yml index 18dc811..c92e870 100644 --- a/.github/pylint.yml +++ b/.github/pylint.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - main + - 'mike/add-pylint' jobs: build: From ad34ff26907bb554938736396bab184a459ace5c Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:30:12 -0700 Subject: [PATCH 3/7] add this branch to pylint workflow --- .github/pylint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pylint.yml b/.github/pylint.yml index c92e870..677d120 100644 --- a/.github/pylint.yml +++ b/.github/pylint.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - 'mike/add-pylint' pull_request: branches: - main From afaf42a7c0bc41df53f8aba9451a90ae98892058 Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:31:35 -0700 Subject: [PATCH 4/7] add this branch to pylint workflow --- .github/{ => workflows}/pylint.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/pylint.yml (100%) diff --git a/.github/pylint.yml b/.github/workflows/pylint.yml similarity index 100% rename from .github/pylint.yml rename to .github/workflows/pylint.yml From 91ef2120e0b8bf0fa3d5d686f56fb94aa25417cc Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:32:56 -0700 Subject: [PATCH 5/7] remove this branch from pylint workflow after successful test --- .github/pylint.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/pylint.yml diff --git a/.github/pylint.yml b/.github/pylint.yml new file mode 100644 index 0000000..18dc811 --- /dev/null +++ b/.github/pylint.yml @@ -0,0 +1,50 @@ +name: Pylint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + + - name: Run pylint and check score threshold + run: | + echo "Running pylint..." + pylint_output=$(pylint $(git ls-files '*.py' | grep -v '^qt/') || true) + + echo "$pylint_output" + + score=$(echo "$pylint_output" | grep 'Your code has been rated at' | awk '{print $7}' | cut -d'/' -f1) + + echo "Pylint score: $score" + + threshold=7.0 + awk -v s="$score" -v t="$threshold" 'BEGIN { + if (s+0 < t+0) { + print "Pylint score below threshold" + exit 1 + } else { + print "Pylint score acceptable" + exit 0 + } + }' From e6f3176239556af35ad1ac3867e84bb59e4de86c Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:34:18 -0700 Subject: [PATCH 6/7] remove redundant pylint file --- .github/pylint.yml | 50 ---------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 .github/pylint.yml diff --git a/.github/pylint.yml b/.github/pylint.yml deleted file mode 100644 index 18dc811..0000000 --- a/.github/pylint.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Pylint - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9", "3.10", "3.11"] - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - - name: Run pylint and check score threshold - run: | - echo "Running pylint..." - pylint_output=$(pylint $(git ls-files '*.py' | grep -v '^qt/') || true) - - echo "$pylint_output" - - score=$(echo "$pylint_output" | grep 'Your code has been rated at' | awk '{print $7}' | cut -d'/' -f1) - - echo "Pylint score: $score" - - threshold=7.0 - awk -v s="$score" -v t="$threshold" 'BEGIN { - if (s+0 < t+0) { - print "Pylint score below threshold" - exit 1 - } else { - print "Pylint score acceptable" - exit 0 - } - }' From fbadf1e5c4b6158cc49260cecddc3e59acb99c29 Mon Sep 17 00:00:00 2001 From: Michael Langmayr Date: Thu, 18 Sep 2025 09:34:38 -0700 Subject: [PATCH 7/7] remove this branch from pylint workflow after successful test --- .github/workflows/pylint.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 677d120..18dc811 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -4,11 +4,9 @@ on: push: branches: - main - - 'mike/add-pylint' pull_request: branches: - main - - 'mike/add-pylint' jobs: build: