From ee529c31ab3bcddf2535904c957dcdac0b4a3419 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:30:08 -0700 Subject: [PATCH 01/13] Refactor pointless global doctoring to muzzle linter PYL-W0105 (- Fixes #54 -) --- pythonrepo/pythonrepo.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pythonrepo/pythonrepo.py b/pythonrepo/pythonrepo.py index 313efde..4424085 100644 --- a/pythonrepo/pythonrepo.py +++ b/pythonrepo/pythonrepo.py @@ -36,7 +36,6 @@ from . import __version__ -"""The version of this program.""" __prog__ = str(__module__) From 5884c168959de934977c1eec0f27bb36454bce50 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:38:17 -0700 Subject: [PATCH 02/13] Resolves PYL-W0107 (- Fixes #55 -) --- tests/profiling.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/profiling.py b/tests/profiling.py index 7b850c2..7b2a616 100644 --- a/tests/profiling.py +++ b/tests/profiling.py @@ -134,7 +134,6 @@ def __enter__(self): def __exit__(self, type, value, traceback): # skipcq: PLY-W0622 self.checkpoint(str("finished")) - pass def do_time_profile(func, timer_name="time_profile"): From ef508d452447879c63364ae4025841a27009b83f Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:44:41 -0700 Subject: [PATCH 03/13] Fix Anti-pattern PYL-R0123 (- Fixes #53 -) --- tests/test_usage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_usage.py b/tests/test_usage.py index 8750ef1..a6106cc 100644 --- a/tests/test_usage.py +++ b/tests/test_usage.py @@ -3,7 +3,7 @@ # Python Repo Template # .................................. -# Copyright (c) 2017-2019, Kendrick Walls +# Copyright (c) 2017-2024, Kendrick Walls # .................................. # Licensed under MIT (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ def buildPythonCommand(args=None): # you need to change this to the name of your project __project__ = str("pythonrepo") try: - if args is None or args is [None]: + if args is None or (args == [None]): theArgs = ["exit 1 ; #"] else: theArgs = args From 082f6245ebb43af426e0278211843b85ee00cc96 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 22:07:52 -0700 Subject: [PATCH 04/13] Resolve conflicting style-linting (- WIP #56 -) --- tests/test_usage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_usage.py b/tests/test_usage.py index 8750ef1..9a45ddb 100644 --- a/tests/test_usage.py +++ b/tests/test_usage.py @@ -166,7 +166,7 @@ class BasicUsageTestSuite(unittest.TestCase): def test_absolute_truth_and_meaning(self): """Insanity Test. if ( is true ) usage.""" - self.assertTrue(True) + self.assertTrue(True) # skipcq: PYL-W1503 def test_syntax(self): """Test case importing code. if ( import is not None ) usage.""" From c7c8a17a8eb5212bdcd3f3314637f9e39ae992e6 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 22:17:09 -0700 Subject: [PATCH 05/13] Resolves PYL-W1503 (- Fixes #56 -) --- tests/test_basic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index f76f54f..5a96de8 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -27,11 +27,12 @@ class BasicTestSuite(unittest.TestCase): def test_absolute_truth_and_meaning(self): """Insanitty Test. Because it only matters if we're not mad as hatters.""" assert True + self.assertTrue(True) # skipcq: PYL-W1503 def test_meta_test(self): """Insanity Test for unittests assertion.""" - self.assertTrue(True) - self.assertFalse(False) + self.assertTrue(True) # skipcq: PYL-W1503 + self.assertFalse(False) # skipcq: PYL-W1503 self.assertIsNone(None) def test_syntax(self): From 3ebab3c4708764ef892df3c241d55c8468524bc0 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:30:08 -0700 Subject: [PATCH 06/13] Refactor pointless global doctoring to muzzle linter PYL-W0105 (- Fixes #54 -) --- pythonrepo/pythonrepo.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pythonrepo/pythonrepo.py b/pythonrepo/pythonrepo.py index 313efde..4424085 100644 --- a/pythonrepo/pythonrepo.py +++ b/pythonrepo/pythonrepo.py @@ -36,7 +36,6 @@ from . import __version__ -"""The version of this program.""" __prog__ = str(__module__) From fdcd9d93491f478362987635c5dd9ead21d2c260 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:38:17 -0700 Subject: [PATCH 07/13] Resolves PYL-W0107 (- Fixes #55 -) --- tests/profiling.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/profiling.py b/tests/profiling.py index 5341521..71ce87c 100644 --- a/tests/profiling.py +++ b/tests/profiling.py @@ -135,7 +135,6 @@ def __enter__(self): def __exit__(self, type, value, traceback): # skipcq: PYL-W0622 self.checkpoint(str("finished")) - pass def do_time_profile(func, timer_name="time_profile"): From ac959097cdd1aafb38137792c96241de62fdda6d Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 21:44:41 -0700 Subject: [PATCH 08/13] Fix Anti-pattern PYL-R0123 (- Fixes #53 -) --- tests/test_usage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_usage.py b/tests/test_usage.py index 8750ef1..a6106cc 100644 --- a/tests/test_usage.py +++ b/tests/test_usage.py @@ -3,7 +3,7 @@ # Python Repo Template # .................................. -# Copyright (c) 2017-2019, Kendrick Walls +# Copyright (c) 2017-2024, Kendrick Walls # .................................. # Licensed under MIT (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ def buildPythonCommand(args=None): # you need to change this to the name of your project __project__ = str("pythonrepo") try: - if args is None or args is [None]: + if args is None or (args == [None]): theArgs = ["exit 1 ; #"] else: theArgs = args From d6be075e9a0aa0ac1bbb20fecb5885df52c92e25 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 22:07:52 -0700 Subject: [PATCH 09/13] Resolve conflicting style-linting (- WIP #56 -) --- tests/test_usage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_usage.py b/tests/test_usage.py index a6106cc..b75d253 100644 --- a/tests/test_usage.py +++ b/tests/test_usage.py @@ -166,7 +166,7 @@ class BasicUsageTestSuite(unittest.TestCase): def test_absolute_truth_and_meaning(self): """Insanity Test. if ( is true ) usage.""" - self.assertTrue(True) + self.assertTrue(True) # skipcq: PYL-W1503 def test_syntax(self): """Test case importing code. if ( import is not None ) usage.""" From 07ab5674afa73c20133f90483f738233cdb57688 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Sun, 14 Jul 2024 22:17:09 -0700 Subject: [PATCH 10/13] Resolves PYL-W1503 (- Fixes #56 -) --- tests/test_basic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index f76f54f..5a96de8 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -27,11 +27,12 @@ class BasicTestSuite(unittest.TestCase): def test_absolute_truth_and_meaning(self): """Insanitty Test. Because it only matters if we're not mad as hatters.""" assert True + self.assertTrue(True) # skipcq: PYL-W1503 def test_meta_test(self): """Insanity Test for unittests assertion.""" - self.assertTrue(True) - self.assertFalse(False) + self.assertTrue(True) # skipcq: PYL-W1503 + self.assertFalse(False) # skipcq: PYL-W1503 self.assertIsNone(None) def test_syntax(self): From b34116b70b263c75b9bb829a8a038cfa7eaf338d Mon Sep 17 00:00:00 2001 From: reactive-firewall Date: Mon, 19 Aug 2024 14:24:33 -0700 Subject: [PATCH 11/13] Minor fixup to ignore PTC-W0020 to maintain clearity in source. --- pythonrepo/__init__.py | 1 + pythonrepo/pythonrepo.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pythonrepo/__init__.py b/pythonrepo/__init__.py index 2e52aac..30f5295 100644 --- a/pythonrepo/__init__.py +++ b/pythonrepo/__init__.py @@ -1,3 +1,4 @@ +#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Python Repo Template diff --git a/pythonrepo/pythonrepo.py b/pythonrepo/pythonrepo.py index 4424085..12a94cc 100644 --- a/pythonrepo/pythonrepo.py +++ b/pythonrepo/pythonrepo.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Python Repo Template @@ -65,7 +65,7 @@ def NoOp(*args, **kwargs): # More boiler-plate-code -TASK_OPTIONS = dict({ +TASK_OPTIONS = dict({ # skipcq: PTC-W0020 'noop': NoOp }) """The callable function tasks of this program.""" From 56874d1832a531b98f09630e3e6c4fb47b47a1c5 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Mon, 19 Aug 2024 14:56:27 -0700 Subject: [PATCH 12/13] Fixup for CI to use latest archive upload and codecov actions. --- .github/workflows/Tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index de61e29..09b1713 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -225,7 +225,7 @@ jobs: if: ${{ runner.python-version }} != "3.9" run: make -f Makefile test-pytest ; - name: Upload Python ${{ matrix.python-version }} coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml @@ -235,7 +235,7 @@ jobs: verbose: true fail_ci_if_error: false - name: Upload Python ${{ matrix.python-version }} Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Test-Report-${{ matrix.os }}-${{ matrix.python-version }} path: ./test-reports/ @@ -309,7 +309,7 @@ jobs: if: ${{ runner.python-version }} != "3.9" run: make -f Makefile test-pytest ; - name: Upload Python ${{ matrix.python-version }} coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml @@ -319,7 +319,7 @@ jobs: verbose: true fail_ci_if_error: false - name: Upload Python ${{ matrix.python-version }} Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Test-Report-${{ matrix.os }}-${{ matrix.python-version }} path: ./test-reports/ @@ -430,7 +430,7 @@ jobs: cp -vf ./coverage.xml ./test-reports/coverage.xml || true ; shell: bash - name: Upload Python ${{ matrix.python-version }} coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./test-reports/coverage_supplement.xml @@ -440,7 +440,7 @@ jobs: verbose: true fail_ci_if_error: false - name: Upload Extra Python ${{ matrix.python-version }} Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Integration-Test-Report-${{ matrix.os }}-${{ matrix.python-version }} path: ./test-reports/ From ded92be14accefd105ce3bc15986138fe0c0cbe0 Mon Sep 17 00:00:00 2001 From: "Mr. Walls" Date: Mon, 19 Aug 2024 15:05:38 -0700 Subject: [PATCH 13/13] Fixup for CI regarding duplicate python3.11 test results. (- Fixes #38 -) --- .github/workflows/Tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 09b1713..3306833 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -319,6 +319,7 @@ jobs: verbose: true fail_ci_if_error: false - name: Upload Python ${{ matrix.python-version }} Artifact + if: ${{ runner.python-version }} != "3.11" uses: actions/upload-artifact@v4 with: name: Test-Report-${{ matrix.os }}-${{ matrix.python-version }}