Skip to content

TST: add Defiance example flight acceptance test - #1156

Open
ting-hong-shieh wants to merge 2 commits into
RocketPy-Team:developfrom
ting-hong-shieh:codex/test-example-flight-acceptance
Open

TST: add Defiance example flight acceptance test#1156
ting-hong-shieh wants to merge 2 commits into
RocketPy-Team:developfrom
ting-hong-shieh:codex/test-example-flight-acceptance

Conversation

@ting-hong-shieh

Copy link
Copy Markdown

Summary

  • Reproduce the deterministic parts of the 2024 Defiance example with repository-local thrust and drag data.
  • Compare the simulated apogee above ground level with the measured value published in the flight examples.
  • Keep the test independent of live weather services and external downloads.

This is the example-based acceptance-test prerequisite suggested in #1057. It does not introduce a Rust proof of concept or change the flight solver.

Before and after

Result Before After
Defiance example acceptance checks 0 1
Acceptance tests passing 16 17
Simulated apogee AGL not checked 9242.183 m
Measured apogee AGL not checked 9308.320 m
Relative apogee error not checked 0.711%
Acceptance threshold not checked less than 1%

Base SHA: 62aa0f9be32eeccafbc1aefd6ac3d90306b257ce

Head SHA: c1f331b5d37032342fc02a5bda69e3618da74696

Validation

$ python -m pytest -q tests/acceptance
17 passed, 9 warnings in 1.54s

$ ruff check tests/acceptance/test_defiance_rocket.py
All checks passed!

$ ruff format --check tests/acceptance/test_defiance_rocket.py
1 file already formatted

The warnings come from existing weather mappings, stability checks, interpolation inputs, and the Defiance example's parachute pressure-signal construction. This PR does not change or suppress them.

Local environment

Component Version
Python 3.12.6
RocketPy 1.13.0
NumPy 2.5.2
SciPy 1.18.0
pytest 9.1.1
OS macOS 26.5 (Darwin 25.5.0), arm64

Scope

This test covers one published output from the Defiance example under its fixed custom atmosphere. It does not validate every example flight, benchmark 6-DOF performance, or define numerical tolerances for a future Rust implementation.

Related to #1057.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.45%. Comparing base (e0ff281) to head (fa63fb7).
⚠️ Report is 59 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1156      +/-   ##
===========================================
+ Coverage    82.18%   83.45%   +1.27%     
===========================================
  Files          122      130       +8     
  Lines        16355    17082     +727     
===========================================
+ Hits         13441    14256     +815     
+ Misses        2914     2826      -88     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ting-hong-shieh
ting-hong-shieh marked this pull request as ready for review August 14, 2026 10:55
@ting-hong-shieh
ting-hong-shieh requested a review from a team as a code owner August 14, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant