From c60be412e845139f49b0341c717865c160f59bff Mon Sep 17 00:00:00 2001 From: Satyam Khanna Date: Sat, 21 Nov 2026 18:48:38 +0530 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=91=B7=20Test=20every=20supported?= =?UTF-8?q?=20Python=20version=20and=20recommend=203.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add the supported-version policy and its yearly review to HOWTOCONTRIBUTE.md, and link it from doc/ARCHITECTURE.md (#189) - run the Linux, macOS and Windows test matrices on Python 3.11-3.15 - move the recommended version to 3.14 in the README, Dockerfile, book build and examples-gallery workflows Closes #189 --- .github/workflows/Book.yml | 2 +- .github/workflows/Linux_CI.yml | 3 +- .github/workflows/MacOS_CI.yml | 3 +- .github/workflows/Update_Examples_Gallery.yml | 2 +- .github/workflows/Windows_CI.yml | 3 +- Dockerfile | 2 +- HOWTOCONTRIBUTE.md | 34 +++++++++++++++++++ README.md | 4 +-- doc/ARCHITECTURE.md | 2 +- 9 files changed, 46 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Book.yml b/.github/workflows/Book.yml index 609756ec..f2033d7e 100644 --- a/.github/workflows/Book.yml +++ b/.github/workflows/Book.yml @@ -35,7 +35,7 @@ jobs: - name: Setup python uses: actions/setup-python@v7 with: - python-version: '3.13' + python-version: '3.14' - name: Install dependencies run: | diff --git a/.github/workflows/Linux_CI.yml b/.github/workflows/Linux_CI.yml index 8b083137..5b5b954f 100644 --- a/.github/workflows/Linux_CI.yml +++ b/.github/workflows/Linux_CI.yml @@ -12,7 +12,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.13'] + # See "Supported Python versions" in HOWTOCONTRIBUTE.md. + python-version: ['3.11', '3.12', '3.13', '3.14', '3.15'] name: Python ${{ matrix.python-version }} CI diff --git a/.github/workflows/MacOS_CI.yml b/.github/workflows/MacOS_CI.yml index c8e9661c..5eb9a357 100644 --- a/.github/workflows/MacOS_CI.yml +++ b/.github/workflows/MacOS_CI.yml @@ -12,7 +12,8 @@ jobs: runs-on: macos-latest strategy: matrix: - python-version: [ '3.13' ] + # See "Supported Python versions" in HOWTOCONTRIBUTE.md. + python-version: [ '3.11', '3.12', '3.13', '3.14', '3.15' ] name: Python ${{ matrix.python-version }} CI steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/Update_Examples_Gallery.yml b/.github/workflows/Update_Examples_Gallery.yml index 15e5edc2..6f6d7339 100644 --- a/.github/workflows/Update_Examples_Gallery.yml +++ b/.github/workflows/Update_Examples_Gallery.yml @@ -33,7 +33,7 @@ jobs: - name: Setup python uses: actions/setup-python@v7 with: - python-version: '3.13' + python-version: '3.14' # The script uses only the standard library, so no dependency install is needed - name: Generate examples gallery diff --git a/.github/workflows/Windows_CI.yml b/.github/workflows/Windows_CI.yml index 9d5a7770..97db15d0 100644 --- a/.github/workflows/Windows_CI.yml +++ b/.github/workflows/Windows_CI.yml @@ -12,7 +12,8 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.13'] + # See "Supported Python versions" in HOWTOCONTRIBUTE.md. + python-version: ['3.11', '3.12', '3.13', '3.14', '3.15'] name: Python ${{ matrix.python-version }} CI diff --git a/Dockerfile b/Dockerfile index 7f9c706c..9e9ab078 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13.0 +FROM python:3.14 ARG DEBIAN_FRONTEND=noninteractive diff --git a/HOWTOCONTRIBUTE.md b/HOWTOCONTRIBUTE.md index 5c45c313..5492c83a 100644 --- a/HOWTOCONTRIBUTE.md +++ b/HOWTOCONTRIBUTE.md @@ -4,6 +4,40 @@ Before starting your contribution, please check [README](/README.md) to understa If you use an AI coding tool such as Claude Code, the project's conventions are summarized in [CLAUDE.md](/CLAUDE.md), which Claude Code loads automatically. For questions and ideas, please use [Discussions](https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/discussions). Issues are for bug reports and agreed tasks. +## Supported Python versions + +The project supports every Python version that has not reached its end of life, +so learners can use the interpreter that ships with their OS. The Linux, macOS +and Windows CI workflows run the test suite on every supported version. + +| Role | Version | Used by | +|---|---|---| +| Newest supported | 3.15 | CI matrix | +| Recommended | 3.14 | README, Dockerfile, dev container, book and gallery workflows | +| Oldest supported | 3.11 | CI matrix | + +The recommended version is the newest release minus one. A new Python version is +not recommended right after its release because the dependencies (NumPy, SciPy, +matplotlib, CasADi, do-mpc) may not have wheels for it yet. The Dockerfile names +the minor version without a patch number (`python:3.14`), so rebuilding the image +also picks up patch and security fixes. + +"Supported" means the code runs and the test suite passes on that version. It +does not mean every dependency publishes wheels for it: pip installs the newest +release of each dependency that still supports the interpreter, so Python 3.11 +gets older NumPy and SciPy releases than Python 3.15. + +### Yearly review + +Review the policy every year in December or January, after the October Python +release: + +1. Add the new version to the CI matrix once its dependencies publish wheels. + If one of them does not, leave the version out and add a comment in the + workflow saying which dependency blocks it. +2. Move the recommended version up by one, and update the files in the table. +3. Remove versions that reached their end of life from the matrix and the table. + ## Add new sample program of algorithm Steps to add a new sample program. diff --git a/README.md b/README.md index 200c5787..37c833c9 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Beyond single algorithms, the project shows how they work together: how the stag ## Requirements Please satisfy with the following requirements on native or VM Linux in advance. For running each sample codes: -* [Python 3.13.x](https://www.python.org/) +* [Python 3.14.x](https://www.python.org/) * [Matplotlib](https://matplotlib.org/) * [NumPy](https://numpy.org/) * [SciPy](https://scipy.org/) @@ -93,7 +93,7 @@ Note for options A and B: The container shows the animations through your host's #### C. Local (without Docker) -1. Install [Python 3.13.x](https://www.python.org/) +1. Install [Python 3.14.x](https://www.python.org/) 2. Create a virtual environment and install the required libraries * Linux / macOS: ```bash diff --git a/doc/ARCHITECTURE.md b/doc/ARCHITECTURE.md index 909df7aa..dcad91fc 100644 --- a/doc/ARCHITECTURE.md +++ b/doc/ARCHITECTURE.md @@ -175,7 +175,7 @@ The package is also meant to be imported by other projects, not only by the simu Drawing dependencies (matplotlib, Pillow) and MPC dependencies (CasADi, do-mpc) are optional extras (`pip install [viz]`, `[mpc]`). Each component is split when its stage is ported in Phase 2, not in one big rewrite, so open pull requests are affected as little as possible. Until Phase 2 is done the API can change between versions (0.x). A stable release on PyPI follows after it. The library is for learning, research and prototyping. It is pure Python and not meant for real-time control of real vehicles. -The public API of the core has type hints for every argument and return value, the package ships a `py.typed` marker, and CI type-checks the core modules with pyright. +The public API of the core has type hints for every argument and return value, the package ships a `py.typed` marker, and CI type-checks the core modules with pyright. Supported Python versions and the yearly review that updates them are defined in [HOWTOCONTRIBUTE.md](https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/HOWTOCONTRIBUTE.md#supported-python-versions). ## Roadmap