Skip to content

feat(flight): KML trajectory export endpoint#73

Open
aasitvora99 wants to merge 1 commit into
enh/tank-geometry-fluid-densityfrom
enh/flight-kml-export
Open

feat(flight): KML trajectory export endpoint#73
aasitvora99 wants to merge 1 commit into
enh/tank-geometry-fluid-densityfrom
enh/flight-kml-export

Conversation

@aasitvora99
Copy link
Copy Markdown
Member

GET /flights/{id}/kml returns a KML file of the flight trajectory.

GET /flights/{id}/kml returns a KML file of the flight trajectory.
@aasitvora99 aasitvora99 marked this pull request as ready for review May 17, 2026 20:04
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 015f9320-8a41-46d8-b554-08db7a9f59d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enh/flight-kml-export

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for exporting a flight’s trajectory as a Google Earth KML download via a new GET /flights/{id}/kml endpoint, integrating the route/controller/service layers and covering the new behavior with unit tests.

Changes:

  • Added GET /flights/{flight_id}/kml route returning a KML file download response.
  • Implemented controller + service support for generating KML bytes using RocketPy’s FlightDataExporter.
  • Added route unit tests for success, 404, and 500 cases.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/unit/test_routes/test_flights_route.py Adds unit tests validating KML endpoint response bytes, headers, and error propagation.
src/services/flight.py Implements KML export in FlightService using FlightDataExporter and a temporary file.
src/routes/flight.py Adds the /flights/{flight_id}/kml endpoint returning a KML file download response.
src/controllers/flight.py Exposes get_flight_kml() controller method with standard exception handling wrapper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/services/flight.py
) as tmp:
tmp_path = tmp.name
try:
FlightDataExporter(self._flight).export_kml(file_name=tmp_path)
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