-
Notifications
You must be signed in to change notification settings - Fork 2
GOATS-985 GOATS-987: Build payload for creating ToO. #467
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
GOATS-985 GOATS-987: Build payload for creating ToO. #467
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 implements payload building functionality for creating Target of Opportunity (ToO) observations in GPP. The changes refactor serializers to use nested data structures, introduce new serializers for sidereal targets and observing modes, and update tests to reflect changes in field names and API structure. Key functionality includes appending target IDs to form data and properly structuring instrument-specific configurations.
- Introduced
SiderealSerializer
andObservingModeSerializer
for handling target and observing mode properties - Refactored GMOS serializers to wrap validated data in instrument-specific keys (
gmos_north_long_slit
,gmos_south_long_slit
) - Updated field name from 'unit' to 'units' throughout brightness-related code
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/goats_tom/static/js/gpp/gpp.js | Adds target ID to form data in createTooObservation method |
src/goats_tom/serializers/gpp/sidereal.py | New serializer for sidereal target properties with validation |
src/goats_tom/serializers/gpp/observing_mode.py | New serializer for observing mode input with instrument registry integration |
src/goats_tom/serializers/gpp/instruments/registry.py | Simplified registry by removing input model mapping functionality |
src/goats_tom/serializers/gpp/instruments/gmos_*.py | Added nested structure wrapping for validated data |
src/goats_tom/serializers/gpp/clone_target.py | Simplified to only handle target ID validation |
src/goats_tom/serializers/gpp/clone_observation.py | Added scienceRequirements field to validated data |
src/goats_tom/serializers/gpp/brightnesses.py | Changed field name from 'unit' to 'units' and added debug print |
src/goats_tom/api_views/gpp/toos.py | Refactored to use new serializers and added debug print statements |
tests/goats_tom/serializers/gpp/test_*.py | Updated tests for new serializer behavior and field name changes |
tests/goats_tom/api_views/gpp/test_toos.py | Removed deprecated tests and added new tests for observing mode |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #467 +/- ##
==========================================
- Coverage 78.91% 78.63% -0.29%
==========================================
Files 264 269 +5
Lines 8390 8504 +114
Branches 490 493 +3
==========================================
+ Hits 6621 6687 +66
- Misses 1680 1727 +47
- Partials 89 90 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add target ID to form data in GPPModel's createTooObservation method. - Update test suite for GPPTooViewSet to remove deprecated tests and add new tests for observing mode properties. - Refactor GMOS North and South Long Slit serializers to include nested structure for inputs. - Correct code and unit tests to reflect changes in field names from 'unit' to 'units' in brightness tests. - Remove obsolete test files for CloneObservation and CloneTarget.
c63eef5
to
adc9747
Compare
Checklist
doc/changes
using the PR number.