Skip to content

Conversation

davner
Copy link
Member

@davner davner commented Oct 21, 2025

  • Update GPP API views to utilize the new serializers for cloning functionality.
  • Add unit tests for the new serializers.

Checklist

  • Added a release note in doc/changes using the PR number.

- Update GPP API views to utilize the new serializers for cloning functionality.
- Add unit tests for the new serializers.
@davner davner self-assigned this Oct 21, 2025
@davner davner requested a review from Copilot October 21, 2025 15:55
Copy link

@Copilot 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

This PR introduces new serializers for cloning GPP targets and observations, enabling target and observation duplication through the ToO form with proper validation of input data.

  • Adds CloneTargetSerializer and CloneObservationSerializer to handle and validate clone operation inputs
  • Updates GPPTooViewSet to use the new serializers via _format_clone_observation_input and _format_clone_target_input methods
  • Includes comprehensive unit tests validating both successful and error scenarios for the new serializers

Reviewed Changes

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

Show a summary per file
File Description
src/goats_tom/serializers/gpp/clone_target.py New serializer for validating and formatting target clone inputs including radial velocity, parallax, and proper motion
src/goats_tom/serializers/gpp/clone_observation.py New serializer for validating and formatting observation clone inputs with constraint sets and position angle validation
src/goats_tom/serializers/gpp/init.py Exports the new clone serializers for module-level access
src/goats_tom/api_views/gpp/toos.py Adds methods to format clone inputs using the new serializers and updates exception handling to use proper ValidationError
tests/goats_tom/serializers/gpp/test_clone_target.py Unit tests for CloneTargetSerializer covering valid inputs and validation errors
tests/goats_tom/serializers/gpp/test_clone_observation.py Unit tests for CloneObservationSerializer including angle constraint validation
tests/goats_tom/api_views/gpp/test_toos.py Test coverage for the new formatting methods and updated existing tests to use correct exception types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 98.05195% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.70%. Comparing base (9a9229a) to head (6fee0c8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/goats_tom/serializers/gpp/clone_observation.py 93.93% 2 Missing ⚠️
src/goats_tom/serializers/gpp/clone_target.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
+ Coverage   78.36%   78.70%   +0.33%     
==========================================
  Files         256      260       +4     
  Lines        8164     8307     +143     
  Branches      487      489       +2     
==========================================
+ Hits         6398     6538     +140     
- Misses       1677     1680       +3     
  Partials       89       89              

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davner davner merged commit 945b2f1 into main Oct 21, 2025
6 checks passed
@davner davner deleted the GOATS-961_GOATS-983/clone-target-observation-serializers branch October 21, 2025 16:01
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.

1 participant