Reducedddatum refactor#1521
Open
Fingel wants to merge 38 commits intoversion-3-0-alphafrom
Open
Conversation
Moves almost all field from the existing model an abstract model from which all models inherit. This means existing ReducedDatums remain unchanged, but 3 new tables are created for the concrete types. A datamigration can be run to convert from the old model to the new (future commit).
Two custom field types that use TextField as storage, but se/deserialize as arrays. Flux being an array of 2-tuple flux/wavelength pairs, and FloatArray as a single array of floats.
value can now be blank
jchate6
requested changes
Apr 27, 2026
Contributor
jchate6
left a comment
There was a problem hiding this comment.
I've made a few preliminary comments.
I also merged v3 into this. Can you take a look at tom_dataservices to see what changes might need to happen there?
Once you are happy with that, please re-request a review.
Contributor
There was a problem hiding this comment.
This code will be abandoned in the next sprint
Contributor
There was a problem hiding this comment.
This will probably be useful when we refactor this into a data service. Thanks!
jchate6
reviewed
Apr 27, 2026
Note that this does not scale, which is fine as long as we are only expecting to scale on the concrete types.
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.
Introduces concrete Reduced Datum types: PhotometryReducedDatum, SpectroscopyReducedDatum, AstrometryReducedDatum, and keeps the original ReducedDatum class as a generic type. This PR attempts to use the concrete types where needed, while maintaining API compatibility. This means the the JSON endpoints will have the same shape, but the underlying storage will use the concrete tables.
It also includes a management command to move existing generic ReducedDatums into their concrete counterparts. Note that many views will no longer populate until this command is run, for example the photometry plot.