Skip to content

adding validation reports - #1122

Merged
shajoezhu merged 3 commits into
mainfrom
validation_report
Sep 26, 2026
Merged

shajoezhu merged 3 commits into
mainfrom
validation_report

Conversation

@shajoezhu

@shajoezhu shajoezhu commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

pkgdown builds one static site per version, so a hardcoded link would freeze at whichever report was current when it was written. pkgdown/extra.js reads the version from the navbar and points the link at the newest report at or below it. Doc versions older than the first report drop the item entirely. _pkgdown.yml keeps a static href as the fallback for readers with JavaScript disabled.

Only 0.6.16 currently has a report, so 0.6.16 and later resolve to it and earlier doc versions get no navbar item.

Same change as pharmaverse/formatters#377.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/00tabletrees.R               894      68  92.39%   20, 72-76, 138, 141, 472, 563-564, 567, 729, 835, 962-963, 1065, 1068, 1070-1071, 1089-1092, 1112, 1227-1230, 1328-1333, 1496, 1597-1600, 1724-1727, 1764-1767, 1773-1778, 1838, 1845, 1941, 2053, 2120, 2123-2126, 2129-2132, 2162, 2195-2196
R/as_html.R                    172      25  85.47%   5-10, 80, 152-157, 162-167, 182-186, 273
R/colby_constructors.R         626      36  94.25%   81, 134, 197-200, 267-270, 411, 427, 1211-1215, 1217-1221, 1302, 1391, 1552, 1591, 1602, 1610, 1613, 1638, 1659, 1805, 2028-2031
R/compare_rtables.R             83      17  79.52%   93-96, 99-102, 115-118, 137, 156-157, 188, 193
R/custom_split_funs.R          265      40  84.91%   127, 132, 138-143, 156, 173-177, 353-358, 375-380, 456, 502, 518-521, 537, 599, 609-610, 612, 624, 668, 693
R/default_split_funs.R         287      22  92.33%   272, 335-338, 349-350, 352, 354, 551-555, 619-622, 685-688
R/format_rcell.R                17       1  94.12%   47
R/indent.R                      13       2  84.62%   40-41
R/index_footnotes.R             66       0  100.00%
R/make_split_fun.R             166      30  81.93%   22-26, 36-39, 52-55, 58-61, 115, 119, 267, 270-273, 278-281, 366, 375, 377, 379, 430
R/make_subset_expr.R           137      14  89.78%   77-92, 169-177, 213, 302, 306, 315
R/summary.R                    144      38  73.61%   35, 80, 178-220, 269, 315-331, 366, 397
R/tree_accessors.R            1287     143  88.89%   110, 139-140, 264, 284, 310, 333, 363, 381, 400-404, 424, 446-449, 576, 603-604, 890-896, 1043, 1062, 1088, 1140, 1216-1217, 1262, 1297, 1335-1340, 1399, 1473-1477, 1495-1504, 1582, 1730, 1752-1753, 1763, 1814, 1835-1840, 1861-1866, 2002, 2043, 2142, 2249, 2262, 2276, 2292, 2301, 2311-2315, 2365-2370, 2573, 2583-2586, 2596, 2621-2624, 2631, 2633-2636, 2758, 2792-2793, 2850, 3154, 3515, 3631, 3665-3690, 3781-3789, 3950, 4024-4030, 4335, 4459, 4544-4549, 4555, 4579-4584, 4632, 4657-4681, 4710-4716
R/tt_afun_utils.R              419      33  92.12%   60, 182, 189, 198-212, 280, 288-289, 507, 515-518, 600-604, 624, 638-640
R/tt_as_df.R                   400      23  94.25%   101-104, 112, 150, 224-227, 369, 388, 458, 477-480, 489, 599, 605, 637, 655, 707
R/tt_compare_tables.R           72       4  94.44%   51, 174, 249, 253
R/tt_compatibility.R           574      70  87.80%   22, 149-150, 193, 198, 329-330, 334-337, 343, 347, 531, 585-588, 625-627, 665, 698, 718, 738-741, 751-754, 799, 816-820, 826-829, 903, 930-933, 942, 1004, 1012, 1023-1026, 1137, 1144, 1172-1186, 1217-1218
R/tt_dotabulation.R           1272      97  92.37%   60, 255, 260, 262, 311, 336, 340-343, 376-379, 402, 435-438, 466-469, 598-599, 667, 854-858, 908, 912, 940-943, 953, 973-977, 984-987, 1252, 1256, 1287, 1391-1394, 1612-1620, 1884-1893, 1975-1978, 1989, 1994, 1999-2000, 2002, 2013, 2018, 2041, 2127-2146
R/tt_export.R                   13       1  92.31%   45
R/tt_from_df.R                  15       0  100.00%
R/tt_paginate.R                535      40  92.52%   74, 122-131, 242, 341-342, 494, 629-632, 653-657, 802-805, 856-863, 940, 943, 961, 968, 971
R/tt_pos_and_access.R          656      33  94.97%   76, 78-80, 105, 166, 262, 329, 438, 512, 516, 724, 726, 734, 740, 754, 764-767, 990, 1007-1010, 1037, 1096-1097, 1110, 1346-1347, 1373-1376, 1658, 1733
R/tt_showmethods.R             162      21  87.04%   56, 91-113, 223, 249, 258, 263, 266-270, 359-360
R/tt_sort.R                    115       6  94.78%   50, 289-292, 300
R/tt_toString.R                439      24  94.53%   125, 355, 377, 390, 400, 406, 409, 415-425, 518, 619, 826-851
R/utils.R                       34       7  79.41%   56, 169-174
R/validate_table_struct.R       84      10  88.10%   80-84, 93-94, 140, 149-150
R/Viewer.R                      61       9  85.25%   46, 50, 60-64, 84, 118
TOTAL                         9008     814  90.96%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: bf45df7

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

Copy link
Copy Markdown
Contributor

Unit Tests Summary

    1 files     31 suites   1m 54s ⏱️
  257 tests   257 ✅ 0 💤 0 ❌
1 946 runs  1 946 ✅ 0 💤 0 ❌

Results for commit 84056bb.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Unit Tests Summary

    1 files     31 suites   1m 11s ⏱️
  258 tests   258 ✅ 0 💤 0 ❌
1 951 runs  1 951 ✅ 0 💤 0 ❌

Results for commit bf45df7.

♻️ This comment has been updated with latest results.

findLink() scanned every anchor on the page, so a vignette using the words
"validation report" as link text would have been rewritten instead of the
navbar item. Scope it to the navbar.

closest() and remove() are the only ES6-era APIs in an otherwise strict ES5
file; replace them with equivalents so the target is consistent.

pickReport() now takes the maximum eligible report rather than the last match,
so REPORTS no longer has to be kept sorted, and the header comment notes that
the static fallback in _pkgdown.yml needs updating alongside it.

Mirrors the same fixes on pharmaverse/formatters#377.
@Melkiades

Copy link
Copy Markdown
Contributor

@shajoezhu Same three fixes here as on pharmaverse/formatters#377, pushed as 2b3e381, plus a description since the body was empty.

  • findLink() scanned every anchor on the page, so a vignette linking the words "validation report" would have been rewritten instead of the navbar item. Scoped to the navbar.
  • closest() and remove() were the only ES6-era DOM calls in an otherwise strict ES5 file. Swapped for equivalents.
  • pickReport() took the last match, so it depended on REPORTS being sorted. It now takes the maximum. The header comment also said adding a version needs "no other change", but the static href in _pkgdown.yml that no-JS readers get has to move too.

Checked for rtables specifically: the 0.6.16 report is a 200 while 0.6.15 and 0.6.17 are 404, so the single-entry REPORTS is right; main at 0.6.16.9007 resolves to 0.6.16; and the live nesttemplate navbar's first <small> is 0.6.16, so detectVersion() finds it. Resolution across versions: 0.6.14 and 0.6.15 drop the link, 0.6.16 onwards get 0.6.16.

One left for you, same as on the formatters PR: an rc such as 0.6.16-rc1 would resolve to the 0.6.16 report, since parseInt("rc1") is NaN and becomes 0 so the rc compares equal to the release. Happy to change it if you would rather rc builds got the previous report.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
Accessing and subsetting tables 💔 $6.02$ $+1.89$ $0$ $0$ $0$ $0$
Accessor tests 💔 $3.23$ $+1.11$ $0$ $0$ $0$ $0$
Exporting to txt, pdf, rtf, and docx 💔 $5.59$ $+1.93$ $0$ $0$ $0$ $0$
Pagination 💔 $13.44$ $+4.30$ $0$ $0$ $0$ $0$
Printing tables 💔 $5.66$ $+1.66$ $0$ $0$ $0$ $0$
Result Data Frames 💔 $9.03$ $+2.84$ $0$ $0$ $0$ $0$
Tabulation framework 💔 $19.37$ $+5.68$ $0$ $0$ $0$ $0$
regression tests 💔 $3.26$ $+1.05$ $0$ $0$ $0$ $0$
sorting and pruning 💔 $5.23$ $+1.55$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
Pagination 💔 $6.37$ $+2.09$ vertical_and_horizontal_pagination_work
Tabulation framework 💔 $8.25$ $+2.43$ qtable_works

Results for commit a25d9d6

♻️ This comment has been updated with latest results.

@shajoezhu

Copy link
Copy Markdown
Collaborator Author

i think the release candidate tags, we can remove them

@Melkiades Melkiades left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm! Thanks Joe

Melkiades added a commit to pharmaverse/tern that referenced this pull request Sep 22, 2026
findLink() scanned every anchor on the page, so a vignette using the words
"validation report" as link text would have been rewritten instead of the
navbar item. Scope it to the navbar.

closest() and remove() are the only ES6-era APIs in an otherwise strict ES5
file; replace them with equivalents so the target is consistent.

pickReport() now takes the maximum eligible report rather than the last match,
so REPORTS no longer has to be kept sorted, and the header comment notes that
the static fallback in _pkgdown.yml needs updating alongside it.

Mirrors the same fixes on pharmaverse/formatters#377 and pharmaverse/rtables#1122.
Melkiades added a commit to pharmaverse/rlistings that referenced this pull request Sep 22, 2026
findLink() scanned every anchor on the page, so a vignette using the words
"validation report" as link text would have been rewritten instead of the
navbar item. Scope it to the navbar.

closest() and remove() are the only ES6-era APIs in an otherwise strict ES5
file; replace them with equivalents so the target is consistent.

pickReport() now takes the maximum eligible report rather than the last match,
so REPORTS no longer has to be kept sorted, and the header comment notes that
the static fallback in _pkgdown.yml needs updating alongside it.

Mirrors the same fixes on pharmaverse/formatters#377 and pharmaverse/rtables#1122.
shajoezhu added a commit to pharmaverse/tern that referenced this pull request Sep 26, 2026
**What changes are proposed in this pull request?**

* Adds a "Validation report" entry to the pkgdown navbar, resolved per
documentation version. (#1533)

pkgdown builds one static site per version, so a hardcoded link would
freeze at whichever report was current when it was written.
`pkgdown/extra.js` reads the version from the navbar and points the link
at the newest report at or below it. Doc versions older than the first
report drop the item entirely. `_pkgdown.yml` keeps a static href as the
fallback for readers with JavaScript disabled.

Only 0.9.11 currently has a report, so 0.9.11 and later resolve to it
and earlier doc versions get no navbar item.

`DESCRIPTION` also swaps `RoxygenNote: 8.0.0` for
`Config/roxygen2/version: 8.1.0`, which is unrelated to the navbar link.

Same change as pharmaverse/formatters#377 and pharmaverse/rtables#1122.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Melkiades <11279768+Melkiades@users.noreply.github.com>
Co-authored-by: Davide Garolini <davide.garolini@roche.com>
@shajoezhu
shajoezhu enabled auto-merge (squash) September 26, 2026 11:45
@shajoezhu
shajoezhu merged commit 1018065 into main Sep 26, 2026
26 checks passed
@shajoezhu
shajoezhu deleted the validation_report branch September 26, 2026 11:55
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.

2 participants