-
-
Notifications
You must be signed in to change notification settings - Fork 202
mnt/extract flight data exporters #845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
mnt/extract flight data exporters #845
Conversation
I really like what I see here... I will take a look at it asap |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #845 +/- ##
===========================================
+ Coverage 80.02% 80.28% +0.26%
===========================================
Files 98 104 +6
Lines 12004 12754 +750
===========================================
+ Hits 9606 10240 +634
- Misses 2398 2514 +116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sounds good, let me know if there's anything that needs to be done or revised before this can be merged to develop...I have some enhancements of the kml export I have in the works and I'd rather not stack the PR branches and have to deal with rebasing later if we can help it :) |
@Gui-FernandesBR Sorry if this PR disappeared for a few days...my account got false flagged by the GitHub bots |
Hi, it's been over a month now and still waiting on a reviewer to be assigned and take a look. I actually spent extra effort trying to make the PR extra nice and clean so it could just get merged quickly...like I said I had intended to continue more PRs concerning file IO but this going stale has kinda thrown a wrench in that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extracts flight data export functionality from the Flight
class into a dedicated FlightDataExporter
class to improve separation of concerns and reduce import-time dependencies.
- Moved four export methods (
export_data
,export_pressures
,export_sensor_data
,export_kml
) fromFlight
toFlightDataExporter
- Added deprecation wrappers in the
Flight
class that delegate to the new exporter - Updated documentation to showcase the new API with migration examples
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
rocketpy/simulation/flight_data_exporter.py |
New class containing extracted export functionality |
rocketpy/simulation/flight.py |
Deprecated export methods now delegate to FlightDataExporter |
rocketpy/simulation/__init__.py |
Re-exports FlightDataExporter for public API access |
tests/unit/test_flight_export_deprecation.py |
Tests verifying deprecation warnings and delegation behavior |
tests/unit/test_flight_data_exporter.py |
Tests for the new exporter class functionality |
docs/user/first_simulation.rst |
Updated examples to use new API with deprecation notes |
CHANGELOG.md |
Documents the deprecation and extraction changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant work!!
@CameronBrooks11 I will just wait a few more days so either @phmbressan or @MateusStano give us a second approve and then we will proceed to merge.
a03cca8
to
a7edc8e
Compare
a7edc8e
to
b88abc4
Compare
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
Export routines for
Flight
live as instance methods inrocketpy/simulation/flight.py
(export_data
,export_pressures
,export_sensor_data
,export_kml
). This mixes simulation with I/O concerns and forces an import-time dependency onsimplekml
for users who do not export.New behavior
FlightDataExporter
atrocketpy/simulation/flight_data_exporter.py
.Flight
methods that delegate toFlightDataExporter
and emitDeprecationWarning
with migration guidance.FlightDataExporter
inrocketpy/simulation/__init__.py
.v1.12.0
.Breaking change
Additional information
Moved to FlightDataExporter.export_data() and will be removed in v1.12.0.
MPLBACKEND=Agg
.