insightsengineering / teal.data

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

Add `topological_sort()` to `datanames(teal_data())` and also extend `datanames()` with parent dataset when it is provided in `join_keys` #319

Closed m7pr closed 1 month ago

m7pr commented 1 month ago

Part of https://github.com/insightsengineering/teal/pull/1253

This PR introduced below changes

Will provide testing in this PR in teal as well https://github.com/insightsengineering/teal/pull/1280/files

github-actions[bot] commented 1 month ago

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

m7pr commented 1 month ago

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

m7pr commented 1 month ago

recheck

gogonzo commented 1 month ago

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

github-actions[bot] commented 1 month 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                       22       0  100.00%
R/teal_data-class.R                 26       1  96.15%   69
R/teal_data-datanames.R             20       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                              865      95  89.02%

Diff against main

Filename                   Stmts    Miss  Cover
-----------------------  -------  ------  --------
R/join_keys.R                 +1       0  +100.00%
R/teal_data-class.R           +1       0  +0.15%
R/teal_data-datanames.R      +10       0  +100.00%
TOTAL                        +12       0  +0.15%

Results for commit: 56fc82836bec79abb477175b8470c247840848e0

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 1 month ago

Unit Tests Summary

  1 files   14 suites   2s :stopwatch: 203 tests 201 :white_check_mark: 2 :zzz: 0 :x: 276 runs  274 :white_check_mark: 2 :zzz: 0 :x:

Results for commit 56fc8283.

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

github-actions[bot] commented 1 month ago

Unit Test Performance Difference

Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | datanames | 👶 | | $+0.00$ | datanames_are_set_in_topological_order_in_constructor_if_join_keys_are_specified | | datanames | 👶 | | $+0.00$ | datanames_do_not_return_parent_if_in_constructor_it_was_provided_in_join_keys_but_do_not_exists_in_env | | datanames | 👶 | | $+0.01$ | datanames_do_not_return_parent_if_join_keys_were_provided_and_parent_did_not_exists_in_env | | datanames | 👶 | | $+0.01$ | datanames_return_parent_if_in_constructor_it_was_provided_in_join_keys_and_exists_in_env | | datanames | 👶 | | $+0.01$ | datanames_return_parent_if_join_keys_were_provided_and_parent_exists_in_env | | datanames | 👶 | | $+0.01$ | datanames_return_topological_order_of_datasets_after_datanames_are_called_after_join_keys | | datanames | 👶 | | $+0.01$ | datanames_return_topological_order_of_datasets_once_join_keys_are_specified | | teal_data | 💀 | $0.00$ | $-0.00$ | teal_data_initializes_teal_data_object_with_datanames_taken_from_join_keys_and_passed_objects | | teal_data | 💀 | $0.00$ | $-0.00$ | teal_data_initializes_teal_data_object_with_datanames_taken_from_passed_join_keys | | teal_data | 👶 | | $+0.00$ | teal_data_initializes_teal_data_object_with_datanames_taken_only_from_passed_objects_and_not_join_keys | | teal_data | 👶 | | $+0.00$ | teal_data_initializes_teal_data_object_without_datanames_taken_from_join_keys_if_objects_did_not_exist_in_env |

Results for commit 7b68a03cd1d2f932ae6b2cb71a873b79fc6b29a6

♻️ This comment has been updated with latest results.

gogonzo commented 1 month ago

@m7pr please add a NEWS entry and fix GHA checks

m7pr commented 1 month ago

Hey @gogonzo NEWS enhanced! that was a long one. Fixed lintr and spelling checks as well!

gogonzo commented 1 month ago

👍