-
-
Notifications
You must be signed in to change notification settings - Fork 206
Fix CSV column header spacing in FlightDataExporter #865
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?
Conversation
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 fixes CSV export headers to remove leading spaces after commas, making column names more accessible when reading with pandas (addresses Issue #864).
- Removed space after comma in CSV header generation for the general export path
- Added comprehensive test to validate CSV column headers have no leading spaces
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rocketpy/simulation/flight_data_exporter.py | Removed space after comma in header string concatenation for custom variable exports |
| tests/unit/test_flight_data_exporter.py | Added test to verify CSV headers don't contain leading spaces and are pandas-compatible |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #865 +/- ##
========================================
Coverage 80.27% 80.28%
========================================
Files 104 104
Lines 12769 12769
========================================
+ Hits 10250 10251 +1
+ Misses 2519 2518 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
900de8d to
b4aef19
Compare
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
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
FlightDataExporter.export_data()generates CSV headers with spaces after commas (e.g.,# Time (s), Vz (m/s)), causing pandas to parse column names with leading spaces (' Vz (m/s)'instead of'Vz (m/s)').Changes
flight_data_exporter.py:159: Remove space after comma in header concatenationtest_flight_data_exporter.py: Add test validating header format and pandas column accessibilityImpact
Before:
After:
Aligns general path behavior with fast path (lines 104-115), which already uses comma-only formatting.
Fixes #864
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.