getSchemaCatalogs() breaks Task encapsulation: remove it

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 , 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.

Checklist

Issue Matrix

hide

Lucidchart Diagrams

Activity

Jim Bosch November 18, 2022 at 7:58 PM

Looks good, and good luck with the unrelated MyPy failures in pipe_base.

 

Tim Jenness November 18, 2022 at 7:55 PM

Sorry. Done now.

Jim Bosch November 18, 2022 at 7:34 PM

Mind making the PRs so approving them works properly?

Tim Jenness November 17, 2022 at 7:56 PM

ci_imsim and ci_hsc_gen3 built fine without getSchemaCatalogs so I think this is ready for review.

Tim Jenness November 16, 2022 at 10:17 PM

I'm running a quick Jenkins run to see what happens if getSchemaCatalogs disappears.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Reviewers

Jim Bosch

Story Points

RubinTeam

Architecture

Components

Checklist

Created June 1, 2015 at 9:48 AM
Updated November 18, 2022 at 8:29 PM
Resolved November 18, 2022 at 8:29 PM