Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: obs_base
-
Labels:
-
Story Points:2
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
The collection names recommended by RFC-741/DMTN-167 specify that some data repositories (e.g. those for DESC DC2 simulations) should not use the instrument name as the prefix for most collection names, because that is some combination of insufficient for uniqueness or redundant.
The Instrument class currently hard-codes its own name in all of its methods that generate collection names, however. I think the right fix is to:
- Make all collection-name methods on Instrument instance methods instead of classmethods.
- Give Instrument's constructor (and those of its subclasses, and the fromName method) an optional collection_prefix argument, which would default to the instrument's own name.
- Make code that uses Instrument to make connection names have a way to customize Instrument construction, as needed.
Someday in the future, we may want to make it so fromName can look up different, per-data-repository defaults, but I'm not planning to do that on this ticket; that seems like it'd be convenient when we're not using the Instrument name only because it's redundant with the data repo name, but inadequate when a single repo has multiple collection prefixes for the same instrument.
I think this is ready for review (final Jenkins running now; might yield some changes in ci_hsc, too). All nontrivial changes are in obs_base, and as you've already seen, the changes in obs_decam and obs_cfht won't last beyond your removal of the specialized ingest tasks there. Also a two-char change in obs_subaru.