tidymodels / tidymodels/workflows

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

Open
#236 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature tidy-dev-day :nerd_face:
Dominant language
R
Stars
211
Forks
26
Avg merge
1h 58m
Merged PRs (30d)
1

Description

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()

https://github.com/tidymodels/workflows/blob/9e6ca982f8cd381cf4601cceb64f5ad323737476/R/workflow.R#L473-L479

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]".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in R/workflow.R at the print.workflow implementation around lines 473-479, and inspect how it rewrites stage print methods and formats trained workflows. Document the reason for that behavior in a code comment or re-implement postprocessor printing there; done means the trained workflow output no longer shows the unexplained duplicate "[trained]" tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.