Skip to content

Conversation

@kodesiba
Copy link
Collaborator

@kodesiba kodesiba commented Apr 30, 2025

Thank you for your Pull Request!

We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the logrx codebase remains robust and consistent.

The spirit of logrx

While many packages to facilitate the logging of code already exist in the R ecosystem, it is hard to find a solution that works well for clinical programming applications. Many logging implementations are more implicit and rely on user input to create the log for the execution of a script. While this is useful for logging specific events of an application, in clinical programming a log has a set purpose.

logrx is built around the concept of creating a log for the execution of an R script that provides an overview of what happened as well as the environment that it happened in. We set out to create a flexible logging utility that could provide the necessary information to anyone reviewing the code execution so they can recreate the execution environment and run the code for themselves. Please make sure your Pull Request meets this spirit of logrx.

Please check off each taskbox as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the dev branch until you have checked off each task.

  • The spirit of logrx is met in your Pull Request
  • Code is formatted according to the tidyverse style guide
  • Updated relevant unit tests or have written new unit tests. Remember to remove any configured log objects at the end of every test using log_remove().
  • Creation/updates to relevant roxygen headers and examples.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Run pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Address any updates needed for vignettes and/or templates
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue so that it closes after successful merging.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@kodesiba kodesiba requested a review from bms63 April 30, 2025 12:11
@github-actions
Copy link

github-actions bot commented Apr 30, 2025

Code Coverage

Package Line Rate Health
logrx 89%
Summary 89% (710 / 795)

@kodesiba
Copy link
Collaborator Author

kodesiba commented Apr 30, 2025

@bms63 @nicholas-masel @parmsam-pfizer this should be it for random documentation updates. I don't know how much more we want to say in these but I'm happy to update things if anyone sees any part that is still lacking.

I can't run off logs on my current setup so I wanted to see if someone else could rerun the logs we have in the data-raw folder and then copy them in to \vignettes\articles once this is through. Once these are built I can do a final release PR to main and build for CRAN!

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

I can't get the pkgdown site to build. Are others able to build it?

image

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

it is interesting. the vignette builds by itself. but if i run line by line it crashes

image

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

@parmsam-pfizer any ideas - is it working on your end?

@parmsam-pfizer
Copy link
Collaborator

parmsam-pfizer commented Apr 30, 2025

That's odd. Same here. I'll look into this further to see what's going on. It knits to HTML without issues but has an error reading the log when I run it manually chunk by chunk.

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

@kodesiba I rerun all the .R files to produce the .log files

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

let me know if you need any other help

@parmsam-pfizer
Copy link
Collaborator

parmsam-pfizer commented Apr 30, 2025

Related to the sessioninfo update. It seems to have messed up a convention I was using to nest/subnest the log. Looking into a fix now.

@parmsam-pfizer
Copy link
Collaborator

@bms63, should work now. Just tested it on my machine.

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

I get this warning now
image

Still can't build the website locally. If you are able to build it then we can merge in and I can review stuff from the dev site

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

I think the script should be exposed in the vignette - i set echo = TRUE

@parmsam-pfizer
Copy link
Collaborator

parmsam-pfizer commented Apr 30, 2025

Yeah, that's normal. It comes from readr::read_table() function I used. It tries it best to parse some sections on first pass.

logrx/R/read_log_file.R

Lines 194 to 200 in cc2b597

parsed_log$`Session Information`$`Packages` <-
nested_log$`Session Information`$`Packages` %>%
# remove indicator whether the package is attached to the search path
stringr::str_replace_all("\\*", " ") %>%
# account for loaded packages due to load_all()
stringr::str_replace_all(" P ", " ") %>%
readr::read_table(skip = 1, col_names = FALSE)

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

I set error = TRUE and the site builds with this now
image

@bms63
Copy link
Collaborator

bms63 commented Apr 30, 2025

Could we merge to main and see if it publishes. if it doesn't then we should fix this. my build is not building the RMD file unless I set error = TRUE

session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.2.3 (2023-03-15)
os Ubuntu 20.04.6 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2025-04-30
rstudio 2024.04.2+764.pro1 Chocolate Cosmos (server)
pandoc 3.1.11 @ /usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64/ (via rmarkdown)
quarto 1.7.29 @ /usr/bin/quarto

