easystats / easystats/performance
More flexible `check_*` functions
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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