Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_base, pipe_base, pipe_tasks
-
Labels:
-
Story Points:2
-
Team:Architecture
Description
getSchemaCatalogs is not used in gen3 so remove it.
The getSchemaCatalogs() method was added to Task to allow CmdLineTasks to introspect their subtasks for schemas they produce, but it requires the subtasks to report the schemas by butler dataset. This limits subtask reusability by locking them into producing a particular Butler dataset (or, as in DM-2191, requiring additional arguments from their parent task that they wouldn't need with a better design).
Instead, we should have per-subtask-slot interfaces (i.e. an interface for all subtasks that could fill a particular role in a CmdLineTask) for how the parent tasks should retrieve their schemas. This will require `CmdLineTask` subclasses to implement the `writeSchemas` method themselves, instead of inheriting an implementation from `CmdLineTask` itself.
I've had a look through the code and it seems that we now define getSchemaCatalogs in a few places but there is no code that ever calls that method. There is also no usage of getAllSchemaCatalogs. Should all the getSchemaCatalogs methods be removed?