From e0a02cece491c74e18f29b1869b9f75c2f5cde45 Mon Sep 17 00:00:00 2001 From: crnbaker Date: Wed, 26 Jun 2024 12:02:21 +0100 Subject: [PATCH] #62 removed support for Python 3.9 (because using more modern type annotations) --- .github/workflows/spectrumdevice-docs-pages.yml | 2 +- .github/workflows/spectrumdevice-integration-tests.yml | 2 +- .github/workflows/spectrumdevice-unit-tests.yml | 2 +- setup.cfg | 3 +-- src/spectrumdevice/measurement.py | 5 ++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/spectrumdevice-docs-pages.yml b/.github/workflows/spectrumdevice-docs-pages.yml index ea4f37f..810c305 100644 --- a/.github/workflows/spectrumdevice-docs-pages.yml +++ b/.github/workflows/spectrumdevice-docs-pages.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/spectrumdevice-integration-tests.yml b/.github/workflows/spectrumdevice-integration-tests.yml index 8609c8e..e461630 100644 --- a/.github/workflows/spectrumdevice-integration-tests.yml +++ b/.github/workflows/spectrumdevice-integration-tests.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/spectrumdevice-unit-tests.yml b/.github/workflows/spectrumdevice-unit-tests.yml index 8f191e5..e784903 100644 --- a/.github/workflows/spectrumdevice-unit-tests.yml +++ b/.github/workflows/spectrumdevice-unit-tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/setup.cfg b/setup.cfg index c0db2ea..f8496ff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ classifiers = Operating System :: POSIX :: Linux Operating System :: Microsoft :: Windows :: Windows 10 Operating System :: MacOS :: MacOS X - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 @@ -35,7 +34,7 @@ package_dir = include_package_data = True install_requires = numpy>=1.26.2 -python_requires = >=3.8 +python_requires = >=3.10 [options.packages.find] where = src diff --git a/src/spectrumdevice/measurement.py b/src/spectrumdevice/measurement.py index c0f165c..7c8cb74 100644 --- a/src/spectrumdevice/measurement.py +++ b/src/spectrumdevice/measurement.py @@ -1,6 +1,5 @@ from datetime import datetime from dataclasses import dataclass -from typing import List, Optional from numpy import int16, float64 from numpy.typing import NDArray @@ -14,7 +13,7 @@ class Measurement: """Measurement is a dataclass for storing a set of waveforms generated by a single acquisition, with a timestamp.""" - waveforms: List[VoltageWaveformType] | List[RawWaveformType] + waveforms: list[VoltageWaveformType] | list[RawWaveformType] """Contains the acquired waveforms as a list of 1D NumPy arrays or either floats or ints""" - timestamp: Optional[datetime] + timestamp: datetime | None """The time at which the acquisition was triggered, as a datetime.datetime object"""