feat: add camera rotation field to projects (schema v23)#96
Open
tomaszmrugalski wants to merge 2 commits into
Open
feat: add camera rotation field to projects (schema v23)#96tomaszmrugalski wants to merge 2 commits into
tomaszmrugalski wants to merge 2 commits into
Conversation
Adds a nullable `rotation` column (FLOAT, degrees East of North, 0–360) to the projects table. This is the first piece of data needed for the sky visualisation feature on the frontend. Changes: - db/23-project-rotation.psql: ALTER TABLE migration + schema version bump - api/openapi.yaml: rotation added to Project, ProjectCreate, ProjectUpdate schemas - heveliusbackend/app.py: SELECT cols, marshmallow schemas, _project_row_to_dict, INSERT and PATCH endpoints all updated - tests/test_api.py: 6 new tests covering create/patch/get with rotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a nullable
rotationcolumn to theprojectstable — the first backend piece needed for the sky visualisation feature.rotationstores the nominal camera position angle in degrees (East of North, 0–360), following the same convention as the FITSPAkeyword.NULL(the default) means "not configured", which the frontend will distinguish from an explicit 0° (North up).Files changed
db/23-project-rotation.psqlALTER TABLE projects ADD COLUMN rotation FLOAT DEFAULT NULL+ version bump to 23api/openapi.yamlrotationfield added toProject,ProjectCreate, andProjectUpdateschemasheveliusbackend/app.py_PROJECT_SELECT_COLSconstants, marshmallow schemas,_project_row_to_dict(index 13), POST INSERT, PATCH UPDATEtests/test_api.pyPart of
Sky visualisation feature — frontend work (hevelius-web) follows once this merges.