Skip to content

ENH: Add optional max time to stochastic_flight and create stochastic_flight objects with attributes in base flight#1070

Merged
Gui-FernandesBR merged 4 commits into
RocketPy-Team:developfrom
zuorenchen:enh/stochastic-flight-max-time
Jul 19, 2026
Merged

ENH: Add optional max time to stochastic_flight and create stochastic_flight objects with attributes in base flight#1070
Gui-FernandesBR merged 4 commits into
RocketPy-Team:developfrom
zuorenchen:enh/stochastic-flight-max-time

Conversation

@zuorenchen

@zuorenchen zuorenchen commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Pull request type

  • Code changes (bugfix, features)

Checklist

  • Tests for the changes have been added (if needed)
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

  1. When creating stochastic_flight, max_time is always the default value in Flight class.
  2. Some attributes of the created object from stochastic_flight.create_object() are not carried over from base flight class for stochastic_flight

New behavior

  1. Add max_time as optional for stochastic_flight
  2. Use attributes of base flight class to create stochastic_flight objects

Breaking change

  • Yes
  • No

Additional information

Saw this requested in Discord. Already implemented something similar in https://github.com/ARRC-Rocket/ActiveRocketPy

@zuorenchen
zuorenchen requested a review from a team as a code owner July 19, 2026 01:24
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.29%. Comparing base (e0ff281) to head (be78732).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/stochastic/stochastic_flight.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1070      +/-   ##
===========================================
+ Coverage    82.18%   82.29%   +0.11%     
===========================================
  Files          122      122              
  Lines        16355    16361       +6     
===========================================
+ Hits         13441    13465      +24     
+ Misses        2914     2896      -18     

☔ 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.

@zuorenchen zuorenchen changed the title ENH: Add optional max time to stochastic_flight and create stochastic_flight objects with attributes in default flight ENH: Add optional max time to stochastic_flight and create stochastic_flight objects with attributes in base flight Jul 19, 2026
@zuorenchen
zuorenchen force-pushed the enh/stochastic-flight-max-time branch from d879286 to be78732 Compare July 19, 2026 12:56
@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Monte Carlo Monte Carlo and related contents labels Jul 19, 2026
@Gui-FernandesBR
Gui-FernandesBR merged commit d8663a4 into RocketPy-Team:develop Jul 19, 2026
10 checks passed
@zuorenchen

Copy link
Copy Markdown
Contributor Author

Hi @Gui-FernandesBR

Thanks for the review and approval. Regarding the changelog, would it be automatically updated now? or should I manually update the changelog

Gui-FernandesBR added a commit that referenced this pull request Jul 19, 2026
- Fold the Unreleased section into v1.13.0 and date it 2026-07-19.
- Drop reverted PR #958 entries (parachute abstract-base breaking change)
  and its revert #1063 - neither ever reached a release.
- Consolidate the 3D flight animation into a single #1066 (PyVista) entry;
  drop the superseded Vedo-based #909.
- Remove duplicate entries (#1066, #1067, #1055 in Added, #1047 in Added)
  and the doubled "ENH: ENH:" / "MNT: MNT:" auto-changelog prefixes.
- Drop non-user-facing meta entries (#1062 changelog cleanup, #1069 CI fix)
  and the test-only entry (#1051), per the changelog's own scope rules.
- Add the missing #1070 (max_time for StochasticFlight) entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gui-FernandesBR added a commit that referenced this pull request Jul 19, 2026
… deps sync (#1073)

* DOC: consolidate and clean v1.13.0 changelog for release

- Fold the Unreleased section into v1.13.0 and date it 2026-07-19.
- Drop reverted PR #958 entries (parachute abstract-base breaking change)
  and its revert #1063 - neither ever reached a release.
- Consolidate the 3D flight animation into a single #1066 (PyVista) entry;
  drop the superseded Vedo-based #909.
- Remove duplicate entries (#1066, #1067, #1055 in Added, #1047 in Added)
  and the doubled "ENH: ENH:" / "MNT: MNT:" auto-changelog prefixes.
- Drop non-user-facing meta entries (#1062 changelog cleanup, #1069 CI fix)
  and the test-only entry (#1051), per the changelog's own scope rules.
- Add the missing #1070 (max_time for StochasticFlight) entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* MNT: sync optional animation deps in requirements-optional.txt

The 3D flight animation switched from Vedo (#909) to PyVista (#1066).
pyproject.toml was updated (animation extra = pyvista + imageio-ffmpeg)
but requirements-optional.txt still pinned the now-unused vedo and was
missing the new deps. Drop vedo and add pyvista/imageio-ffmpeg so both
dependency sources agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gui-FernandesBR added a commit that referenced this pull request Jul 19, 2026
* ENH: `Function` vectorized speed-up and refactor (#1049)

* MNT: deduplicate function arithmetic logic.

ENH: modularize function arithmetic and source dispatch.

MNT: refactor function math modules.

MNT: optimize function math speed.

* MNT: enhance parachute trigger evaluation for speed.

* MNT: improve typing stack on Function evaluation.

* MNT: architecture corrections and optimizations.

* TST: attempt at tests re-run.

* MNT: minor fixes and docstring update.

* DOC: Update Changelog for PR #1049

* ENH: Interactive 3D Flight Trajectory and Attitude Animation. (#1066)

* ENH: Interactive 3D Flight Trajectory and Attitude Animation.

* TST: update actions workflow dependencies for headless run.

* MNT: solve plot animation review comments on styling.

* DOC: Update Changelog for PR #1066

* MNT: Remove unused pylint disable statements. (#1067)

* DOC: Update Changelog for PR #1067

* TST: cover PyVista flight animation helpers and fix docstring

Fixes the two CI failures on the develop -> master sync (PR #1068):

- DOC/build-docs: the ``color_by`` parameter of ``animate_trajectory``
  used the numpydoc ``{...}`` value-set syntax split across two lines,
  which numpydoc rejects ("invalid value set (missing closing brace)").
  Because the docs job builds with ``-W`` (warnings as errors) the build
  failed. Rewrite the type as a single-line prose description.

- codecov/patch and codecov/project: the new PyVista animation subsystem
  in ``_FlightPlots`` was only exercised by a single minimal off-screen
  smoke test, leaving the scene builders and the pure geometry/telemetry
  helpers uncovered. Add unit tests for the render-independent helpers
  (quaternion rotation, polylines, camera paths, option validation, event
  markers, telemetry panels, background palette, etc.) and extend the
  off-screen integration tests to drive the full set of overlays (charts,
  camera tracking, stability markers, playback controls) and the GIF
  export path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VW2VidZmPd93dd8xW8BX2J

* DOC: Update Changelog for PR #1069

* ENH: Add optional `max time` to `stochastic_flight` and create `stochastic_flight` objects with attributes in base flight (#1070)

* Add max_time option to stochastic_flight

* Update: use default attributes in flight object for stochastic flights

* Add tests to check attributes

* Refactor implementation

* MNT: pre-release v1.13.0 cleanup — changelog consolidation + optional deps sync (#1073)

* DOC: consolidate and clean v1.13.0 changelog for release

- Fold the Unreleased section into v1.13.0 and date it 2026-07-19.
- Drop reverted PR #958 entries (parachute abstract-base breaking change)
  and its revert #1063 - neither ever reached a release.
- Consolidate the 3D flight animation into a single #1066 (PyVista) entry;
  drop the superseded Vedo-based #909.
- Remove duplicate entries (#1066, #1067, #1055 in Added, #1047 in Added)
  and the doubled "ENH: ENH:" / "MNT: MNT:" auto-changelog prefixes.
- Drop non-user-facing meta entries (#1062 changelog cleanup, #1069 CI fix)
  and the test-only entry (#1051), per the changelog's own scope rules.
- Add the missing #1070 (max_time for StochasticFlight) entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* MNT: sync optional animation deps in requirements-optional.txt

The 3D flight animation switched from Vedo (#909) to PyVista (#1066).
pyproject.toml was updated (animation extra = pyvista + imageio-ffmpeg)
but requirements-optional.txt still pinned the now-unused vedo and was
missing the new deps. Drop vedo and add pyvista/imageio-ffmpeg so both
dependency sources agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* DOC: Update Changelog for PR #1073

---------

Co-authored-by: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: ZuoRen Chen <180084773+zuorenchen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request, including adjustments in current codes Monte Carlo Monte Carlo and related contents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants