insightsengineering / teal.modules.general

General Purpose Teal Modules
https://insightsengineering.github.io/teal.modules.general/
Other
9 stars 13 forks source link

Pre-release activities #624

Closed donyunardi closed 7 months ago

donyunardi commented 9 months ago

Package level checks

Vignettes level checks

Non-exported functions level checks

Exported functions level checks

Please self-assign by your name next to the module and link to the PR:

extra:

Potential removal of dependencies

Consider:

Update and Apply the Latest Roxygen Documentation Tags

  1. https://github.com/insightsengineering/teal.modules.general/issues/647

Unused functions

Replace val_labels with col_labels

Correct linting

Standardize option Notation

m7pr commented 8 months ago

Hey @insightsengineering/nest-core-dev based on the flow I've observed during other pre-release activities in our packages I allowed myself to divide this card into smaller activities

I hope this will allow more people to be included in the collaboration in this process and will make the review process easier. Please make all PRs to pre-release@main branch, but please do not merge, even when a PR is reviewed and approved. We will merge everything, the moment all PRs to pre-release@main branch are approved and pre-release@main is also approved. My proposition is to have a pre-release@main branch be a branch where we review Package-level checks and then merge all other activities in there, before merging to main.

averissimo commented 8 months ago

Agree! It will require some extra focus when doing exported/non-exported, but I think this will help the review process greatly

chlebowa commented 8 months ago

While looking around for unused functions, I came upon add_facet_labels which is exported but not necessarily should be. Should we look for cases like that as well? Do we have time for such an assessment?

m7pr commented 8 months ago

@chlebowa maybe it's a good comment for https://github.com/insightsengineering/teal.modules.general/pull/659 ? If function is not used in any teal package nor in teal gallery it does not need to be exported.

It is used only in teal.modules.general in tm_g_bivariate so prefixing should be enough and no need for exporting. Examples can be extended for this function with getFromNamespace() (and potentially be removed for CRAN release)

image
chlebowa commented 8 months ago

Prefixing is only for foreign functions. This function (looks to me) is defined in tmg and only used in tmg functions with no apparent exposure to a teal app developer. A function like that should not be exported.

But perhaps there is another reason for this particular function to be exported?

m7pr commented 8 months ago

Yeah, I think you can remove the export. No need for prefixing if it's from tmg, yes, sorry! And only the examples need to be updated as it will not be exported anymore.

averissimo commented 8 months ago

Agree! How did you find this function? Is it an easy process or heavily manual?

chlebowa commented 8 months ago

I was manually going through all functions and searching their names to see whether and when they are called.

m7pr commented 8 months ago

For the automation, maybe there is a way you can list of functions and then grep it's appearance in a directory that contains all teal packages and teal,gallery. And sort functions by the number of apperances, so that the least frequent one can be examined manually?

kartikeyakirar commented 8 months ago

From the namespace file, we can directly check all the exported functions such as add_facet_labels and get_scatterplotmatrix_stats. However, both of these functions are exported and should be internal. I checked this by searching for these functions on the Github search bar for search in organization .

chlebowa commented 8 months ago

I did use the GH search bar to see if it's used in different packages but that is never the first place that I go. It ignores special characters and chops up queries on white space.

averissimo commented 8 months ago

For documentation simplicity and removal of repetitive @return tags I suggest to:

  1. Add to #' @return Object of class `teal_module` to be used in `teal` applications to shared_params
    • R/utils.R
  2. Use #' @inherit shared_params return on all the modules

We should also add a task to this issueto remove all linter errors.

image

kartikeyakirar commented 8 months ago

For documentation simplicity and removal of repetitive @return tags I suggest to:

I agree,

m7pr commented 8 months ago

@averissimo would you like to take the lead on your propositions, or do you need our help?

averissimo commented 8 months ago

I'll do it :+1:

averissimo commented 8 months ago

The PR is up and running -> #670. After it's merged we can either

  1. Change the @return tag on all of the PRs to use this shared
    • after #670 is merged
  2. Merge all documentation PRs and then make a single one that changes all @return to @inherit return shared_params
m7pr commented 8 months ago

I think we can merge #670 into here, and then pull changes to all other PRs that we have for functions

averissimo commented 8 months ago

Moved this comment to it's own issue

donyunardi commented 7 months ago

All works are completed. Closing,