Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.8, add support for Python 3.12 #63

Merged
merged 12 commits into from
Nov 13, 2024
4 changes: 2 additions & 2 deletions .github/workflows/build-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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:
Expand All @@ -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]
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -107,7 +107,8 @@ file:
(such as `scos_usrp`), then add the `scos_tekrsa` dependency:

```text
scos_tekrsa @ git+https://github.com/NTIA/[email protected]
# Be sure to provide the correct tag for the desired version
scos_tekrsa @ git+https://github.com/NTIA/[email protected]
```

1. Compile requirements by running:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 = [
Expand All @@ -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]",
]

Expand Down
3 changes: 1 addition & 2 deletions src/scos_tekrsa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
__version__ = "7.0.1"

__version__ = "8.0.0"
4 changes: 2 additions & 2 deletions src/scos_tekrsa/hardware/tekrsa_sigan.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,7 +20,7 @@
class TekRSASigan(SignalAnalyzerInterface):
def __init__(
self,
switches: Optional[Dict[str, WebRelay]] = None,
switches: Optional[dict[str, WebRelay]] = None,
):

try:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
env_list =
py38
py39
py310
py311
py312
min_version = 4.5.1
skip_missing_interpreters = true
no_package = false
Expand All @@ -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