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

Pre-release activities (prepare for CRAN release) #176

Merged
merged 68 commits into from
Feb 14, 2024

Conversation

averissimo
Copy link
Contributor

@averissimo averissimo commented Feb 7, 2024

Pull Request

Fixes #172

Summary

  • Review and update:
    • README.md (check example code)
    • NEWS.md
      • one liner change
  • Review functions:
    • @example tag, make sure it runs, fix if otherwise
    • Make sure functions has @return tag to document the return value
    • no \dontrun tag, replace with if(interactive()) if needed
      • merge_datasets example is insufficient
  • Package Title is not duplicated in Package Description in DESCRIPTION file (e.g. this happens in teal.slice currently)
  • You have checked the Package Release Template https://github.com/insightsengineering/teal.reporter/pull/205/files
  • Make sure there are no ::: in examples
    • if you need to retain the example that uses :::, use getFromNamespace() function.
  • remove package:: call and depend package:: call from example. @kartikeyakirar
  • Make sure all teal.* mentions are lower-cased and quoted
  • Make sure each link to our documentation hosted with pkgdown on github pages do not have /main/ in the address
    • it should have has /latest-tag/ instead
    • so we always expose the documentation of the latest release and not what's currently on main branch but not yet released
  • Remove old rd syntax
  • Switch from title case into sentence case for title and description of functions.
  • All package names in Title and Description fields of DESCRIPTION file are quoted with ' (not backtick)
  • Sanity check of all vignettes, make sure there is no typo, no wrong format, etc. @kartikeyakirar

New

  • Remove prefixes from data calls rADRS, rADTTE, etc... (just like {teal.data})
  • Remove return wrapper if it is the last expression (per NEST guidelines)
  • Remove exception in .lintr: indentation_linter = NULL
  • Test for unused functions (in package and overall in NEST) @averissimo
    • PR request against this feature branch
    • 🛑 This should not be done on this release as it may have unintended consequences.
  • Standard order of roxygen2 tags
    • @title ➡️ @doctype ➡️ @description ➡️ @details ➡️ @rdname ➡️
    • ➡️ @inheritParams ➡️ @params ➡️ @return ➡️ @seealso ➡️ @references ➡️
    • ➡️ @examples ➡️ @export ➡️ @keywords ➡️ @noRd
  • Remove @noMd (in favor of Roxygen: list(markdown = TRUE) in DESCRIPTION)

To consider?

  • Convert "# nolint" to specific rule exception
  • Added resolve() to the list of exported functions as the sub-functions are exported (resolve.delayed_variable_choices, ...).
    • Let's discuss if this needs to be reverted.
    • Edit: this is a trick to have S3methods internally as resolve should not be exported see aff0f35

Move to its own issue

After checklist is completed (🚨 blocked until checklist is completed)

  • Run urlchecker::url_check() to identify broken links and fix
  • Run R CMD check --as-cran make sure everything pass
  • Make Sure inst/WORDLIST is minimalized

Content review (🚨 blocked for now)

All tasks above are mostly focused on structure, standards and cleanup. Here is to look at content

What to look for:

  • Review content of titles, descriptions, params, etc.
    • They should be clear to the reader
  • Review vignettes
    • Review content
    • All chunks of code are runnable

Content-related tasks should have a PR against this feature branch.

@averissimo averissimo changed the title chore: update to roxygen2 7.3.1 Pre-release activities (prepare for CRAN release) Feb 7, 2024
Copy link
Contributor

github-actions bot commented Feb 7, 2024

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, 75, 77, 79, 123-464
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%   96-109, 111-112, 114-131, 159-178
R/data_extract_module.R             298      67  77.52%   138, 143, 160, 163-168, 170, 189-192, 222-268, 508, 513, 695, 706-707, 785-790
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%   37-54
R/data_extract_single_module.R       60       2  96.67%   35, 48
R/data_extract_spec.R                32       0  100.00%
R/filter_spec.R                     186       1  99.46%   302
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, 243-252, 419, 435-447
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, 279-283
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%   237-343
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
-----------------------  -------  ------  --------
R/check_selector.R            +1       0  +100.00%
R/choices_labeled.R           -5       0  -0.56%
R/choices_selected.R          +1       0  +0.17%
R/data_extract_module.R       -2      -1  +0.18%
R/get_dplyr_call.R            -4       0  +100.00%
R/get_merge_call.R            -2       0  -0.07%
R/merge_datasets.R            -1       0  -0.03%
R/resolve.R                   -1       0  -0.34%
R/select_spec.R               +1       0  +0.20%
TOTAL                        -12      -1  -0.05%

Results for commit: 0b7de57

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Feb 7, 2024

Unit Tests Summary

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

Results for commit 0b7de57.

♻️ This comment has been updated with latest results.

@averissimo averissimo force-pushed the 178_pre-release-cleanup@main branch from d57332c to 7765c0b Compare February 7, 2024 10:34
R/merge_datasets.R Outdated Show resolved Hide resolved
R/utils.R Outdated Show resolved Hide resolved
R/utils.R Outdated Show resolved Hide resolved
_pkgdown.yml Outdated Show resolved Hide resolved
@averissimo
Copy link
Contributor Author

Hey @averissimo can you open an extra issue for detection of not used functions? I think we can list all functions in the package and check with grep, if they are used in other teal packages or teal.gallery with

grep --include=\*.R --recursive '.' -e 'function_name'

Created this one: #196

Btw, the script uses grep via system call and then {crayon} to enhance the readability :-)

# Pull Request

<!--- Replace `#nnn` with your issue link for reference. -->

Part of #172

#### Changes description

- Add new regex style to object_name_linter to account for ADaM
variables.
  - See `.lintr` file
- `regexes = c(ANL = "^ANL_?[0-9]*$", ADaM =
"^r?ADSL|ADTTE|ADLB|ADRS|ADAE$"))`
- Allows for variables named `ANL` with optional underscore and numbers
after.
- note: can't use groups (`(rule_within_parenthesis)`) due to
[r-lib/lintr/issues/2188](r-lib/lintr#2188)
not being released yet.
- Convert other `# nolint` to specific `# nolint: <rule name>.` for
specificity

---------

Signed-off-by: André Veríssimo <[email protected]>
Co-authored-by: m7pr <[email protected]>
@kartikeyakirar kartikeyakirar mentioned this pull request Feb 14, 2024
@kartikeyakirar
Copy link
Contributor

@averissimo Great work! 🚀 I checked the checklist and everything looks good. I created a small PR for minor changes.Please review and let me know your thoughts on that. #197

kartikeyakirar and others added 5 commits February 14, 2024 19:36
part of #176

I have made minor updates as part of review process
- updated document
- changed tags 
- added some punctuations
- removed unused variable.

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: André Veríssimo <[email protected]>
Signed-off-by: André Veríssimo <[email protected]>
Copy link
Contributor

@kartikeyakirar kartikeyakirar left a comment

Choose a reason for hiding this comment

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

@averissimo Looks good to me! I believe it's ready to merge.

@averissimo averissimo merged commit f3c05c6 into main Feb 14, 2024
26 checks passed
@averissimo averissimo deleted the 178_pre-release-cleanup@main branch February 14, 2024 14:25
averissimo added a commit that referenced this pull request Feb 16, 2024
# Pull Request

- Fixes #179

note: waiting on #176 to be merged, before it's ready to be reviewed

#### Changes description

- Removes `{magrittr}` package from `Depends`
- Re-exports pipe from `{dplyr}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-release activities
5 participants