easystats / easystats/performance

More flexible `check_*` functions

Open
#249 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Consistency :green_apple: :apple: Feature idea :fire:
Dominant language
R
Stars
1.2k
Forks
109
Avg merge
6h 34m
Merged PRs (30d)
8

Description

Currently, for most of check_* the print is within the function. I.e., the printing occurs during function run rather than output printing (as there is no specific class nor printing methods for check_* objects).

For some check_* this is a limitation as the function might return stuff, or be possibly connected to a plot method.

Thus I think we might want to create a generic "easystats_check" class, and all check_ functions would return a list containing at least a "text" and a "color" object. Then we could add a print method (in insight?) that would print the text with the right colour. This would make thing more flexible.

(an example implementation was added for check_clusterstructure)

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

Review the check_clusterstructure example in easystats/parameters#134 first, then inspect how check_* functions in performance currently print their results. Done means the functions return a common object containing at least text and color, with printing handled separately while preserving support for returned values and plot methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.