From 31d2bb0a79048e2e055a593586527cb0538a222a Mon Sep 17 00:00:00 2001 From: Nick Clark Date: Thu, 19 Jun 2025 10:21:49 +0100 Subject: [PATCH 1/9] Added function for compatibility with rapid block mode. --- picoscope/ps2000a.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/picoscope/ps2000a.py b/picoscope/ps2000a.py index b87bc69..1ef9210 100644 --- a/picoscope/ps2000a.py +++ b/picoscope/ps2000a.py @@ -364,6 +364,15 @@ def _lowLevelSetDataBuffer(self, channel, data, downSampleMode, c_enum(downSampleMode)) self.checkResult(m) + def _lowLevelSetDataBufferBulk(self, channel, data, segmentIndex, + downSampleMode): + """Just calls setDataBuffer with argument order changed. + + For compatibility with current picobase.py. + """ + self._lowLevelSetDataBuffer(channel, data, downSampleMode, + segmentIndex) + def _lowLevelSetMultipleDataBuffers(self, channel, data, downSampleMode): max_segments = self._lowLevelGetMaxSegments() if data.shape[0] < max_segments: From 38aeacec05916d77b9acb079a85ae136b366afa5 Mon Sep 17 00:00:00 2001 From: Nick Clark Date: Fri, 27 Jun 2025 16:06:02 +0100 Subject: [PATCH 2/9] Update to ruff. Ditch 3.7 Add 3.13 --- .github/workflows/test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99a738a..e86c2ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.11', '3.12'] - + python-version: ['3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} @@ -22,8 +21,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 numpy - - name: Flake + python -m pip install ruff numpy + - name: Ruff run: | - flake8 picoscope setup.py - flake8 examples/* + ruff picoscope setup.py + ruff examples/* From 511b004edf909c8c8a3ef4cb4fa49f84e04a6ca0 Mon Sep 17 00:00:00 2001 From: Nick Clark Date: Fri, 27 Jun 2025 16:07:16 +0100 Subject: [PATCH 3/9] Little typo with folder. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e86c2ac..b4f4e77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,4 +25,4 @@ jobs: - name: Ruff run: | ruff picoscope setup.py - ruff examples/* + ruff examples From 8e72a651aec6b16a5fa776c3061fff472003181f Mon Sep 17 00:00:00 2001 From: Nick Clark Date: Fri, 27 Jun 2025 16:19:46 +0100 Subject: [PATCH 4/9] Reverted changes accidentally included in this branch. --- picoscope/ps2000a.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/picoscope/ps2000a.py b/picoscope/ps2000a.py index 1ef9210..b87bc69 100644 --- a/picoscope/ps2000a.py +++ b/picoscope/ps2000a.py @@ -364,15 +364,6 @@ def _lowLevelSetDataBuffer(self, channel, data, downSampleMode, c_enum(downSampleMode)) self.checkResult(m) - def _lowLevelSetDataBufferBulk(self, channel, data, segmentIndex, - downSampleMode): - """Just calls setDataBuffer with argument order changed. - - For compatibility with current picobase.py. - """ - self._lowLevelSetDataBuffer(channel, data, downSampleMode, - segmentIndex) - def _lowLevelSetMultipleDataBuffers(self, channel, data, downSampleMode): max_segments = self._lowLevelGetMaxSegments() if data.shape[0] < max_segments: From 67f75f12aa0f618731cb06f6a7be4f72f2f31d67 Mon Sep 17 00:00:00 2001 From: Nick Clark Date: Fri, 27 Jun 2025 16:27:41 +0100 Subject: [PATCH 5/9] Update actions to latest versions. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4f4e77..644bd38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,9 @@ jobs: matrix: python-version: ['3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 11725a7fbf9c4017b57dd7c4b029afc084cf7c1a Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 28 Jun 2025 10:45:28 -0400 Subject: [PATCH 6/9] Revert to flake8 --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 644bd38..74b1370 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install ruff numpy - - name: Ruff + python -m pip install flake8 numpy + - name: Flake run: | - ruff picoscope setup.py - ruff examples + flake8 picoscope setup.py + flake8 examples From 96a3d5cf0b8c3bd4a751cc635d7a244892eb8019 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 28 Jun 2025 10:47:00 -0400 Subject: [PATCH 7/9] Add more python tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74b1370..071a437 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From b881047af2cdd906d1094b2fb726f865dd23f726 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 28 Jun 2025 10:47:47 -0400 Subject: [PATCH 8/9] Update setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 27bcaba..fbe5f42 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ 'Topic :: System :: Hardware', 'Topic :: Scientific/Engineering', 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', ], From 627162d1055eec6a69ffbc6244b5b279e627fed1 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sat, 28 Jun 2025 10:51:18 -0400 Subject: [PATCH 9/9] Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index fbe5f42..c7623f7 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ # What does your project relate to? keywords='picoscope peripherals hardware oscilloscope ATE', + python_requires='>=3.9', install_requires=['numpy'], cmdclass=versioneer.get_cmdclass() )