From 347878e09d046b0c5eb41f48f548bdfcd523002b Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> Date: Sun, 5 Oct 2025 15:54:59 -0300 Subject: [PATCH 1/7] MNT: Bump minimum python version to 3.10 --- .github/workflows/test-pytest-slow.yaml | 2 +- .pylintrc | 2 +- docs/user/installation.rst | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-pytest-slow.yaml b/.github/workflows/test-pytest-slow.yaml index afbcea4df..ce878bc61 100644 --- a/.github/workflows/test-pytest-slow.yaml +++ b/.github/workflows/test-pytest-slow.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.13] + python-version: [3.10, 3.14] env: PYTHON: ${{ matrix.python-version }} MPLBACKEND: Agg diff --git a/.pylintrc b/.pylintrc index 4ae88a7c6..e417e0b11 100644 --- a/.pylintrc +++ b/.pylintrc @@ -88,7 +88,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/docs/user/installation.rst b/docs/user/installation.rst index d19a42ff3..dcc188d17 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -85,7 +85,7 @@ Requirements Python Version ^^^^^^^^^^^^^^ -RocketPy supports Python 3.9 and above. +RocketPy supports Python 3.10 and above. Sorry, there are currently no plans to support earlier versions. If you really need to run RocketPy on Python 3.8 or earlier, feel free to submit an issue and we will see what we can do! diff --git a/pyproject.toml b/pyproject.toml index f471085ed..23d6b3998 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "1.10.0" description="Advanced 6-DOF trajectory simulation for High-Power Rocketry." dynamic = ["dependencies"] readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" authors = [ {name = "Giovani Hidalgo Ceotto", email = "ghceotto@gmail.com"}, {name = "Guilherme Fernandes Alves", email = "guilherme_fernandes@usp.br"}, From 7fcd75a32208d9f31eb5f847ea8aea583631c127 Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:54:06 -0300 Subject: [PATCH 2/7] change python version for tests --- .github/workflows/test_pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index a47b2337a..e14aa6e1e 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.9, 3.13] + python-version: [3.10, 3.14] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From 093220e3cd91cae953495c6ac00006a96c611fa6 Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:58:25 -0300 Subject: [PATCH 3/7] changes more versions of python --- .github/workflows/linters.yml | 2 +- .github/workflows/publish-to-pypi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index d998b5f38..3e5a3e81d 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@main - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 8724c2a94..ba2de7648 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@main with: - python-version: "3.9" + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip From 8488d94c8a91835f980fca49b71ccbbca2c7edad Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:59:15 -0300 Subject: [PATCH 4/7] trying to pass CI --- .github/workflows/test_pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index e14aa6e1e..f2a13fb13 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.10, 3.14] + python-version: ["3.10", "3.14"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From 815a47c93134a250fa7c3a8d072793f1ec271626 Mon Sep 17 00:00:00 2001 From: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:23:46 -0300 Subject: [PATCH 5/7] python 3.4 still note ready --- .github/workflows/test-pytest-slow.yaml | 2 +- .github/workflows/test_pytest.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-pytest-slow.yaml b/.github/workflows/test-pytest-slow.yaml index ce878bc61..2dfe5fd88 100644 --- a/.github/workflows/test-pytest-slow.yaml +++ b/.github/workflows/test-pytest-slow.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.10, 3.14] + python-version: [3.10, 3.13] env: PYTHON: ${{ matrix.python-version }} MPLBACKEND: Agg diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index f2a13fb13..70a31deb4 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10", "3.14"] + python-version: ["3.10", "3.13"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From 0407cb7c3220df03442972c738e9da073f3c98df Mon Sep 17 00:00:00 2001 From: Pedro Bressan <87212571+phmbressan@users.noreply.github.com> Date: Sat, 18 Oct 2025 14:55:13 +0200 Subject: [PATCH 6/7] GIT: change workflows to retry Python 3.14. --- .github/workflows/test-pytest-slow.yaml | 2 +- .github/workflows/test_pytest.yaml | 2 +- rocketpy/mathutils/function.py | 10 ++++++++++ rocketpy/tools.py | 5 +++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-pytest-slow.yaml b/.github/workflows/test-pytest-slow.yaml index 2dfe5fd88..ce878bc61 100644 --- a/.github/workflows/test-pytest-slow.yaml +++ b/.github/workflows/test-pytest-slow.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.10, 3.13] + python-version: [3.10, 3.14] env: PYTHON: ${{ matrix.python-version }} MPLBACKEND: Agg diff --git a/.github/workflows/test_pytest.yaml b/.github/workflows/test_pytest.yaml index 70a31deb4..f2a13fb13 100644 --- a/.github/workflows/test_pytest.yaml +++ b/.github/workflows/test_pytest.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10", "3.13"] + python-version: ["3.10", "3.14"] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index 7cf9be334..9fe343687 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -449,6 +449,9 @@ def rbf_interpolation(x, x_min, x_max, x_data, y_data, coeffs): # pylint: disab self._interpolation_func = rbf_interpolation + else: + raise ValueError(f"Interpolation {interpolation} method not recognized.") + def __set_extrapolation_func(self): # pylint: disable=too-many-statements """Defines extrapolation function used by the Function. Each extrapolation method has its own function. The function is stored in @@ -532,6 +535,11 @@ def natural_extrapolation(x, x_min, x_max, x_data, y_data, _): def natural_extrapolation(x, x_min, x_max, x_data, y_data, coeffs): # pylint: disable=unused-argument return interpolator(x) + else: + raise ValueError( + f"Natural extrapolation not defined for {interpolation}." + ) + self._extrapolation_func = natural_extrapolation elif extrapolation == 2: # constant if self.__dom_dim__ == 1: @@ -547,6 +555,8 @@ def constant_extrapolation(x, x_min, x_max, x_data, y_data, coeffs): return extrapolator(x) self._extrapolation_func = constant_extrapolation + else: + raise ValueError(f"Extrapolation {extrapolation} method not recognized.") def set_get_value_opt(self): """Defines a method that evaluates interpolations. diff --git a/rocketpy/tools.py b/rocketpy/tools.py index 5683f9847..0e80152a7 100644 --- a/rocketpy/tools.py +++ b/rocketpy/tools.py @@ -182,12 +182,13 @@ def find_roots_cubic_function(a, b, c, d): Examples -------- >>> from rocketpy.tools import find_roots_cubic_function + >>> import cmath First we define the coefficients of the function ax**3 + bx**2 + cx + d >>> a, b, c, d = 1, -3, -1, 3 >>> x1, x2, x3 = find_roots_cubic_function(a, b, c, d) - >>> x1 - (-1+0j) + >>> cmath.isclose(x1, (-1+0j)) + True To get the real part of the roots, use the real attribute of the complex number. From bc6dd6fd0ed36b16b26a3545a09f98ff3be013d1 Mon Sep 17 00:00:00 2001 From: Pedro Bressan <87212571+phmbressan@users.noreply.github.com> Date: Sun, 19 Oct 2025 09:05:53 +0200 Subject: [PATCH 7/7] MNT: Update CHANGELOG. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe70b476..8f0ffb99f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). Attention: The newest changes should be on top --> ### Added + - ENH: Tank Fluids with Variable Density from Temperature and Pressure [#852](https://github.com/RocketPy-Team/RocketPy/pull/852) - ENH: Controller (AirBrakes) and Sensors Encoding [#849](https://github.com/RocketPy-Team/RocketPy/pull/849) - EHN: Addition of ensemble variable to ECMWF dictionaries [#842](https://github.com/RocketPy-Team/RocketPy/pull/842) @@ -43,6 +44,7 @@ Attention: The newest changes should be on top --> ### Changed +- MNT: bumps min python version to 3.10 [#857](https://github.com/RocketPy-Team/RocketPy/pull/857) - DOC: Update docs dependencies and sub dependencies [#851](https://github.com/RocketPy-Team/RocketPy/pull/851) - MNT: extract flight data exporters [#845](https://github.com/RocketPy-Team/RocketPy/pull/845) - ENH: _MotorPrints inheritance - issue #460 [#828](https://github.com/RocketPy-Team/RocketPy/pull/828)