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

update aet05 and aet05_all #678

Merged
merged 16 commits into from
Nov 10, 2023
Merged

update aet05 and aet05_all #678

merged 16 commits into from
Nov 10, 2023

Conversation

duanx9
Copy link
Contributor

@duanx9 duanx9 commented Oct 19, 2023

Close #665

  • Update aet05 filter: only include "*AETTE", "*CQTTE", and "*SMQTTE".
  • Update the main function (aet05 and aet05_all) to let the dataset name be exposed to users.
  • Update syn_data.
  • Update unit tests.
  • Update Chevron catalog.
  • Turn off partial match and catch typos.
  • Update data.R.

@duanx9 duanx9 self-assigned this Oct 19, 2023
@duanx9 duanx9 requested a review from clarkliming as a code owner October 19, 2023 03:21
R/aet05.R Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

🧪 Test coverage: 96.87%

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  ---------------------------------------------------------------------
R/ael01_nollt.R                 21       1  95.24%   72
R/aet01_aesi.R                 148       1  99.32%   211
R/aet01.R                       98       1  98.98%   168
R/aet02.R                       44       0  100.00%
R/aet03.R                       76       0  100.00%
R/aet04.R                       88       0  100.00%
R/aet05_all.R                   11       0  100.00%
R/aet05.R                       44       1  97.73%   114
R/aet10.R                       42       0  100.00%
R/assertions.R                  99       6  93.94%   88-93
R/cfbt01.R                     107       0  100.00%
R/checks.R                      14       0  100.00%
R/chevron_tlg-S4class.R         24       0  100.00%
R/chevron_tlg-S4methods.R      144       1  99.31%   67
R/cmt01a.R                      52       0  100.00%
R/coxt01.R                      49       1  97.96%   129
R/dmt01.R                       36       0  100.00%
R/dst01.R                       94       0  100.00%
R/dtht01.R                     102       6  94.12%   50, 54-58
R/egt02.R                       35       0  100.00%
R/egt03.R                       80       1  98.75%   153
R/egt05_qtcat.R                 78       0  100.00%
R/ext01.R                       59       1  98.31%   50
R/fstg01.R                      44       0  100.00%
R/fstg02.R                      49       0  100.00%
R/kmg01.R                       29       0  100.00%
R/lbt04.R                       90       0  100.00%
R/lbt05.R                       66       5  92.42%   123-128
R/lbt06.R                       70       3  95.71%   141-144
R/lbt07.R                       93       0  100.00%
R/lbt14.R                       64       0  100.00%
R/lbt15.R                       20       0  100.00%
R/mht01.R                       54       0  100.00%
R/mng01.R                       82       9  89.02%   82, 86-90, 110-111, 153
R/pdt01.R                       60       0  100.00%
R/pdt02.R                       68       0  100.00%
R/rmpt01.R                      59      11  81.36%   87-96, 131
R/rmpt06.R                     134       3  97.76%   209-212
R/rspt01.R                      73       3  95.89%   155-158
R/rtables_utils.R              325      23  92.92%   51, 68, 119, 243, 264, 409-416, 483, 498-500, 502, 571-577, 587, 608
R/standard_rules.R              13       0  100.00%
R/ttet01.R                     122       3  97.54%   203-206
R/utils.R                      156      21  86.54%   141, 156, 175-177, 294-297, 301-304, 331, 335, 347, 349, 361, 378-380
R/vst02.R                       45       1  97.78%   108
TOTAL                         3261     102  96.87%

Diff against main

Filename                     Stmts    Miss  Cover
-------------------------  -------  ------  --------
R/aet01_aesi.R                  -2       0  -0.01%
R/aet01.R                       +4       0  +0.04%
R/aet02.R                       -6       0  +100.00%
R/aet03.R                       -1       0  +100.00%
R/aet04.R                       -1       0  +100.00%
R/aet05.R                       +4       0  +0.23%
R/aet10.R                       -1       0  +100.00%
R/chevron_tlg-S4class.R         +6       0  +100.00%
R/chevron_tlg-S4methods.R       +8      -3  +2.25%
R/cmt01a.R                      -6      -6  +10.34%
R/coxt01.R                      +1       0  +0.04%
R/dmt01.R                       +7       0  +100.00%
R/dst01.R                       -1       0  +100.00%
R/dtht01.R                      -1       0  -0.06%
R/egt02.R                       -2       0  +100.00%
R/egt03.R                       +3       0  +0.05%
R/egt05_qtcat.R                 -1       0  +100.00%
R/ext01.R                       -1       0  -0.03%
R/fstg01.R                      -6       0  +100.00%
R/fstg02.R                      -6       0  +100.00%
R/lbt04.R                       -1       0  +100.00%
R/lbt05.R                       -1       0  -0.11%
R/lbt06.R                       -2       0  -0.12%
R/lbt07.R                       -1       0  +100.00%
R/lbt14.R                       -2       0  +100.00%
R/mht01.R                      -17       0  +100.00%
R/mng01.R                      -14      +8  -9.93%
R/pdt02.R                       -1       0  +100.00%
R/rmpt01.R                      -6       0  -1.72%
R/rmpt06.R                    +134      +3  +97.76%
R/rtables_utils.R              +25      +4  -0.74%
R/standard_rules.R              +2       0  +100.00%
R/ttet01.R                      +5       0  +0.11%
R/utils.R                      +72     +21  -13.46%
R/vst02.R                       -1       0  -0.05%
TOTAL                         +190     +27  -0.69%

Results for commit: f334b72

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

Unit Tests Summary

    1 files    53 suites   6m 13s ⏱️
239 tests 171 ✔️   68 💤 0
482 runs  318 ✔️ 164 💤 0

Results for commit f334b72.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@clarkliming clarkliming left a comment

Choose a reason for hiding this comment

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

data.R also need to be updated

@clarkliming
Copy link
Contributor

  • Turn off partial match and catch typos.

could you also follow https://github.com/insightsengineering/coredev-tasks/issues/478 to turn off partial matching (I mean, no only in your side; this is not reflect in your code)

clarkliming
clarkliming previously approved these changes Oct 26, 2023
Copy link
Contributor

@clarkliming clarkliming left a comment

Choose a reason for hiding this comment

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

looks good, thank you

R/aet05.R Outdated
filter(grepl("AETTE", .data$PARAMCD)) %>%
aet05_pre <- function(adam_db, dataset = "adsaftte", ...) {
adam_db[[dataset]] <- adam_db[[dataset]] %>%
filter(grepl("(AE|CQ|SMQ)TTE", .data$PARAMCD)) %>%
mutate(
n_events = as.integer(.data$CNSR == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

if possible let's use upper case for all variables

R/aet05_all.R Outdated
filter(.data$PARAMCD == "AEREPTTE") %>%
select(all_of(c("USUBJID", "AVAL")))

adam_db$adaette <- adam_db$adaette %>%
adam_db[[dataset]] <- adam_db[[dataset]] %>%
filter(grepl("TOT", .data$PARAMCD)) %>%
mutate(
n_events = as.integer(.data$AVAL)
Copy link
Contributor

Choose a reason for hiding this comment

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

mutate(, AVAL = NULL) if you don't need aval

Copy link
Contributor

Choose a reason for hiding this comment

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

or select(n_events = AVAL, USUBJID)

R/aet05.R Outdated
@@ -43,11 +51,11 @@ aet05_main <- function(adam_db,
lbl_overall = lbl_overall,
param_label = "PARAM",
vars = "AVAL",
n_events = "n_events",
N_EVENTS = "N_EVENTS",
Copy link
Contributor

Choose a reason for hiding this comment

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

argument name should not be upper-case

Copy link
Contributor

@clarkliming clarkliming left a comment

Choose a reason for hiding this comment

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

looks good thank you!

Signed-off-by: Liming <[email protected]>
@clarkliming clarkliming merged commit cc736c8 into main Nov 10, 2023
24 checks passed
@clarkliming clarkliming deleted the 665_update_aet05@main branch November 10, 2023 04:20
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.

update AET05
2 participants