Skip to content

removing internal functions' examples - #198

Merged
kartikeyakirar merged 1 commit into
mainfrom
remove_internal_example
Feb 15, 2024
Merged

kartikeyakirar merged 1 commit into
mainfrom
remove_internal_example

Conversation

@kartikeyakirar

Copy link
Copy Markdown
Contributor

fixes: #181

Note:

  • resolve methods are exported but generic is internal so here example of resolve is removed (resolve is used internally)
  • Earlier this was done to pre-release which has been reverted

@kartikeyakirar
kartikeyakirar requested a review from a team February 14, 2024 16:42
@github-actions

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  ------------------------------------------------------------------------------
R/all_choices.R                       1       0  100.00%
R/call_utils.R                      156     124  20.51%   19-28, 65, 67, 69, 102-345
R/check_selector.R                   33       0  100.00%
R/choices_labeled.R                 153      27  82.35%   68, 74, 79, 86, 102, 221-225, 229-234, 354-355, 357, 363, 390-397
R/choices_selected.R                 81      11  86.42%   210-238, 275
R/column_functions.R                  3       3  0.00%    15-18
R/data_extract_datanames.R           30       8  73.33%   16-20, 83-85
R/data_extract_filter_module.R      102      47  53.92%   91-104, 106-107, 109-126, 142-161
R/data_extract_module.R             298      67  77.52%   129, 134, 151, 154-159, 161, 180-183, 213-259, 499, 504, 686, 697-698, 776-781
R/data_extract_read_module.R        137       7  94.89%   34, 39-41, 43, 138, 155
R/data_extract_select_module.R       32      18  43.75%   29-46
R/data_extract_single_module.R       60       2  96.67%   30, 43
R/data_extract_spec.R                32       0  100.00%
R/filter_spec.R                     186       1  99.46%   280
R/format_data_extract.R              16       1  93.75%   47
R/get_dplyr_call.R                  297       0  100.00%
R/get_merge_call.R                  278      29  89.57%   32-38, 49, 215-224, 391, 407-419
R/include_css_js.R                    5       0  100.00%
R/input_checks.R                     11       2  81.82%   17-18
R/merge_data_utils.R                  2       0  100.00%
R/merge_datasets.R                  134       6  95.52%   123, 249-253
R/merge_expression_module.R          60      11  81.67%   161-166, 184, 362-367
R/Queue.R                            23       0  100.00%
R/resolve_delayed.R                  16       4  75.00%   77-80
R/resolve.R                         113      44  61.06%   179-285
R/select_spec.R                      64       8  87.50%   99, 179-186
R/utils.R                            37      24  35.14%   33-46, 179-192
R/zzz.R                               2       2  0.00%    2-3
TOTAL                              2362     446  81.12%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 7eadfec

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   24 suites   6s ⏱️
189 tests 189 ✅ 0 💤 0 ❌
659 runs  659 ✅ 0 💤 0 ❌

Results for commit 7eadfec.

@m7pr m7pr self-assigned this Feb 15, 2024
@m7pr

m7pr commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

@kartikeyakirar can you export resolve generic?

@averissimo

Copy link
Copy Markdown
Contributor

I don't think this is a good idea as it becomes very similar to resolve_delayed, the method that should be used in modules. (and wrapper around resolve).

Maybe we should leave it as it is for this release.

@kartikeyakirar

kartikeyakirar commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor Author

I don't think this is a good idea as it becomes very similar to resolve_delayed, the method that should be used in modules. (and wrapper around resolve).

I see your point. Since resolve() is used internal and in resolve_delayed() only, perhaps we should consider making all the methods exported also internal.

My apologies I did not know we need to register S3 method regardless of whether or not the generic is exported.
https://cran.r-project.org/web/packages/roxygen2/vignettes/namespace.html

@m7pr

m7pr commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

So we do keep resolve unexported for now and then we rethinkg again : ) ?

@m7pr m7pr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine as it was reviewed already. This is now being merged to main, not pre-releaase

@kartikeyakirar
kartikeyakirar merged commit 11e7555 into main Feb 15, 2024
@kartikeyakirar
kartikeyakirar deleted the remove_internal_example branch February 15, 2024 12:39
@averissimo

averissimo commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor

I thought the discussion was still ongoing, we all find it weird 🙃 but it would be nice to have some context from @gogonzo as he reviewed it at the time.

git blame ftw #76 (comment)

We can unexport resolve. It will be just a S3 method called within resolve_delayed.

resolve_delayed can have two variants resolve_delayed.list(x, datasets, keys = attr(datasets, "join_keys") and resolve_delayed.FilteredData(x, datasets, keys = datasets$get_join_keys())

@kartikeyakirar

Copy link
Copy Markdown
Contributor Author

@averissimo We can continue this discussion on https://github.com/insightsengineering/coredev-tasks/issues/510. In this PR scope, we just wanted to remove the internal function example. In case we export the generic, we will update the reverted example and remove getFromNamespace (once reverted).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove examples for non-exported functions

3 participants