Skip to content

feat: add camera rotation field to projects (schema v23)#96

Open
tomaszmrugalski wants to merge 2 commits into
masterfrom
feature/project-camera-rotation
Open

feat: add camera rotation field to projects (schema v23)#96
tomaszmrugalski wants to merge 2 commits into
masterfrom
feature/project-camera-rotation

Conversation

@tomaszmrugalski

Copy link
Copy Markdown
Collaborator

Summary

Adds a nullable rotation column to the projects table — the first backend piece needed for the sky visualisation feature.

rotation stores the nominal camera position angle in degrees (East of North, 0–360), following the same convention as the FITS PA keyword. NULL (the default) means "not configured", which the frontend will distinguish from an explicit 0° (North up).

Files changed

File Change
db/23-project-rotation.psql New migration: ALTER TABLE projects ADD COLUMN rotation FLOAT DEFAULT NULL + version bump to 23
api/openapi.yaml rotation field added to Project, ProjectCreate, and ProjectUpdate schemas
heveliusbackend/app.py _PROJECT_SELECT_COLS constants, marshmallow schemas, _project_row_to_dict (index 13), POST INSERT, PATCH UPDATE
tests/test_api.py 6 new tests: create with rotation, create without (null default), PATCH sets, PATCH clears with null, GET single, GET list

Part of

Sky visualisation feature — frontend work (hevelius-web) follows once this merges.

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