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 #624

Closed
26 tasks done
donyunardi opened this issue Jan 17, 2024 · 19 comments
Closed
26 tasks done

Pre-release activities #624

donyunardi opened this issue Jan 17, 2024 · 19 comments
Assignees
Labels

Comments

@donyunardi
Copy link
Contributor

donyunardi commented Jan 17, 2024

Package level checks

  • 624 PACKAGE LEVEL pre-release activities #639
  • Review and update:
    • README.md (check example code)
    • NEWS.md
  • Run urlchecker::url_check() to identify broken links and fix
  • Run R CMD check --as-cran make sure everything pass
  • Package Title is not duplicated in Package Description in DESCRIPTION file (e.g. this happens in teal.slice currently)
  • All package names in Title and Description fields of DESCRIPTION file are quoted with '
  • You have checked the Package Release Template https://github.com/insightsengineering/teal.reporter/pull/205/files
  • Make sure all teal.* mentions are lower-cased and quoted
  • Make Sure inst/WORDLIST is minimalized
  • Make sure each link to our documentation hosted with pkgdown on github pages do not have /main/ in the address but it has /latest/ instead, so we always expose the documentation of the latest release and not what's currently on main branch but not yet released,
  • Remove exception in .lintr: indentation_linter = NULL
  • Remove @nomd (in favor of Roxygen: list(markdown = TRUE) in DESCRIPTION)

Vignettes level checks

Non-exported functions level checks

Exported functions level checks

  • 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
    • Standard order of roxygen2 tags
    • @title ➡️ @doctype ➡️ @description ➡️ @details ➡️ @rdname ➡️
    • ➡️ @inheritParams ➡️ @params ➡️ @return ➡️ @seealso ➡️ @references ➡️
    • ➡️ @examples ➡️ @export ➡️ @keywords ➡️ @noRd
  • Make sure there are no ::: in examples
    • if you need to retain the example that uses :::, use getFromNamespace() function.
  • Remove return wrapper if it is the last expression (per NEST guidelines)

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

extra:

Potential removal of dependencies

Consider:

  • Pre-release activities - Potential removal of dependencies #643
  • Removal of {magrittr} by importing pipe operator from {dplyr} ✔️ done
  • Other packages that can be easily removed ✔️ removed tidyselect as its functions are reexported from dplyr
  • Move any of the packages from Depends -> Imports
    • {ggmosaic}impossible (see on issue)
    • {ggplot2}impossible (see on issue)
    • {shinyTree} ✔️ done
    • {teal.transform}valid: teal.transform functions should be available to tmg users
    • {teal}valid: teal dependency is standard in all module packages
    • {shiny}valid: like teal, module packages use shiny extensively
  • Make sure Config/Needs/verdepcheck and pre-commit config are updated

Update and Apply the Latest Roxygen Documentation Tags

  1. Pre-release activities - Update and apply the latest roxygen documentation tags #647

Unused functions

Replace val_labels with col_labels

Correct linting

Standardize option Notation

@m7pr m7pr self-assigned this Feb 12, 2024
@m7pr
Copy link
Contributor

m7pr commented Feb 19, 2024

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

  • Package level checks
  • Vignettes level checks
  • Exported functions level checks
  • Non-exported functions level checks

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
Copy link
Contributor

averissimo commented Feb 19, 2024

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

@chlebowa
Copy link
Contributor

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
Copy link
Contributor

m7pr commented Feb 21, 2024

@chlebowa maybe it's a good comment for #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
Copy link
Contributor

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
Copy link
Contributor

m7pr commented Feb 21, 2024

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
Copy link
Contributor

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

@chlebowa
Copy link
Contributor

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

@m7pr
Copy link
Contributor

m7pr commented Feb 21, 2024

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
Copy link
Contributor

kartikeyakirar commented Feb 21, 2024

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
Copy link
Contributor

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 added a commit that referenced this issue Feb 26, 2024
averissimo added a commit that referenced this issue Feb 26, 2024
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
part of
#624

~~blocked by
#651

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: Marcin <[email protected]>
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
part of
#624

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: Marcin <[email protected]>
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
part of
#624

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: Vedha Viyash <[email protected]>
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
part of
#624

---------

Co-authored-by: go_gonzo <[email protected]>
kartikeyakirar added a commit that referenced this issue Feb 26, 2024
part of
#624

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: André Veríssimo <[email protected]>
averissimo added a commit that referenced this issue Feb 26, 2024
# Pull Request

Part of #624

Follow-up to:

- #643

### Changes description

- Removes `magrittr` from `Config/Needs/verdepcheck`
- Re-order `verdpecheck` with same order on `Depends`, `Imports`,
`Suggests`
- Re-order `pre-commit` config with same order on `Depends`, `Imports`,
`Suggests`
- Add remote repo to `htmlwidgets/sparkline` (despite not being updated
in years) in `verdepcheck`
kartikeyakirar added a commit that referenced this issue Feb 27, 2024
part of
#624

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: Vedha Viyash <[email protected]>
kartikeyakirar added a commit that referenced this issue Feb 27, 2024
part of
#624

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
averissimo added a commit that referenced this issue Feb 28, 2024
# Pull Request

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

- Closes #695
- Part of #624

#### Changes description

- Update type in `ggplot2_args`
- Minor change to phrasing
- Move template file under `man` page to avoid extra folder at root
level ([available
since](https://roxygen2.r-lib.org/news/index.html?q=template#options-7-0-0)
`[email protected]`)
- Update `.Rbuildignore` accordingly

#### Reviewer should consider

- `@template` has been superseded
(https://roxygen2.r-lib.org/articles/reuse.html?q=template#superseded)
  - There's no equivalent though _(with parameterized strings)_
- Alternative: we could add `ggplot2_args` to `shared_params` and
specific list of names it can take in `@details` on each function that
uses this
averissimo added a commit that referenced this issue Mar 1, 2024
# Pull Request

- Fixes #686
- Part of #624 

#### Changes descriptions

- Adds missing assertions described on #686 
- Adds a helper function called `assert_single_selection`
- Avoids many repetitive calls across functions to check for multiple
selections
  - Adds simple unit tests
- Adds some comments to maintain a consistent structure

---------

Signed-off-by: André Veríssimo <[email protected]>
Co-authored-by: Dawid Kałędkowski <[email protected]>
averissimo added a commit that referenced this issue Mar 1, 2024
#703)

# Pull Request

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

- Part of #624
- Extends ANL rule to allow `ANL_OUTLIERS` and others variables that are
prefixed with `ANL_` (in all caps)
m7pr added a commit that referenced this issue Mar 1, 2024
Part of #624 

* [x] Review and update README.md 
    * [x] check example code
    * [x] add CRAN BADGES
    * [x] update installation guidelines
    * [x] add Getting Help Section
* [x]  Review and update DESCRIPTION
* [x] Package `Title` is not duplicated in Package `Description` in
DESCRIPTION file (e.g. this happens in teal.slice currently)
* [x] All package names in `Title` and `Description` fields of
DESCRIPTION file are quoted with `'`
* [x] LICENSE file is not mentioned in License field and LICENSE is add
to `.Rbuildignore`
* [x] Run urlchecker::url_check() to identify broken links and fix
* [x] Run R CMD check --as-cran make sure everything pass
* [x] You have checked the Package Release Template
https://github.com/insightsengineering/teal.reporter/pull/205/files
* [x] Make sure all `teal.*` mentions are lower-cased and quoted
* [x] Make Sure inst/WORDLIST is minimalized
* [x] Make sure each link to our documentation hosted with pkgdown on
github pages do not have `/main/` in the address but it has `/latest/`
instead, so we always expose the documentation of the latest release and
not what's currently on main branch but not yet released
* [x] Remove exception in `.lintr: indentation_linter = NULL`
* [x] `@noMd` (in favor of `Roxygen: list(markdown = TRUE)` in
`DESCRIPTION`)

---------

Signed-off-by: Marcin <[email protected]>
Signed-off-by: Aleksander Chlebowski <[email protected]>
Signed-off-by: André Veríssimo <[email protected]>
Signed-off-by: kartikeya kirar <[email protected]>
Signed-off-by: Vedha Viyash <[email protected]>
Co-authored-by: kartikeya kirar <[email protected]>
Co-authored-by: Aleksander Chlebowski <[email protected]>
Co-authored-by: André Veríssimo <[email protected]>
Co-authored-by: Vedha Viyash <[email protected]>
Co-authored-by: go_gonzo <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: kartikeya <[email protected]>
Co-authored-by: Aleksander Chlebowski <[email protected]>
Co-authored-by: Dawid Kałędkowski <[email protected]>
@donyunardi
Copy link
Contributor Author

All works are completed.
Closing,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants