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

Refactor g_forest #1158

Merged
merged 31 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
983cf9f
Merge branch 'main' into g_forest@main
edelarua Dec 5, 2023
a5577c0
temp
edelarua Dec 5, 2023
663883f
Update params
edelarua Dec 6, 2023
f8087c4
Fix overlaid text labels in `rtable2gg`
edelarua Dec 7, 2023
e98089e
Add missing params
edelarua Dec 7, 2023
41062fe
Replace old g_forest function
edelarua Dec 8, 2023
39dbde8
Update docs
edelarua Dec 8, 2023
e1330f5
Merge branch 'main' into 1109_refactor_g_forest@main
edelarua Dec 8, 2023
5136908
Add function to test setup to process ggplot snapshots
edelarua Dec 8, 2023
a989863
Update rtable2gg tests
edelarua Dec 8, 2023
4c14287
Update existing g_forest tests
edelarua Dec 8, 2023
120029f
Update documentation
edelarua Dec 8, 2023
244001d
Adjust panel background
edelarua Dec 8, 2023
aecab2c
Add tests
edelarua Dec 8, 2023
01cad41
Clean up aesthetics
edelarua Dec 8, 2023
02c376a
Update NEWS
edelarua Dec 8, 2023
5e5d0af
Update NEWS
edelarua Dec 8, 2023
1e4e32b
Make plot background transparent
edelarua Dec 8, 2023
42ac9b0
Workflow propagation (#1159)
walkowif Dec 13, 2023
16a82a6
[skip actions] Bump version to 0.9.3.9001
walkowif Dec 13, 2023
641e18d
Add as_list arg to store table and plot in a list instead of printing
edelarua Dec 13, 2023
d77d056
Adjust x axis text size
edelarua Dec 13, 2023
56e1ee6
Convert to standard font sizes, remove overlaid segment elements
edelarua Dec 13, 2023
5ea92c5
Change font size scaling, fix overlaid line segments
edelarua Dec 13, 2023
8cd04b3
Update docs
edelarua Dec 13, 2023
93c3952
Merge 8cd04b3f8ba7028f13693dbc091db197d5ea5376 into 16a82a6972bc68669…
edelarua Dec 13, 2023
34f383a
[skip actions] Restyle files
github-actions[bot] Dec 13, 2023
160ee71
Empty commit
edelarua Dec 13, 2023
2b6a4f8
Fix segment scale after changing from geom_segment to annotate
edelarua Dec 14, 2023
bcb44c9
Last fixes for log scaling
edelarua Dec 14, 2023
469d2b7
Refresh test snapshots
edelarua Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LICENSE
# pkgdown
^_pkgdown\.yml$
pkgdown
^pkgdown$

# rstudio
^.*\.Rproj$
Expand Down
89 changes: 56 additions & 33 deletions .github/ISSUE_TEMPLATE/cran-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,67 +29,90 @@ body:
validations:
required: true
- type: textarea
id: pre-requisites
id: pre-release
attributes:
label: Pre-requisites
label: Pre-release
description: Pre-requisites that must be fulfilled before initiating the release process.
placeholder: Add your list of pre-requisites here.
value: |
- [ ] Make sure you adhere to CRAN submission policy: https://cran.r-project.org/web/packages/submission_checklist.html; https://cran.r-project.org/web/packages/policies.html.
- [ ] Make sure that high priority bugs (label "priority" + "bug") have been resolved before going into the release.
- [ ] Review old/hanging PRs before going into the release (Optional).
- [ ] Revisit R-package's lifecycle badges (Optional).
- [ ] Make sure that all upstream dependencies of this package that need to be submitted to CRAN were accepted before going into release activities.
- [ ] Make sure integration tests are green 2-3 days before the release. Look carefully through logs (check for warnings and notes).
- [ ] Decide what gets merged in before starting release activities.
- type: textarea
id: release-checklist
id: release
attributes:
label: Release Checklist
label: Release
description: The steps to be taken in order to create a release.
placeholder: Steps to create a release.
value: |
### Prepare the release

- [ ] Create a new release candidate branch
`git checkout -b release-candidate-vX.Y.Z`
- [ ] Update NEWS.md file: make sure it reflects a holistic summary of what has changed in the package.
- [ ] Remove the additional fields (`Remotes` and `Config/Needs/*`) from the DESCRIPTION file where applicable.
- [ ] Increase versioned dependency on {package name} to >=X.X.X (Optional).
- [ ] Remove the additional fields (`Remotes`) from the DESCRIPTION file where applicable.
- [ ] Make sure that the minimum dependency versions are updated in the DESCRIPTION file for the package and its reverse dependencies (Optional).
- [ ] Create a pull request to make necessary bug fixes/changes (add "[skip vbump]" in the pr title), and after merging the PR, tag the update(s) as a release candidate v < intended release version > -rc < release candidate iteration > on the main branch.
- [ ] Increase versioned dependency on {package name} to >=X.Y.Z (Optional).
- [ ] Commit your changes and create the PR on GitHub (add "[skip vbump]" in the PR title). Add all updates, commit, and push changes:
`# Make the necessary modifications to your files
# Stage the changes
git add <files your modified>
# Commit the changes
git commit -m "[skip vbump] <Your commit message>"
git push origin release-candidate-vX.Y.Z`

### Test the release

- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Execute UAT tests (Optional).

### CRAN submission

- [ ] Tag the update(s) as a release candidate vX.Y.Z-rc<iteration-number> (e.g. v0.5.3-rc1) on the release candidate branch (release-candidate-vX.Y.Z).
`# Create rc tag for submission for internal validation
git tag vX.Y.Z-rc<iteration number>
git push origin vX.Y.Z-rc<iteration number>`
- [ ] Build the package locally using the command:`R CMD build .` which will generate a .tar.gz file necessary for the CRAN submission.
- [ ] Submit the package that was build in the previous step via this form: https://cran.r-project.org/submit.html.
- [ ] Address CRAN feedback, tag the package vX.X.X-rc(n+1) and repeat the submission to CRAN whenever necessary.
- [ ] Submit the package to https://win-builder.r-project.org/upload.aspx for testing, for more details please see "Building and checking R source packages for Windows": https://win-builder.r-project.org/.
- [ ] Once tested, send the package that was built in the previous steps to CRAN via this form: https://cran.r-project.org/submit.html.
- [ ] Address CRAN feedback, tag the package vX.Y.Z-rc(n+1) and repeat the submission to CRAN whenever necessary.
- [ ] Get the package accepted and published on CRAN.
- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main. Note: Take precautionary measures to ensure that the version bump does not take place on a merge.
- [ ] Create a git tag with the final version set to X.X.X on the main branch.
- type: textarea
id: testing
attributes:
label: Testing
description: Summary of testing activities - integration tests, UAT, other
placeholder: Tests results
value: |
- [ ] Integration tests results - accepted.
- [ ] UAT results - accepted.
- [ ] All testing activities are finalized.
- type: textarea
id: feedback
attributes:
label: Release Feedback
description: Feedback received from CRAN/testers.
placeholder: Feedback to be implemented after CRAN submission/testing.
value: |
- [ ] Fix 1
- [ ] Enhancement 1
- [ ] Defect 1

### Tag the release

- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main (add "[skip vbump]" in the PR title). If nothing was removed just merge the PR you created in the "Prepare the release" section to 'main'. Note the commit hash of the merged commit. **Note:** additional commits might be added to the `main` branch by a bot or an automation - we do **NOT** want to tag this commit.

### Make sure of the following before continuing

- [ ] CI checks are passing in GH before releasing the package.
- [ ] Shiny apps are deployable and there are no errors/warnings (Applicable only for frameworks that use Shiny).

- [ ] Create a git tag with the final version set to vX.Y.Z on the main branch. In order to do this:
1. Checkout the commit hash.
`git checkout <commit hash>`
2. Tag the hash with the release version (vX.Y.Z).
`git tag vX.Y.Z`
3. Push the tag to make the final release.
`git push origin vX.Y.Z`
- [ ] Update downstream package dependencies to (>=X.Y.Z) in {package name}.
Note: Once the release tag is created, the package is automatically published to internal repositories.
- type: textarea
id: post-release
attributes:
label: Post-release Checklist
label: Post-release
description: The list of activities to be completed after the release.
placeholder: The steps that must be taken after the release.
value: |
- [ ] Ensure that CRAN checks are passing for the package.
- [ ] Make sure that the package is published to internal repositories.
- [ ] Make sure internal documentation is up to date.
- [ ] Review and update installation instructions for the package wherever needed (Optional).
- [ ] Update all integration tests to reference the new release.
- [ ] Ensure a new dev version (.9XXX) is added to the NEWS.md file and DESCRIPTION file as a placeholder for release notes.
- [ ] Announce the release on ________.
- type: textarea
id: decision-tree
Expand Down
99 changes: 57 additions & 42 deletions .github/ISSUE_TEMPLATE/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,72 +28,87 @@ body:
validations:
required: true
- type: textarea
id: pre-requisites
id: pre-release
attributes:
label: Pre-requisites
label: Pre-release
description: Pre-requisites that must be fulfilled before initiating the release process.
placeholder: Add your list of pre-requisites here.
value: |
- [ ] Make sure that high priority bugs (label "priority" + "bug") have been resolved before going into the release.
- [ ] Review old/hanging PRs before going into the release.
- [ ] Revisit R-package's lifecycle badges (Optional).
- [ ] Discuss package dependencies before going into release activities.
- [ ] Create a plan to sequentially close release activities and submit groups of packages for internal validation (Applicable only for regulatory release).
- [ ] Release Manager: Discuss package dependencies, create a plan to sequentially close release activities and submit groups of packages for internal validation (Applicable only for regulatory release).
- [ ] Check Validation Pipeline dry-run results for the package.
- [ ] Make sure all relevant integration tests are green 2-3 days before the release. Look carefully through logs (check for warnings and notes).
- [ ] Check if a package is installable on our supported internal systems (Optional).
- [ ] Inform about the soft code freeze, decide what gets merged in before starting release activities.
- type: textarea
id: release-checklist
id: release
attributes:
label: Release Checklist
label: Release
description: The steps to be taken in order to create a release.
placeholder: Steps to create a release.
value: |
- [ ] Recurring tasks: Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Recurring tasks: Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Sanity checks for Shiny applications e.g. checking if Shiny apps are deployable and making sure there are no errors/warnings.
### Prepare the release

- [ ] Create a new release candidate branch
`git checkout -b release-candidate-vX.Y.Z`
- [ ] Update NEWS.md file: make sure it reflects a holistic summary of what has changed in the package, check README.
- [ ] Remove the additional fields (`Remotes` and `Config/Needs/*`) from the DESCRIPTION file where applicable.
- [ ] Remove the additional fields (`Remotes`) from the DESCRIPTION file where applicable.
- [ ] Make sure that the minimum dependency versions are updated in the DESCRIPTION file for the package.
- [ ] Increase versioned dependency on {package name} to >=X.X.X.
- [ ] Create a pull request to make necessary bug fixes/changes (add "[skip vbump]" in the PR title), and after merging the PR, tag the update(s) as a release candidate v < intended release version > -rc < release candidate iteration > on the main branch. Note that tags are created in GitHub and synchronized with GitLab automatically.
- [ ] The package is submitted for internal validation by Release Coordinator (Applicable only for regulatory release).
- [ ] Address any feedback (internal validation/user testing), retag the package as a release candidate vX.X.X-rc(n+1). Repeat the submission for internal validation if necessary.
- [ ] Get the package validated (Applicable only for regulatory release).
- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main (add "[skip vbump]" in the PR title).
- [ ] Create a git tag with the final version set to X.X.X on the main branch.
- [ ] Update downstream package dependencies to (>=X.X.X) in {package name}.
- type: textarea
id: testing
attributes:
label: Testing
description: Summary of testing activities - integration tests, UAT, other.
placeholder: Tests results
value: |
- [ ] Integration tests results - accepted.
- [ ] UAT results - accepted.
- [ ] Shiny apps test results - accepted (Applicable only for Shiny apps).
- [ ] Necessary testing on target environment - performed (up to ETL).
- type: textarea
id: feedback
attributes:
label: Release Feedback
description: Feedback received from internal validation/UAT testers.
placeholder: Feedback to be implemented after submission for internal validation/testing.
value: |
- [ ] Fix 1
- [ ] Enhancement 1
- [ ] Defect 1
- [ ] Increase versioned dependency on {package name} to >=X.Y.Z.
- [ ] Commit your changes and create the PR on GitHub (add "[skip vbump]" in the PR title). Add all updates, commit, and push changes:
`# Make the necessary modifications to your files
# Stage the changes
git add <files your modified>
# Commit the changes
git commit -m "[skip vbump] <Your commit message>"
git push origin release-candidate-vX.Y.Z`

### Test the release

- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Execute UAT tests (Optional).

### Validation loop

Note: This section is applicable only for regulatory packages.

- [ ] Tag the update(s) as a release candidate vX.Y.Z-rc<iteration-number> (e.g. v0.5.3-rc1) on the release candidate branch (release-candidate-vX.Y.Z).
`# Create rc tag for submission for internal validation
git tag vX.Y.Z-rc<iteration number>
git push origin vX.Y.Z-rc<iteration number>`
- [ ] Submit the package for internal validation.
- [ ] Address any feedback (internal validation/user testing), retag the package as a release candidate vX.Y.Z-rc(n+1). Repeat the submission for internal validation if necessary.
- [ ] Get the package validated.

### Tag the release

- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main (add "[skip vbump]" in the PR title). If nothing was removed just merge the PR you created in the "Prepare the release" section to `main`. Note the commit hash of the merged commit. **Note:** additional commits might be added to the `main` branch by a bot or an automation - we do **NOT** want to tag this commit.

#### Make sure of the following before continuing with the release:

- [ ] CI checks are passing in GH.
- [ ] Shiny apps are deployable and there are no errors/warnings (Applicable only for frameworks that use Shiny).

- [ ] Create a git tag with the final version set to vX.Y.Z on the main branch. In order to do this:
1. Checkout the commit hash.
`git checkout <commit hash>`
2. Tag the hash with the release version (vX.Y.Z).
`git tag vX.Y.Z`
3. Push the tag to make the final release.
`git push origin vX.Y.Z`
- [ ] Update downstream package dependencies to (>=X.Y.Z) in {package name}.
Note: Once the release tag is created, the package is automatically published to internal repositories.
- type: textarea
id: post-release
attributes:
label: Post-release Checklist
label: Post-release
description: The list of activities to be completed after the release.
placeholder: The steps that must be taken after the release.
value: |
- [ ] Make sure that the package is published to internal repositories (Validated and/or Non-Validated repository).
- [ ] Review and update installation instructions for the package if needed.
- [ ] Verify if a new dev version (.9XXX) has been added to the NEWS.md file and DESCRIPTION file as a placeholder for release notes by automation.
- [ ] Make sure internal documentation/documentation catalogs are up to date.
- [ ] Notify the IDR team to start post-release/clean-up activities.
- [ ] Announce the release on ________.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
checking S3 generic/method consistency .* NOTE
checking Rd .usage sections .* NOTE
checking for unstated dependencies in vignettes .* NOTE
checking top-level files .* NOTE
unit-test-report-brand: >-
https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/tern.png
coverage:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
checking R code for possible problems .* NOTE
checking examples .* NOTE
checking Rd line widths .* NOTE
checking top-level files .* NOTE
unit-test-report-brand: >-
https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/tern.png
coverage:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ repos:
.*\.sh|
.*\.svg|
.*\.xml|
(.*/|)\_pkgdown.y[a]ml|
(.*/|)\_pkgdown.y[a]?ml|
(.*/|)\.gitignore|
(.*/|)\.gitlab-ci\.yml|
(.*/|)\.gitlab-ci\.y[a]?ml|
(.*/|)\.lintr|
(.*/|)\.pre-commit-.*|
(.*/|)\.Rbuildignore|
Expand All @@ -64,8 +64,8 @@ repos:
(.*/|)DESCRIPTION|
(.*/|)LICENSE|
(.*/|)NAMESPACE|
(.*/|)staged_dependencies\.yaml|
(.*/|)staged_dependencies\.y[a]?ml|
(.*/|)WORDLIST|
\.github/.*\.yaml|
\.github/.*\.y[a]?ml|
data/.*
)$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tern
Title: Create Common TLGs Used in Clinical Trials
Version: 0.9.3.9000
Date: 2023-12-08
Version: 0.9.3.9001
Date: 2023-12-13
Authors@R: c(
person("Joe", "Zhu", , "[email protected]", role = c("aut", "cre")),
person("Daniel", "Sabanés Bové", , "[email protected]", role = "aut"),
Expand Down
11 changes: 10 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# tern 0.9.3.9000
# tern 0.9.3.9001

### New Features
* Refactored `g_forest` to output a `ggplot` object instead of a `grob` object.

### Bug Fixes
* Fixed nested column split label overlay issue in `rtable2gg` to clean up appearance of text labels.

### Miscellaneous
* Added function `expect_snapshot_ggplot` to test setup file to process plot snapshot tests and allow plot dimensions to be set.

# tern 0.9.3

Expand Down
Loading