From 915bfe5293319e87af5fb29e33e729dceaafe1c2 Mon Sep 17 00:00:00 2001 From: Eric Constantin Date: Thu, 22 Oct 2026 10:11:42 -0700 Subject: [PATCH] Run tests in workflows and declare minimum Python version --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 2 ++ CHANGELOG.md | 8 ++++++++ CONTRIBUTING.md | 17 ++++++++++++++--- README.md | 2 ++ setup.py | 1 + 6 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73442d4..33d9705 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: python -m pip install -e .[release] + - name: Run tests + run: python -m unittest discover -s tests -v - name: Build run: python -m build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 151ca45..5e9b2a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ jobs: python-version: '3.12' - name: Install dependencies run: python -m pip install -e .[release] + - name: Run tests + run: python -m unittest discover -s tests -v - name: Build release run: python -m build --sdist --wheel - id: extract-release-notes diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d5ab22..fe5836c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Declare Python 3.12 as the minimum supported version in package metadata + +### Changed + +- Run regression tests in CI and before publishing releases + ## [1.3.3] - 2026-10-19 ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71b6179..37a5392 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,9 +5,8 @@ don't have time to contribute! ## Making Changes -> **Note**: This guide assumes you have a working Python installation (most -> versions are supported) and have the Python Package Installer available in -> the current user's $PATH. +> **Note**: This guide assumes you have Python 3.12 or newer installed and have +> the Python Package Installer available in the current user's $PATH. To get started, [fork][2] this repository on GitHub and clone a working copy for development: @@ -25,6 +24,18 @@ development, issue: $ python -m pip install -e . +Run the tests before submitting changes: + + $ python -m unittest discover -s tests -v + +The tests use the standard library's `unittest` module and mocked cloud responses; +no SensorPush account or credentials are needed. CI runs them on Python 3.12 and +3.13, and the release workflow runs them before building and publishing. + +To check that the source distribution and wheel build successfully: + + $ python -m pip install -e '.[release]' + $ python -m build If user-facing changes are introduced, be sure add an entry to the `Unreleased` section in [CHANGELOG.md][3]. diff --git a/README.md b/README.md index d78324c..00950f8 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Gateway Cloud API][4] with [Home Assistant][5]. It is primarily used by the ## Installation +Python 3.12 or newer is required. + `sensorpush-ha` is available on [PyPI][2] and can be installed locally using the Python Package Installer: diff --git a/setup.py b/setup.py index c423bbf..39d38d8 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ author_email="sstallion@gmail.com", url="https://github.com/sstallion/sensorpush-ha", packages=find_packages(), + python_requires=">=3.12", classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment",