Skip to content

Commit 091415d

Browse files
committed
Add '--show inputs' option to 'pipetask build'.
1 parent ce79fef commit 091415d

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

doc/changes/DM-52738.feature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds the `--show inputs` option to `pipetask build`.

python/lsst/ctrl/mpexec/cli/opt/options.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@
322322
show subset labels and associated tasks; ``uri`` to show
323323
predicted dataset URIs of quanta; ``pipeline-graph`` for a
324324
text-based visualization of the pipeline (tasks and dataset types);
325-
``task-graph`` for a text-based visualization of just the tasks.
325+
``task-graph`` for a text-based visualization of just the tasks;
326+
``inputs`` for a list of overall-input dataset types.
326327
With -b, pipeline-graph and task-graph include additional information.
327328
"""
328329
),

python/lsst/ctrl/mpexec/showInfo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class ShowInfo:
113113
"pipeline-graph",
114114
"task-graph",
115115
"subsets",
116+
"inputs",
116117
}
117118
graph_commands = {"graph", "workflow", "uri"}
118119

@@ -186,6 +187,14 @@ def show_pipeline_info(self, pipeline_graph_factory: PipelineGraphFactory) -> No
186187
visualization.show(
187188
pipeline_graph_factory(visualization_only=True), self.stream, dataset_types=False
188189
)
190+
case "inputs":
191+
pg = pipeline_graph_factory(visualization_only=True)
192+
for dataset_type_name, dataset_type_node in sorted(pg.iter_overall_inputs()):
193+
print(
194+
dataset_type_name,
195+
dataset_type_node.dimensions,
196+
dataset_type_node.storage_class_name,
197+
)
189198
case _:
190199
raise RuntimeError(f"Unexpectedly tried to process command {command!r}.")
191200
self.handled.add(command)

0 commit comments

Comments
 (0)