Skip to content

revisit why print.workflow() re-implements print methods for its stages #236

Open
@simonpcouch

Description

@simonpcouch

workflows rewrites print methods for each of its stage for printing. We should revisit why this is the case, and either 1) document in a code comment why it is that we're rewriting those methods, or 2) re-implement the postprocessor printing in print.workflow()

workflows/R/workflow.R

Lines 473 to 479 in 9e6ca98

# TODO: currently this function just captures and reprints the tailor
# print method. other workflows methods define their own print methods;
# considering doing so or refactoring.
# TODO: this snap currently includes some NA return values and marks the
# following output as a message rather than output.
tailor_print <- utils::capture.output(tailor, type = "message")
cat_line(tailor_print[3:length(tailor_print)])

Notably, the oddity with tailor printing's output currently is that, when in a trained workflow, both the workflow and its postprocessor stage have a tag marking themselves as "[trained]".

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions