Fix Version/s: None
While converting PhotoCalib to be defined in nanojansky, I realized it would be good to add versioning to its persisted output. Jim Bosch says that SkyWcs is probably the best example of how to do this (sadly, we have neither a standard nor a common convention for how to version persisted afw objects).
For example, we are going to want to add a wavelength dependency in the future, which will definitely change the persistence.
- is triggered by
DM-16650 Use nJy in PhotoCalib as the unit for calibrated fluxes
Jim Bosch: A quick review to tell me if this is what you had in mind? I added two files, one with the (default until now) no version, and one with an explicit version 0 (which I expect won't ever be used, since
DM-16650 should be merged soon).
I couldn't get it to work putting the version at the beginning of the schema, so unfortunately it goes at the end. Are schemas append only, or is there a way to rework it to allow the version to be the first thing from now on?
Jira's not picking up the PR, so here it is: https://github.com/lsst/afw/pull/422
Looks good. Schemas are indeed append-only, and while you could play some games with SchemaMapper to move the version to the beginning, I definitely think it's better to just put it at the (current) end. Where it appears in the sequence of fields is pretty hidden, anyway.
Thanks for the speedy review! Good call on pulling stuff into a getVersions()). I took out everything except the "throw on unknown versions" part.
Merged and done.
Might want to do this before