Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when developing teal app #76

Open
donyunardi opened this issue Oct 27, 2022 · 1 comment
Open

Improve error message when developing teal app #76

donyunardi opened this issue Oct 27, 2022 · 1 comment
Labels

Comments

@donyunardi
Copy link

donyunardi commented Oct 27, 2022

Summary

A descriptive error message is crucial for users when creating a teal app or module. Currently, stopifnot() is used for assertion in many of teal packages, without overriding the default message. As a result, users will encounter difficulty deciphering the message and may block development progress.

Definition of Done

  • Replace stopifnot() with checkmate.
  • User should receive a consistent and more user-friendly or actionable error message when developing teal app.

Triggered by:
insightsengineering/teal.transform/issues/99

@donyunardi
Copy link
Author

donyunardi commented Dec 1, 2022

Tasks

  • Decide on better technique to replace stopifnot (checkmate?) I was informed that prior research has been done and checkmate is the appropriate solution.
  • implement changes in teal's framework (teal, teal.data, teal.transform, teal.slice, teal.widget, teal.reporter)
    • We already implemented checkmate in most of the functions but I still see stopifnot in several functions.
  • implement changes in teal's modules (tmg, tmc, to, tg)

Here's a screenshot of the number of lines of code that are still using stopifnot

Per discussion with @pawelru, we will approach this gradually by package instead of tackling them all at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant