Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pytest-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]"},
{name = "Guilherme Fernandes Alves", email = "[email protected]"},
Expand Down
10 changes: 10 additions & 0 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions rocketpy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down