─ Packages ───────────────────────────────────────────────────────────────────────────────────────
! package * version date (UTC) lib source
brio 1.1.5 2024-04-24 [1] RSPM (R 4.2.0)
cachem 1.1.0 2024-05-16 [1] RSPM (R 4.2.0)
callr 3.7.6 2024-03-25 [1] RSPM (R 4.2.0)
cli 3.6.4 2025-02-13 [1] RSPM (R 4.2.0)
desc 1.4.3 2023-12-10 [1] RSPM (R 4.2.0)
devtools 2.4.5 2022-10-11 [1] RSPM (R 4.2.0)
digest 0.6.37 2024-08-19 [1] RSPM (R 4.2.0)
dplyr * 1.1.4 2023-11-17 [1] RSPM (R 4.2.0)
ellipsis 0.3.2 2021-04-29 [1] RSPM (R 4.2.0)
evaluate 1.0.3 2025-01-10 [1] RSPM (R 4.2.0)
fastmap 1.2.0 2024-05-15 [1] RSPM (R 4.2.0)
fs 1.6.5 2024-10-30 [1] RSPM (R 4.2.0)
generics 0.1.3 2022-07-05 [1] RSPM (R 4.2.0)
glue 1.8.0 2024-09-30 [1] RSPM (R 4.2.0)
hms 1.1.3 2023-03-21 [1] RSPM (R 4.2.0)
htmltools 0.5.8.1 2024-04-04 [1] RSPM (R 4.2.0)
htmlwidgets 1.6.4 2023-12-06 [1] RSPM (R 4.2.0)
httpuv 1.6.15 2024-03-26 [1] RSPM (R 4.2.0)
knitr 1.49 2024-11-08 [1] RSPM (R 4.2.0)
later 1.4.1 2024-11-27 [1] RSPM (R 4.2.0)
lifecycle 1.0.4 2023-11-07 [1] RSPM (R 4.2.0)
P logrx * 0.3.2.9000 2025-04-30 [?] load_all()
magrittr 2.0.3 2022-03-30 [1] RSPM (R 4.2.0)
memoise 2.0.1 2021-11-26 [1] RSPM (R 4.2.0)
mime 0.12 2021-09-28 [1] RSPM (R 4.2.0)
miniUI 0.1.1.1 2018-05-18 [1] RSPM (R 4.2.0)
pillar 1.10.1 2025-01-07 [1] RSPM (R 4.2.0)
pkgbuild 1.4.6 2025-01-16 [1] RSPM (R 4.2.0)
pkgconfig 2.0.3 2019-09-22 [1] RSPM (R 4.2.0)
pkgdown 2.1.1 2024-09-17 [1] RSPM (R 4.2.0)
pkgload 1.4.0 2024-06-28 [1] RSPM (R 4.2.0)
processx 3.8.6 2025-02-21 [1] RSPM (R 4.2.0)
profvis 0.4.0 2024-09-20 [1] RSPM (R 4.2.0)
promises 1.3.2 2024-11-28 [1] RSPM (R 4.2.0)
ps 1.9.0 2025-02-18 [1] RSPM (R 4.2.0)
purrr 1.0.4 2025-02-05 [1] RSPM (R 4.2.0)
R6 2.6.1 2025-02-15 [1] RSPM (R 4.2.0)
Rcpp 1.0.14 2025-01-12 [1] RSPM (R 4.2.0)
readr 2.1.5 2024-01-10 [1] RSPM (R 4.2.0)
remotes 2.5.0 2024-03-17 [1] RSPM (R 4.2.0)
renv * 1.1.4 2025-03-20 [1] RSPM (R 4.2.0)
rlang 1.1.5 2025-01-17 [1] RSPM (R 4.2.0)
rmarkdown 2.29 2024-11-04 [1] RSPM (R 4.2.0)
rprojroot 2.0.4 2023-11-05 [1] RSPM (R 4.2.0)
rstudioapi 0.17.1 2024-10-22 [1] RSPM (R 4.2.0)
sessioninfo 1.2.3 2025-02-05 [1] RSPM (R 4.2.0)
shiny 1.10.0 2024-12-14 [1] RSPM (R 4.2.0)
stringi 1.8.4 2024-05-06 [1] RSPM (R 4.2.0)
stringr * 1.5.1 2023-11-14 [1] RSPM (R 4.2.0)
testthat * 3.2.3 2025-01-13 [1] RSPM (R 4.2.0)
tibble 3.2.1 2023-03-20 [1] RSPM (R 4.2.0)
tidyr * 1.3.1 2024-01-24 [1] RSPM (R 4.2.0)
tidyselect 1.2.1 2024-03-11 [1] RSPM (R 4.2.0)
tzdb 0.4.0 2023-05-12 [1] RSPM (R 4.2.0)
urlchecker 1.0.1 2021-11-30 [1] RSPM (R 4.2.0)
usethis 3.1.0 2024-11-26 [1] RSPM (R 4.2.0)
vctrs 0.6.5 2023-12-01 [1] RSPM (R 4.2.0)
withr 3.0.2 2024-10-28 [1] RSPM (R 4.2.0)
xfun 0.51 2025-02-19 [1] RSPM (R 4.2.0)
xtable 1.8-4 2019-04-21 [1] RSPM (R 4.2.0)
yaml 2.3.10 2024-07-26 [1] RSPM (R 4.2.0)

[1] /cloud/lib/x86_64-pc-linux-gnu-library/4.2
[2] /opt/R/4.2.3/lib/R/library

  • ── Packages attached to the search path.
    P ── Loaded and on-disk path mismatch.

@kodesiba
Copy link
Collaborator Author

@bms63 happy to merge this to main if we want to see what happens

@kodesiba kodesiba merged commit fb6ebed into main Apr 30, 2025
11 checks passed
@kodesiba kodesiba deleted the fix-228 branch April 30, 2025 20:49
@kodesiba
Copy link
Collaborator Author

@bms63 since you know what section needs to be updated in the vignette can you add the error = true part, the run looks to have failed

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.

4 participants