diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index ef0c90e7..5483742b 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -19,9 +19,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build tekrsa_usb Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: false tags: tekrsa_usb diff --git a/.github/workflows/tox.yaml b/.github/workflows/tox.yaml index 231ad3d6..cef230ba 100644 --- a/.github/workflows/tox.yaml +++ b/.github/workflows/tox.yaml @@ -31,19 +31,19 @@ jobs: fail-fast: false matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 py: - - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" steps: - name: Set up Python ${{ matrix.py }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.py }} - name: Checkout scos-tekrsa - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install tox-gh run: python -m pip install tox-gh - name: Set up test suite diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e27679e5..dcbcc41d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-ast types: [file, python] @@ -16,10 +16,10 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.19.0 hooks: - id: pyupgrade - args: ["--py38-plus"] + args: ["--py39-plus"] - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: @@ -28,12 +28,12 @@ repos: types: [file, python] args: ["--profile", "black", "--filter-files", "--gitignore"] - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.10.0 hooks: - id: black types: [file, python] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.40.0 + rev: v0.42.0 hooks: - id: markdownlint types: [file, markdown] diff --git a/README.md b/README.md index 169cc73d..baa54e97 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Tektronix RSA devices, along with supporting test code ## Running in SCOS Sensor -Requires `git`, `python>=3.8`, `pip>=18.1`, and `pip-tools>=6.6.2` +Requires `git`, `python>=3.9`, `pip>=18.1`, and `pip-tools>=6.6.2` Below are the steps to run SCOS Sensor with the SCOS Tektronix RSA plugin: @@ -107,7 +107,8 @@ file: (such as `scos_usrp`), then add the `scos_tekrsa` dependency: ```text - scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.1 + # Be sure to provide the correct tag for the desired version + scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@8.0.0 ``` 1. Compile requirements by running: @@ -149,7 +150,7 @@ from Tektronix. Place the three files `libRSA_API.so`, `libcyusb_shared.so`, and Set up a development environment using a tool like [Conda](https://docs.conda.io/en/latest/) -or [venv](https://docs.python.org/3/library/venv.html#module-venv), with `python>=3.8`. +or [venv](https://docs.python.org/3/library/venv.html#module-venv), with `python>=3.9`. Then, from the cloned directory, install the development dependencies by running: ```bash @@ -195,7 +196,9 @@ Registry, run: ```bash docker build -f docker/Dockerfile -t tekrsa_usb . docker tag tekrsa_usb ghcr.io/ntia/scos-tekrsa/tekrsa_usb:X.X.X +docker tag tekrsa_usb ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest docker push ghcr.io/ntia/scos-tekrsa/tekrsa_usb:X.X.X +docker push ghcr.io/ntia/scos-tekrsa/tekrsa_usb:latest ``` ### Running Tests diff --git a/pyproject.toml b/pyproject.toml index 6a716c62..a5eb0034 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "scos-tekrsa" dynamic = ["version"] description = "Plugin for SCOS Sensor which adds support for Tektronix RSA-series spectrum analyzers" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { file = "LICENSE.md" } authors = [ @@ -32,10 +32,10 @@ classifiers = [ "Environment :: Plugins", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ @@ -46,14 +46,14 @@ dependencies = [ [project.optional-dependencies] tests = [ - "pytest>=7.3.1,<8.0", - "pytest-cov>=4.0.0,<5.0", + "pytest>=8.0,<9.0", + "pytest-cov>=6.0,<7.0", "tox>=4.5.1,<5.0", # Should keep in sync with tox.ini minimum_version ] dev = [ "hatchling>=1.14.2,<2.0", - "pre-commit>=3.3.1,<4.0", + "pre-commit>=4.0,<5.0", "scos-tekrsa[tests]", ] diff --git a/src/scos_tekrsa/__init__.py b/src/scos_tekrsa/__init__.py index 6cb1c69d..73d4c8be 100644 --- a/src/scos_tekrsa/__init__.py +++ b/src/scos_tekrsa/__init__.py @@ -1,2 +1 @@ -__version__ = "7.0.1" - +__version__ = "8.0.0" diff --git a/src/scos_tekrsa/hardware/tekrsa_sigan.py b/src/scos_tekrsa/hardware/tekrsa_sigan.py index 56c4d9f3..d06fb23b 100644 --- a/src/scos_tekrsa/hardware/tekrsa_sigan.py +++ b/src/scos_tekrsa/hardware/tekrsa_sigan.py @@ -1,6 +1,6 @@ import logging import threading -from typing import Dict, Optional +from typing import Optional from its_preselector.web_relay import WebRelay from scos_actions import utils @@ -20,7 +20,7 @@ class TekRSASigan(SignalAnalyzerInterface): def __init__( self, - switches: Optional[Dict[str, WebRelay]] = None, + switches: Optional[dict[str, WebRelay]] = None, ): try: diff --git a/tox.ini b/tox.ini index 744e82ac..9be29463 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] env_list = - py38 py39 py310 py311 + py312 min_version = 4.5.1 skip_missing_interpreters = true no_package = false @@ -17,7 +17,7 @@ commands = pytest --cov-report term-missing --no-cov-on-fail --cov {posargs} [gh] ; GitHub Actions CI with tox-gh python = - 3.8 = py38 3.9 = py39 3.10 = py310 3.11 = py311 + 3.12 = py312