Add Quantity annotation type for unit support
Fixes #13 (closed)
Adds a dm.Quantity[unit] annotation type that works like the Astropydantic one (but is a bit simpler), and allows different serialzations, e.g. to FITS using the context option in model_dump(). This is backward compatible from the user side, except that now reading models that have units will return astropy Quantities instead of bare floats. For developers, changes where the unit metadata is added (in the annotation instead of the AstroField).
- Fix unit handling in PlantUML/LaTeX output: needs to read from the annotation.
- Ensure JSONSchema is still correct
- Migrate existing models to use new annotation
- Ensure FITS output still works as expected (using serialization context)
Edited by Karl Kosack