Skip to content
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2575950
ENH: Pass Acceleration Data to Parachute Trigger Functions (RocketPy-…
ViniciusCMB Dec 4, 2025
7ec7ac9
ENH: Add acceleration-based parachute triggers with IMU sensor simula…
ViniciusCMB Dec 7, 2025
18aab57
ENH: Enable sensors+acceleration triggers in parachutes
ViniciusCMB Dec 8, 2025
0932277
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
ViniciusCMB Dec 8, 2025
916b0fc
STY: Apply ruff format to flight.py
ViniciusCMB Dec 8, 2025
8e88fa8
STY: Fix pylint for parachute triggers
ViniciusCMB Dec 9, 2025
e84df40
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
ViniciusCMB Dec 9, 2025
a7f5c3a
TST: Add comprehensive unit tests for acceleration-based parachute tr…
ViniciusCMB Dec 9, 2025
ad7e6d0
DOC: Add comprehensive documentation for acceleration-based parachute…
ViniciusCMB Dec 9, 2025
8f65022
STY: Apply ruff format to test_parachute_trigger_acceleration.py
ViniciusCMB Dec 9, 2025
d45b3a5
STY: Fix pylint warnings in test_parachute_triggers.py
ViniciusCMB Dec 9, 2025
6d79d62
FIX: Add missing u_dot parameter to direct triggerfunc calls
ViniciusCMB Dec 9, 2025
5619b3a
STY: Apply ruff format to flight.py
ViniciusCMB Dec 9, 2025
c66cffc
MNT: align acceleration trigger API with review feedback
ViniciusCMB Mar 22, 2026
56c1e51
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
ViniciusCMB Mar 22, 2026
02d344d
STY: apply ruff format fixes
ViniciusCMB Mar 22, 2026
00e94b9
STY: apply ruff format fixes to flight.py
ViniciusCMB Mar 22, 2026
a0cb73d
STY: Apply ruff check after pip update
ViniciusCMB Mar 25, 2026
aba648b
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
ViniciusCMB Mar 25, 2026
6beab3c
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
MateusStano Mar 27, 2026
aa89d50
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
MateusStano Mar 27, 2026
6a9795d
Merge branch 'develop' into enh/acceleration-data-to-trigger-parachutes
MateusStano Apr 4, 2026
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
Prev Previous commit
Next Next commit
STY: Fix pylint warnings in test_parachute_triggers.py
- Reorder imports: standard library before third-party
- Prefix unused arguments with underscore
- Add broad-exception-caught disable for test runner
  • Loading branch information
ViniciusCMB committed Dec 9, 2025
commit d45b3a58725cace3cbfa46d1399fe1b31bc0c326
17 changes: 9 additions & 8 deletions tests/unit/test_parachute_triggers.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import numpy as np
import traceback

import numpy as np

from rocketpy.simulation.flight import Flight
from rocketpy.rocket.parachute import Parachute


def _test_trigger_receives_u_dot_and_noise():
def derivative_func(t, y):
def derivative_func(_t, _y):
return np.array([0, 0, 0, 1.0, 2.0, 3.0, 0, 0, 0, 0, 0, 0, 0])

recorded = {}

def user_trigger(p, h, y, u_dot):
def user_trigger(_p, _h, _y, u_dot):
recorded["u_dot"] = np.array(u_dot)
return True

Expand Down Expand Up @@ -44,12 +45,12 @@ def user_trigger(p, h, y, u_dot):
def _test_trigger_with_u_dot_only():
"""Test trigger that only expects u_dot (no sensors)."""

def derivative_func(t, y):
def derivative_func(_t, _y):
return np.array([0, 0, 0, -1.0, -2.0, -3.0, 0, 0, 0, 0, 0, 0, 0])

recorded = {}

def user_trigger(p, h, y, u_dot):
def user_trigger(_p, _h, _y, u_dot):
recorded["u_dot"] = np.array(u_dot)
return False

Expand Down Expand Up @@ -80,12 +81,12 @@ def user_trigger(p, h, y, u_dot):


def _test_legacy_trigger_does_not_compute_u_dot():
def derivative_func(t, y):
def derivative_func(_t, _y):
raise RuntimeError("derivative should not be called for legacy triggers")

called = {}

def legacy_trigger(p, h, y):
def legacy_trigger(_p, _h, _y):
called["ok"] = True
return True

Expand Down Expand Up @@ -126,7 +127,7 @@ def run_all():
try:
t()
print(f"[PASS] {name}")
except Exception:
except Exception: # pylint: disable=broad-exception-caught
failures += 1
print(f"[FAIL] {name}")
traceback.print_exc()
Expand Down