Skip to content

Commit 7b86031

Browse files
author
Nathan Kosiba
committed
first pass at rename from timber to logrx
1 parent 56f1954 commit 7b86031

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+360
-365
lines changed

.github/ISSUE_TEMPLATE/02_feature_request.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Feature Request
2-
description: Enchancement to timber functionality
2+
description: Enchancement to logrx functionality
33
title: "Feature Request: <Insert Issue Title Here>"
44
labels: ["enhancement", "programming"]
55
assignees:
@@ -8,7 +8,7 @@ body:
88
- type: markdown
99
attributes:
1010
value: |
11-
Thanks for taking the time to fill out this feature request! We love keeping timber fresh!
11+
Thanks for taking the time to fill out this feature request! We love keeping logrx fresh!
1212
- type: textarea
1313
id: feature
1414
attributes:

.github/ISSUE_TEMPLATE/03_doc_upates.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body:
88
- type: markdown
99
attributes:
1010
value: |
11-
The timber team loves documentation! Help us keep it up to date and fresh!
11+
The logrx team loves documentation! Help us keep it up to date and fresh!
1212
- type: dropdown
1313
id: browsers
1414
attributes:

.github/pull_request_template.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
### Thank you for your Pull Request!
22

3-
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 timber codebase remains robust and consistent.
3+
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.
44

5-
### The spirit of timber
5+
### The spirit of logrx
66

77
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.
88

9-
timber 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 timber**.
9+
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**.
1010

1111
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.
1212

13-
- [ ] The spirit of timber is met in your Pull Request
13+
- [ ] The spirit of logrx is met in your Pull Request
1414
- [ ] Code is formatted according to the [tidyverse style guide](https://style.tidyverse.org/)
1515
- [ ] Updated relevant unit tests or have written new unit tests
1616
- [ ] Creation/updates to relevant roxygen headers and examples

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ rsconnect/
3333
.Rproj.user
3434
inst/doc
3535
docs
36-
timber.Rcheck/
37-
timber*.tar.gz
38-
timber*.tgz
36+
logrx.Rcheck/
37+
logrx*.tar.gz
38+
logrx*.tgz
3939

4040
scratch.R
4141
scratch.log

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: timber
1+
Package: logrx
22
Title: A Logging Utility Focus on Clinical Trial Programming Workflows
33
Version: 0.1.0
44
Authors@R:
@@ -29,8 +29,8 @@ Authors@R:
2929
)
3030
Description: A utility to facilitate the logging and review of R programs in clinical trial programming workflows.
3131
License: MIT + file LICENSE
32-
URL: https://github.com/atorus-research/timber
33-
BugReports: https://github.com/atorus-research/timber/issues
32+
URL: https://github.com/atorus-research/logrx
33+
BugReports: https://github.com/atorus-research/logrx/issues
3434
Encoding: UTF-8
3535
LazyData: true
3636
Roxygen: list(markdown = TRUE)

NAMESPACE

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ export(axecute)
55
export(build_approved)
66
export(get_file_path)
77
export(get_log_element)
8+
export(get_logrx_metadata)
89
export(get_masked_functions)
910
export(get_session_info)
10-
export(get_timber_metadata)
1111
export(get_unapproved_use)
1212
export(get_used_functions)
1313
export(log_cleanup)
1414
export(log_config)
1515
export(log_init)
1616
export(log_remove)
1717
export(log_write)
18+
export(logrxAddin)
1819
export(loudly)
1920
export(run_safely_loudly)
2021
export(set_log_element)
2122
export(set_log_name_path)
22-
export(timberAddin)
2323
export(write_errors)
2424
export(write_file_name_path)
2525
export(write_log_element)

NEWS.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# timber 0.1.0
1+
# logrx 0.1.0
22

3-
Beta release for timber with introduction of numerous new features:
3+
Beta release for logrx with introduction of numerous new features:
44

55
Enhancements
66
- Add `to_report` param to `axecute()` to give users ability to filter out which pieces are reported
77
- Add return codes when running `axecute()` to determine if there were errors
88
- Improve approved packages use with new function `build_approved()` and corresponding vignette
99
- Add example articles for adsl and a risk difference table
1010

11-
# timber 0.0.1
11+
# logrx 0.0.1
1212

13-
Initial alpha release of timber
13+
Initial alpha release of logrx
1414

