Would you mind giving this a look? In particular, I'd like to know if you are happy with the accommodation I made in jointcal for the test that uses previously processed catalogs that have the old names and one is used in the FlaggedSourceSelector. The other option I considered is a try/except in the FlaggedSourceSelector itself along the lines:
try:
|
key = sourceCat.schema.find(self.config.field).key
|
except NoResults:
|
# Backwards compatibility with old (pre-DM-14997) source catalogs
|
oldFieldName = self.config.field
|
if any(subStr in oldFieldName for subStr in ("_used", "_reserved", "_candidate")):
|
undIndex = oldFieldName.rfind("_")
|
oldFieldName = replace(oldFieldName[undIndex: undIndex + 2],
|
oldFieldName[undIndex + 1].capitalize())
|
key = sourceCat.schema.find(oldFieldName).key
|
self.log.warn(("Your catalog has old, pre-RFC-498, calib flag naming ({} is now named "
|
"{}). Consider regenerating with an up-to-date stack").
|
format(oldFieldName, self.config.field))
|
|
but I think just editing the jointcal test is less invasive (and is the only place that uses the FlaggedSourceSelector, as far as I can tell).
I've already had a successful Jenkins lsst_distrib + ci_hsc run, but I just had to rebase to some updates on master, so a new one is running now just to be sure.
Also, as soon as this lands, I'm going to announce it as widely as possible via a community post and pings to slack channels (dm-square and desc-ssim/dc2 in particular) and a few individuals where I know (via an all of GitHub search on calib_psfUsed) there are users with notebooks that use some of the old flag names. I will include in the post an example piece of code that would add aliases to a catalog when read in to keep things backwards compatible for anyone wanting to look at catalogs processed with the old and/or new naming (I'm working on that now for pipe_analysis on DM-15109).
Schema naming convention documentation on when to use CamelCase vs. underscores either never existed outside or had been lost to the depths of time. This has been fixed on
DM-14998. Relevant excerpt: