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

return ls(@env) if @datanames not specified #330

Closed
wants to merge 1 commit into from

Conversation

gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Aug 30, 2024

teal.data::datanames() should return ls(@env) if is not specified. IMO datanames<- function shouldn't be supported and determining module's datanames should be done through module$datanames only. teal.data::datanames has been created only for teal-app to limit datanames. For teal.data package it doesn't have any usage at all and should be deprecated in the future. I think that we should use ls(get_env(<teal_data>)) instead in teal.

Copy link
Contributor

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             29       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                              872      95  89.11%

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       +9       0  +100.00%
TOTAL                         +7       0  +0.09%

Results for commit: efcd0d1

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Aug 30, 2024

Unit Tests Summary

  1 files   14 suites   2s ⏱️
204 tests 202 ✅ 2 💤 0 ❌
277 runs  275 ✅ 2 💤 0 ❌

Results for commit efcd0d1.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Aug 30, 2024

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
datanames 👶 $+0.00$ datanames_returns_all_object_names_from_env_if_datasets_not_specified

Results for commit ab31046

♻️ This comment has been updated with latest results.

@m7pr
Copy link
Contributor

m7pr commented Aug 30, 2024

I was wondering the other day what is the actual point of teal_data@datanames if we focus on managing module datanames with a parameter or extra set_datanames function. I am leaning toward the removal of this field and function for sure. ls(get_env(<teal_data>)) could have a useful wrapper ls_env(teal_data) in teal or in teal_data

@gogonzo
Copy link
Contributor Author

gogonzo commented Sep 2, 2024

Not needed

@gogonzo gogonzo closed this Sep 2, 2024
@gogonzo gogonzo deleted the 1298_teal_datanames@main branch September 2, 2024 07:11
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants