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

Design cheatsheet #807

Merged
merged 5 commits into from
Jan 17, 2024
Merged

Design cheatsheet #807

merged 5 commits into from
Jan 17, 2024

Conversation

edelarua
Copy link
Contributor

@edelarua edelarua commented Dec 16, 2023

Closes #600

Copy link
Contributor

github-actions bot commented Dec 16, 2023

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/00tabletrees.R               745      62  91.68%   21, 102, 105, 412, 496-497, 500, 656, 757, 849-850, 951, 953-954, 977-980, 1002, 1114-1117, 1212-1217, 1365, 1462-1465, 1529-1532, 1568-1571, 1577-1582, 1632, 1639, 1739, 1855, 1869, 1872-1875, 1878-1881, 1909, 1940-1941
R/as_html.R                    161      25  84.47%   5-10, 74, 131-136, 141-146, 161-165, 253
R/colby_constructors.R         560      20  96.43%   71, 123, 181-184, 244-247, 387, 404, 1213, 1306, 1468, 1506, 1528, 1552, 1573, 1729
R/compare_rtables.R             83      17  79.52%   93-96, 99-102, 115-118, 137, 157-158, 189, 194
R/format_rcell.R                12       0  100.00%
R/indent.R                      13       2  84.62%   39-40
R/index_footnotes.R             66       0  100.00%
R/make_split_fun.R             119      23  80.67%   22-25, 51-54, 57-60, 115, 119, 280, 283-286, 291-294, 313, 412
R/make_subset_expr.R           136      14  89.71%   34-48, 126-133, 168, 250, 266, 274
R/simple_analysis.R              5       1  80.00%   55
R/split_funs.R                 505      66  86.93%   143, 148, 154-159, 164, 181-185, 366-371, 388-393, 474, 526, 544-547, 564, 631, 641-642, 644, 658, 702, 727, 903, 910, 936-939, 950-951, 953, 955, 1126-1128, 1142-1146, 1210-1213, 1276-1279
R/summary.R                    215      24  88.84%   38, 85, 192, 200, 271-276, 287-288, 307-308, 418, 465-481, 516, 549
R/tree_accessors.R             952     102  89.29%   109, 251, 269, 292, 330, 344, 360, 465, 492-493, 774-779, 907, 925, 949, 999, 1054-1055, 1094, 1127, 1163-1167, 1223, 1298-1302, 1320-1330, 1399, 1504-1507, 1532, 1552-1553, 1562, 1603, 1621-1625, 1646-1650, 1729, 1771, 1875, 1979, 1992, 2005, 2019, 2027, 2036-2040, 2382, 2740, 2853, 2886-2908, 2997-3004, 3159, 3232-3237, 3447-3448, 3455, 3458-3461, 3465, 3516, 3576, 3601-3625
R/tt_afun_utils.R              411      32  92.21%   50, 164, 171, 181-194, 260, 271-272, 504, 512-515, 597-601, 622, 637-639
R/tt_compare_tables.R           70       4  94.29%   56, 178, 257, 261
R/tt_compatibility.R           510      56  89.02%   19, 142-143, 192, 197, 332-333, 337-340, 346, 350, 398, 520, 568, 601, 621, 654-657, 701, 718-722, 809, 837-840, 849, 912, 920, 931-934, 1044, 1051, 1080-1094, 1125-1126
R/tt_dotabulation.R           1122      96  91.44%   54, 252, 257, 259, 310, 334, 338-341, 373-376, 399, 434-437, 465-468, 565, 702-706, 756, 760, 789-792, 802, 822-826, 833-836, 1095, 1099, 1130, 1241-1244, 1449-1457, 1598, 1682-1691, 1771-1774, 1785, 1790, 1795-1796, 1798, 1809, 1814, 1837, 1932-1951
R/tt_export.R                  465      34  92.69%   44, 173-177, 216-219, 261-264, 316-320, 385, 439, 732, 741, 766-770, 937-940, 943, 974, 980
R/tt_from_df.R                   9       0  100.00%
R/tt_paginate.R                440      37  91.59%   45, 70, 107-115, 396, 518-521, 541-545, 695-698, 748-755, 824, 827, 837, 844, 847
R/tt_pos_and_access.R          571      43  92.47%   77, 79-81, 106, 166, 212-216, 262, 515, 517, 525, 531, 545, 555-558, 740, 751-755, 760-763, 790, 843-844, 856, 1022-1023, 1081-1109, 1389, 1466
R/tt_showmethods.R             144      21  85.42%   60, 97-120, 183, 209, 218, 226, 229-233, 326-327
R/tt_sort.R                     88       5  94.32%   223-226, 234
R/tt_toString.R                395      25  93.67%   119, 310, 360, 375, 385, 392, 395, 401-411, 499, 564, 570, 805-831
R/utils.R                       29       0  100.00%
R/validate_table_struct.R       84      10  88.10%   79-83, 92-93, 140, 150-151
R/Viewer.R                      61       9  85.25%   47, 51, 61-65, 85, 119
TOTAL                         7971     728  90.87%

Diff against main

Filename                     Stmts    Miss  Cover
-------------------------  -------  ------  --------
R/00tabletrees.R              +121     +21  -1.75%
R/as_html.R                    +73     +18  -7.57%
R/colby_constructors.R         +78      +3  -0.04%
R/compare_rtables.R             +5      +6  -6.38%
R/index_footnotes.R            +16       0  +100.00%
R/make_split_fun.R            +119     +23  +80.67%
R/make_subset_expr.R           +30      +2  +1.03%
R/split_funs.R                 +84     +11  -0.01%
R/summary.R                    +32      +8  -2.42%
R/tree_accessors.R            +159     +34  -2.14%
R/tt_afun_utils.R              +66      +7  -0.54%
R/tt_compare_tables.R           +5       0  +0.44%
R/tt_compatibility.R           +97      +6  +1.13%
R/tt_dotabulation.R           +385     +52  -2.59%
R/tt_export.R                 +236     -39  +24.57%
R/tt_paginate.R                +57     +22  -4.49%
R/tt_pos_and_access.R          +51      +6  -0.42%
R/tt_showmethods.R             +23       0  +2.77%
R/tt_sort.R                     +7      -1  +1.73%
R/tt_toString.R                +90      +3  +0.88%
R/utils.R                      +18      -1  +9.09%
R/validate_table_struct.R      +84     +10  +88.10%
R/Viewer.R                      +5       0  +1.32%
TOTAL                        +1841    +191  -0.37%

Results for commit: 5be649e

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Dec 16, 2023

Unit Tests Summary

    1 files     24 suites   1m 36s ⏱️
  198 tests   198 ✅ 0 💤 0 ❌
1 509 runs  1 509 ✅ 0 💤 0 ❌

Results for commit 5be649e.

♻️ This comment has been updated with latest results.

@shajoezhu
Copy link
Collaborator

update the bottom right contact info,

image

with github rtables issue board link

@shajoezhu
Copy link
Collaborator

I think this is rather advanced usage with very little explaination, consider for removal

image

@shajoezhu
Copy link
Collaborator

This link is very good.

suggest to add links to all panels, and link to vignette

image

Copy link
Collaborator

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

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

Hi @edelarua , it looks very good for the first draft, I made a few suggestions. Thanks!

@khatril khatril self-requested a review December 22, 2023 15:59
@khatril
Copy link

khatril commented Dec 22, 2023

Hey @edelarua it looks great, a nice first draft! I have some suggestions too

  1. Have an introductory sentence near the header, e.g. "rtables - reporting tables with R. The rtables R package is designed to create and display complex tables with R" could also have this in the Basics section and combine with the title. Similar to the tidyr cheatsheet.

  2. Add some context behind the 'Basics' section, e.g. basic_table, every table layout must start with basic_table. And similar for build_table.

  3. I found the Accessors & Modify layout could be a bit more readable, could consider adding the example image underneath the code (happy to elaborate on this point if it doesn't make sense),

  4. Sorting & Pruning, minor comment but could you highlight the sort_at_path function in yellow in the example code so it draws attention to this function.

Happy to touch base to discuss the points with others once all other reviews are done

Copy link
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Tabulation framework 💔 $18.68$ $+1.35$ $0$ $0$ $0$ $0$

Results for commit 505889a

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

I think this is gold!!! thanks Emily, it will help onboarding many imo

@edelarua edelarua requested a review from shajoezhu January 17, 2024 15:29
Copy link
Collaborator

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

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

It's beautiful! Thanks a lot Em!

@edelarua edelarua merged commit aa2348b into main Jan 17, 2024
17 checks passed
@edelarua edelarua deleted the 600_cheatsheet@main branch January 17, 2024 21:52
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.

Creation of a cheatsheet for rtables
4 participants