From 429faf969293f6833200e808a2072ddf4c4b8d40 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Tue, 10 Sep 2024 23:17:08 +0200 Subject: [PATCH 01/22] fix blocking calls on ssl_context --- pyvlx/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyvlx/connection.py b/pyvlx/connection.py index 743edb7a..f48df197 100644 --- a/pyvlx/connection.py +++ b/pyvlx/connection.py @@ -159,7 +159,7 @@ def write(self, frame: FrameBase) -> None: @staticmethod def create_ssl_context() -> ssl.SSLContext: """Create and return SSL Context.""" - ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH) + ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE return ssl_context From 2ecd1a09ef27bb967648037d5bb71513ab3a7c48 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 18:52:16 +0200 Subject: [PATCH 02/22] fix overflow issue --- test/frame_get_local_time_cfm_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/frame_get_local_time_cfm_test.py b/test/frame_get_local_time_cfm_test.py index b7f007d3..6fcee23d 100644 --- a/test/frame_get_local_time_cfm_test.py +++ b/test/frame_get_local_time_cfm_test.py @@ -25,7 +25,7 @@ def test_bytes(self) -> None: def test_frame_from_raw(self) -> None: """Test parse FrameGetLocalTimeConfirmation from raw.""" frame = frame_from_raw( - b"\x00\x12 \x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x007" + b"\x00\x12 \x05_\xc9,'\x13\x13\x12\x03\x0c\x00x\x04\x01R\xffg" ) self.assertTrue(isinstance(frame, FrameGetLocalTimeConfirmation)) From a6d1b93c5fd5338985f0c5626bad5d5cd9357e5a Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 18:57:01 +0200 Subject: [PATCH 03/22] Fix upload-artifacts --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d5c474f..245b1f88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Isort run: isort --check-only test examples pyvlx - name: Upload coverage artifact - uses: actions/upload-artifact@v2.2.2 + uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }} path: .coverage From 27c4d180154b4a39054f05b562c08372864434cf Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 18:59:57 +0200 Subject: [PATCH 04/22] fix deprecation issue download-artifact --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 245b1f88..3b5c9d20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: run: | pip install -r requirements/testing.txt - name: Download all coverage artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 - name: Create coverage report run: | coverage combine coverage*/.coverage* From 437aac0ad9cad7ff51cc4a4ec901dd2155d9dde8 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 19:42:22 +0200 Subject: [PATCH 05/22] coverage update --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b5c9d20..9e219d2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,6 +98,11 @@ jobs: pip install -r requirements/testing.txt - name: Download all coverage artifacts uses: actions/download-artifact@v4 + with: + path: .coverage + pattern: coverage* + merge-multiple: true + - run: ls -R .my-artifact - name: Create coverage report run: | coverage combine coverage*/.coverage* From 24682fe5d142668defaa7fc78cc19babd5b5c480 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 19:44:11 +0200 Subject: [PATCH 06/22] fix coverage --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e219d2a..f5f78a0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: path: .coverage pattern: coverage* merge-multiple: true - - run: ls -R .my-artifact + - run: ls -R .coverage - name: Create coverage report run: | coverage combine coverage*/.coverage* From c5fc6a687c29f4a7693f0c753cd3a1b3a35ee951 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 19:59:42 +0200 Subject: [PATCH 07/22] remove pattern --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5f78a0a..f4509764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,6 @@ jobs: uses: actions/download-artifact@v4 with: path: .coverage - pattern: coverage* merge-multiple: true - run: ls -R .coverage - name: Create coverage report From a02193a73fda403ecbc2436aeda13065f653d7d5 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 20:14:12 +0200 Subject: [PATCH 08/22] change action version --- .github/workflows/ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4509764..a516ded1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,13 @@ jobs: matrix: python-version: ["3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Cache pip packages - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-pypi-modules with: @@ -31,7 +31,7 @@ jobs: restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- - name: Cache pre-commit packages - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-pre-commit with: @@ -68,13 +68,13 @@ jobs: matrix: python-version: ["3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Cache pip packages - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-pypi-modules with: @@ -84,7 +84,7 @@ jobs: restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- - name: Cache pre-commit packages - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-pre-commit with: @@ -98,10 +98,7 @@ jobs: pip install -r requirements/testing.txt - name: Download all coverage artifacts uses: actions/download-artifact@v4 - with: - path: .coverage - merge-multiple: true - - run: ls -R .coverage + - run: ls -R - name: Create coverage report run: | coverage combine coverage*/.coverage* From 038e07f96cbdc3c18feda72d0144f796f3ad955d Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 20:16:20 +0200 Subject: [PATCH 09/22] update ci.ym --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a516ded1..7f902615 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,6 @@ jobs: pip install -r requirements/testing.txt - name: Download all coverage artifacts uses: actions/download-artifact@v4 - - run: ls -R - name: Create coverage report run: | coverage combine coverage*/.coverage* From 70d8dc60a8a4c4dcedf9cd71df67433af5c2b9a2 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 20:27:08 +0200 Subject: [PATCH 10/22] update codecov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f902615..e945a23c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,6 @@ jobs: coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 1e17c3f8a1dedb5d4acc2a707b0d58474a988511 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:03:20 +0200 Subject: [PATCH 11/22] update coverage path --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e945a23c..0bc04313 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,14 +51,14 @@ jobs: - name: Mypy run: mypy --install-types --non-interactive pyvlx - name: Tests - run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml + run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml:coverage-${{ matrix.python-version }}.xml - name: Isort run: isort --check-only test examples pyvlx - name: Upload coverage artifact uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }} - path: .coverage + path: coverage.xml coverage: name: Process test coverage @@ -70,7 +70,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache pip packages From 41d9653c194018de545c050a50866a3dc6d1acc5 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:05:40 +0200 Subject: [PATCH 12/22] fix ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bc04313..7dd1d78d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: - name: Mypy run: mypy --install-types --non-interactive pyvlx - name: Tests - run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml:coverage-${{ matrix.python-version }}.xml + run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml - name: Isort run: isort --check-only test examples pyvlx - name: Upload coverage artifact From f587b4f3df6f4d127a621b29339e1030bc2e172e Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:12:13 +0200 Subject: [PATCH 13/22] coverage destination path --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dd1d78d..f70a9552 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,6 +98,8 @@ jobs: pip install -r requirements/testing.txt - name: Download all coverage artifacts uses: actions/download-artifact@v4 + with: + path: .coverage - name: Create coverage report run: | coverage combine coverage*/.coverage* From 329dd52bcf47c45b488e82889baf0ed6c0eb7c50 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:23:40 +0200 Subject: [PATCH 14/22] Update combine directory --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f70a9552..7725d07e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine coverage*/.coverage* + coverage combine /.coverage coverage report --fail-under=79 coverage xml From 96d4f185f6f0cb2083281c33b7586caf5f70481f Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:24:41 +0200 Subject: [PATCH 15/22] directory fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7725d07e..69a4e85d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine /.coverage + coverage combine .coverage/ coverage report --fail-under=79 coverage xml From 6ab2d52e69c42d7d904ec3407bf75170c8331988 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 21:48:22 +0200 Subject: [PATCH 16/22] file coverage --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69a4e85d..ebfcdca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }} - path: coverage.xml + path: .coverage coverage: name: Process test coverage @@ -102,7 +102,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine .coverage/ + coverage combine coverage* .coverage/ coverage report --fail-under=79 coverage xml From b26b219b9953890da8e82e0329f972a5bef192f9 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:19:41 +0200 Subject: [PATCH 17/22] cov report --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebfcdca8..7b900909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: - name: Mypy run: mypy --install-types --non-interactive pyvlx - name: Tests - run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml + run: PYTHONPATH=. pytest --cov pyvlx --cov-report= - name: Isort run: isort --check-only test examples pyvlx - name: Upload coverage artifact From 59941a90d0ce42eae31fcd8627d811a6e4325e7e Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:29:56 +0200 Subject: [PATCH 18/22] hidden files --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b900909..a8074e9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: - name: Mypy run: mypy --install-types --non-interactive pyvlx - name: Tests - run: PYTHONPATH=. pytest --cov pyvlx --cov-report= + run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml - name: Isort run: isort --check-only test examples pyvlx - name: Upload coverage artifact @@ -59,6 +59,7 @@ jobs: with: name: coverage-${{ matrix.python-version }} path: .coverage + include-hidden-files: true coverage: name: Process test coverage From 0b9e9267530e42a221b29d791ed125c19e82a9ab Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:32:02 +0200 Subject: [PATCH 19/22] restore combine --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8074e9e..c8439db6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine coverage* .coverage/ + coverage combine coverage*/.coverage* coverage report --fail-under=79 coverage xml From 9325084487a940d5ebef73dabd48946f11596923 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:40:21 +0200 Subject: [PATCH 20/22] remove coverage file spec --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8439db6..03d50b2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine coverage*/.coverage* + coverage combine coverage report --fail-under=79 coverage xml From 96bacf336b3a1501fe720676dfdb9dac4fcfeaa0 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:43:40 +0200 Subject: [PATCH 21/22] add coverage path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03d50b2a..d6178eee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: path: .coverage - name: Create coverage report run: | - coverage combine + coverage combine .coverage/ coverage report --fail-under=79 coverage xml From 4da21eb6d56fa198498f0f9e1631aa60b8b9c3c8 Mon Sep 17 00:00:00 2001 From: Paul Daumlechner Date: Wed, 11 Sep 2024 22:45:43 +0200 Subject: [PATCH 22/22] Im tired --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6178eee..c27c1590 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,11 +99,9 @@ jobs: pip install -r requirements/testing.txt - name: Download all coverage artifacts uses: actions/download-artifact@v4 - with: - path: .coverage - name: Create coverage report run: | - coverage combine .coverage/ + coverage combine coverage*/.coverage* coverage report --fail-under=79 coverage xml