Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 4, 2025

Refactoring object_position_server from Flask to FastAPI

Analysis Complete

  • Explore repository structure and current implementation
  • Understand current Flask-based API with 2 endpoints: /catalog and /position
  • Review current deployment using waitress-serve on port 8876
  • Examine Docker setup and dependencies

Plan for FastAPI Migration

  • Create new FastAPI main.py with equivalent endpoints
  • Convert Flask request parsing to FastAPI query parameters
  • Update error handling to use FastAPI HTTPException
  • Replace waitress with uvicorn in Dockerfile
  • Update docker-compose.yml for FastAPI deployment
  • Test API functionality and OpenAPI docs
  • Update documentation and comments

Current endpoints to migrate:

  • GET /catalog - Object positions in local horizontal coordinates
  • GET /position - SV positions in ECEF coordinates

Key changes needed:

  • Flask app → FastAPI app
  • Flask decorators → FastAPI decorators (@app.get)
  • request.args → FastAPI Query parameters
  • waitress-serve → uvicorn main:app
  • Automatic OpenAPI docs at /docs

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@tmolteno tmolteno marked this pull request as ready for review August 4, 2025 23:34
@Copilot Copilot AI requested a review from tmolteno August 5, 2025 00:31
Copilot stopped work on behalf of tmolteno due to an error August 5, 2025 00:31
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