15-
See the [GitHub release tracker](https://github.com/atorus-research/timber/releases) for additional release documentation and links to issues.
15+
See the [GitHub release tracker](https://github.com/atorus-research/logrx/releases) for additional release documentation and links to issues.

R/axecute.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Functions to setup and run code using timber
1+
### Functions to setup and run code using logrx
22

33
#' Create a log and run a file
44
#'

R/datasets.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' A dataset that stores approved packages and functions for use.
55
#' Each row contains a `library` and `function_name`.
66
#' This dataset is used to illustrate the data format to be stored in
7-
#' the timber.approved option.
7+
#' the logrx.approved option.
88
#'
99
#' @format A tibble with 6 rows and 2 variables:
1010
#' \describe{
@@ -13,6 +13,6 @@
1313
#' }
1414
#'
1515
#' @examples
16-
#' timber::approved
16+
#' logrx::approved
1717
#'
1818
"approved"

R/get.R

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
### Functions to get data for elements of the log
22

33

4-
#' Returns named list of timber metadata attributes
4+
#' Returns named list of logrx metadata attributes
55
#'
6-
#' @return Named list of timber package metadata attributes
6+
#' @return Named list of logrx package metadata attributes
77
#' @export
88
#'
99
#' @importFrom sessioninfo session_info
1010
#' @importFrom dplyr filter
1111
#'
1212
#' @examples
13-
#' get_timber_metadata()
13+
#' get_logrx_metadata()
1414
#'
15-
get_timber_metadata <- function(){
15+
get_logrx_metadata <- function(){
1616

17-
timber_session_info <- session_info()$packages %>%
18-
filter(.data$package == "timber")
17+
logrx_session_info <- session_info()$packages %>%
18+
filter(.data$package == "logrx")
1919

20-
timber_metadata <- list(
21-
info = paste0("This log was generated using timber ",
22-
timber_session_info[['loadedversion']]),
23-
version = timber_session_info[['loadedversion']],
24-
built = ifelse(!is.na(timber_session_info[['source']]),
25-
timber_session_info[['source']],
20+
logrx_metadata <- list(
21+
info = paste0("This log was generated using logrx ",
22+
logrx_session_info[['loadedversion']]),
23+
version = logrx_session_info[['loadedversion']],
24+
built = ifelse(!is.na(logrx_session_info[['source']]),
25+
logrx_session_info[['source']],
2626
"Build not able to be determined"),
27-
repository_link = "https://github.com/atorus-research/timber"
27+
repository_link = "https://github.com/atorus-research/logrx"
2828
)
2929

30-
return(timber_metadata)
30+
return(logrx_metadata)
3131
}
3232

3333
#' Gets full path of file being run

R/interact.R

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
### Functions to interact with elements in the timber.log environment
1+
### Functions to interact with elements in the log.rx environment
22

3-
#' Adds values to existing named elements in the timber.log environment
3+
#' Adds values to existing named elements in the log.rx environment
44
#'
5-
#' @param el_key the key of the element in timber.log to be updated
6-
#' @param el_value the value to be added to the timber.log element
5+
#' @param el_key the key of the element in log.rx to be updated
6+
#' @param el_value the value to be added to the log.rx element
77
#'
88
#' @return Nothing
99
#' @export
1010
#'
1111
set_log_element <- function(el_key, el_value){
12-
# check if key is currently in the timber.log environment
13-
if (!(el_key %in% names(getOption('timber.log')))) {
14-
stop("element key provided must already exist in timber.log")
12+
# check if key is currently in the log.rx environment
13+
if (!(el_key %in% names(getOption('log.rx')))) {
14+
stop("element key provided must already exist in log.rx")
1515
}
1616

1717
# check if element is currently not empty
18-
if (!is.na(getOption('timber.log')[[el_key]])) {
18+
if (!is.na(getOption('log.rx')[[el_key]])) {
1919
stop("element can not already have a value")
2020
}
2121

2222
# assign element value to specified element key
23-
assign(el_key, el_value, envir = getOption('timber.log'))
23+
assign(el_key, el_value, envir = getOption('log.rx'))
2424
}
2525

2626

27-
#' Gets the value of a named element in the timber.log environment
27+
#' Gets the value of a named element in the log.rx environment
2828
#'
29-
#' @param el_key the key of the element in timber.log to be fetched
29+
#' @param el_key the key of the element in log.rx to be fetched
3030
#'
31-
#' @return Value of corresponding element from timber.log environment
31+
#' @return Value of corresponding element from log.rx environment
3232
#' @export
3333
#'
3434
get_log_element <- function(el_key){
35-
if (!(el_key %in% names(getOption('timber.log')))) {
36-
stop("element key provided must already exist in timber.log")
35+
if (!(el_key %in% names(getOption('log.rx')))) {
36+
stop("element key provided must already exist in log.rx")
3737
}
3838

3939
# assign element value to specified element key
40-
el_value <- getOption('timber.log')[[el_key]]
40+
el_value <- getOption('log.rx')[[el_key]]
4141

4242
# return value to user
4343
return(el_value)
@@ -47,7 +47,7 @@ get_log_element <- function(el_key){
4747
#' Set the log name and path:
4848
#' 1. As the name and path if specified
4949
#' 2. As the file name and path if specified
50-
#' 3. As timber_log.log and . if none of the above are specified
50+
#' 3. As logrx_log.log and . if none of the above are specified
5151
#'
5252
#' @param log_name The log name
5353
#' @param log_path The log path
@@ -74,7 +74,7 @@ set_log_name_path <- function(log_name = NA, log_path = NA) {
7474
x = file_name,
7575
perl = TRUE))
7676
} else {
77-
set_log_element("log_name", "timber_log.log")
77+
set_log_element("log_name", "logrx_log.log")
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)