-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
align args asserts; align args defaults; logger in test (#1008)
ready for review Unfortunately it grew more than I expected initially and I should have been split it into few for the review convenience... - align argument assertions Currently on main we have two approaches for assert and convert. Please find below examples (note the order) - `modules`: - assert all classes: https://github.com/insightsengineering/teal/blob/e98eab0a2465a00e05957cefc408ee10185440aa/R/init.R#L121 - convert to the desired: https://github.com/insightsengineering/teal/blob/e98eab0a2465a00e05957cefc408ee10185440aa/R/init.R#L133-L138 - `data`: - convert to the desired: https://github.com/insightsengineering/teal/blob/e98eab0a2465a00e05957cefc408ee10185440aa/R/init.R#L105-L108 - assert classes: https://github.com/insightsengineering/teal/blob/e98eab0a2465a00e05957cefc408ee10185440aa/R/init.R#L120 I decided to follow the latter one. - align argument defaults for `header`, `footer`, etc. - silent logger in tests to avoid the following: ``` ✔ | 7 | rcode_utils ⠏ | 0 | report_previewer_module [INFO] 2023-12-13 16:14:23.5635 pid:41602 token:[] teal Initializing reporter_previewer_module [INFO] 2023-12-13 16:14:23.5663 pid:41602 token:[] teal Initializing reporter_previewer_module ✔ | 5 | report_previewer_module ``` - change error message from "The teal_data_module must ..." into "The data module must ..." as end users don't have to know the name of the class. They are interacting with function arguments like `data` or `modules`. - I noticed that a few tests expects a string with error / warning message that comes from logger. This is wrong as this actually test logger functionality and assumes certain value of logger threshold, appender, layout etc. I changed this to the base warning that is independent on all of those things. Will create a separate task to discuss handler via logger - https://github.com/insightsengineering/teal/issues/1028 --------- Signed-off-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
- Loading branch information
1 parent
7538ecb
commit f20f29f
Showing
16 changed files
with
270 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.