Skip to content

TST/DOC: fix build-docs and codecov failures from the PyVista animations#1069

Merged
Gui-FernandesBR merged 1 commit into
developfrom
claude/pr-1068-ci-failures-q35rzb
Jul 19, 2026
Merged

TST/DOC: fix build-docs and codecov failures from the PyVista animations#1069
Gui-FernandesBR merged 1 commit into
developfrom
claude/pr-1068-ci-failures-q35rzb

Conversation

@Gui-FernandesBR

Copy link
Copy Markdown
Member

Pull request type

  • Code maintenance (refactoring, formatting, tests)
  • ReadMe, Docs and GitHub updates

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (ruff check / ruff format --check / pylint) has passed locally
  • Relevant tests (tests/unit/test_plots.py, tests/integration/test_plots.py) have passed locally (off screen, under Xvfb)
  • CHANGELOG.md has been updated (if relevant)

Current behavior

The develop -> master sync (#1068) is red on two checks, both caused by the new PyVista 3D flight animation subsystem in rocketpy/plots/flight_plots.py:

  • build-docs (3.12) fails. The docs job builds Sphinx with -W (warnings treated as errors) and emits a single warning:

    rocketpy/plots/flight_plots.py:docstring of ...animate_trajectory:
    WARNING: invalid value set (missing closing brace):
    {"speed", "mach", "dynamic_pressure", "acceleration",
    

    The color_by parameter used the numpydoc {...} "set of values" syntax split across two physical lines, which numpydoc cannot parse.

  • codecov/patch (74.77%) and codecov/project fail. The animation subsystem (~1000 new lines: scene builders, geometry/telemetry helpers, option parsing, the render loop) was only exercised by one minimal off-screen smoke test, so most of it counted as uncovered — dropping project coverage ~1% below the base and patch coverage below the 5% threshold.

New behavior

  • Docs: rewrote the color_by type as a single-line prose description (str | bool | None, one of ...), so numpydoc parses it cleanly and the -W build succeeds. Verified with numpydoc.docscrape.FunctionDoc that the docstring now parses without warnings.

  • Coverage: added tests instead of suppressing coverage, so the logic is genuinely checked:

    • New unit tests in tests/unit/test_plots.py for the render-independent helpers: quaternion → rotation matrix, safe unit vector, color scheme / override validation, scalar metadata, polyline & dashed-polyline builders, direction arrow, camera-path interpolation and camera-mode updates, chart-cursor updates, background palette (day/night/explicit) and altitude blending, _animation_options defaults and every validation error, ground-image bounds (ENU + lat/lon + errors), model-path / time-range validation, position/velocity/wind/scalar samplers, event markers, phase labels and telemetry panels.
    • Extended the off-screen integration tests in tests/integration/test_plots.py to drive both animations with the full overlay set (color-by, kinematic/attitude charts, subrocket point, camera tracking, CP/CM stability markers, playback controls) and to cover the deterministic GIF export path.

    Locally this raises flight_plots.py animation coverage from ~286 missing lines to ~88 (the residual being the genuinely interactive timer/widget callbacks that only fire in a live event loop), which brings patch coverage to ~88% and project coverage above the base.

No production behavior changes — only a docstring edit and new tests.

Breaking change

  • No

Additional information

The animation methods require a display; the new integration tests render off screen (backend="none", off_screen=True) exactly like the existing smoke test and are guarded with pytest.importorskip("pyvista") / pytest.importorskip("imageio"). CHANGELOG.md intentionally left untouched per discussion in #1068.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VW2VidZmPd93dd8xW8BX2J


Generated by Claude Code

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
@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner July 19, 2026 01:03
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.18%. Comparing base (ce3342f) to head (e0ff281).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1069      +/-   ##
===========================================
+ Coverage    80.85%   82.18%   +1.32%     
===========================================
  Files          122      122              
  Lines        16355    16355              
===========================================
+ Hits         13224    13441     +217     
+ Misses        3131     2914     -217     

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

@Gui-FernandesBR
Gui-FernandesBR merged commit 538d4ca into develop Jul 19, 2026
11 checks passed
@Gui-FernandesBR
Gui-FernandesBR deleted the claude/pr-1068-ci-failures-q35rzb branch July 19, 2026 01:14
wuisabel-gif pushed a commit to wuisabel-gif/RocketPy that referenced this pull request Jul 19, 2026
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants