insightsengineering / teal.data

Data model for teal applications
https://insightsengineering.github.io/teal.data/
Other
8 stars 7 forks source link

310 fix `get_code` for code included in curly brackets `{}` #311

Closed m7pr closed 4 months ago

m7pr commented 4 months ago

Fixes #310

This fix ensure we remove curly brackets from the code passed via character. If it is put in curly brackets it is treated as oneliner and everything crashes.

github-actions[bot] commented 4 months ago

CLA Assistant Lite bot ✅ All contributors have signed the CLA

github-actions[bot] commented 4 months ago

Unit Tests Summary

  1 files   14 suites   2s :stopwatch: 195 tests 193 :white_check_mark: 2 :zzz: 0 :x: 268 runs  266 :white_check_mark: 2 :zzz: 0 :x:

Results for commit 4cfe1f40.

:recycle: This comment has been updated with latest results.

m7pr commented 4 months ago

I have read the CLA Document and I hereby sign the CLA

github-actions[bot] commented 4 months ago

Unit Test Performance Difference

Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | get_code | 👶 | | $+0.01$ | handles_the_code_included_in_curly_brackets | | get_code | 👶 | | $+0.04$ | ignores_occurrence_in_a_function_definition_if_there_is_multiple_function_definitions |

Results for commit 1f101b423ad47dca849f2e4fb020b7218a5552d0

♻️ This comment has been updated with latest results.

github-actions[bot] commented 4 months ago

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  --------------------
R/cdisc_data.R                       1       0  100.00%
R/deprecated.R                      57      57  0.00%    19-344
R/dummy_function.R                   2       2  0.00%    14-15
R/formatters_var_labels.R           61       0  100.00%
R/join_key.R                        38       0  100.00%
R/join_keys-c.R                     12       0  100.00%
R/join_keys-extract.R              128       0  100.00%
R/join_keys-names.R                 15       0  100.00%
R/join_keys-parents.R               30       0  100.00%
R/join_keys-print.R                 45       0  100.00%
R/join_keys-utils.R                 73       3  95.89%   35-38
R/join_keys.R                       21       0  100.00%
R/teal_data-class.R                 25       1  96.00%   69
R/teal_data-datanames.R             10       0  100.00%
R/teal_data-get_code.R              14       0  100.00%
R/teal_data-show.R                   4       4  0.00%    14-19
R/teal_data.R                       30      16  46.67%   33, 36-42, 52-58, 61
R/testhat-helpers.R                 26       0  100.00%
R/topological_sort.R                32       0  100.00%
R/utils-get_code_dependency.R      187       1  99.47%   282
R/verify.R                          42      11  73.81%   65, 95-99, 102-106
TOTAL                              853      95  88.86%

Diff against main

Filename                         Stmts    Miss  Cover
-----------------------------  -------  ------  -------
R/utils-get_code_dependency.R       +3       0  +0.01%
TOTAL                               +3       0  +0.04%

Results for commit: 4cfe1f400e71ec7d1b603c723ef1caad4fb1c46c

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results