Skip to content

Commit

Permalink
re-order trace columns for #14
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 21, 2023
1 parent ce701b8 commit 2ed726e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: typetracer
Title: Trace Function Parameter Types
Version: 0.1.1.015
Version: 0.1.1.016
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
6 changes: 3 additions & 3 deletions R/load-and-clear-traces.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ load_traces <- function (files = FALSE, quiet = FALSE) {
fn_name <- tr_i$fn_name
par_formals <- tr_i$formals
num_traces <- tr_i$num_traces
trace_source <- tr_i$source
trace_source <- tr_i$source # only exists for packages

tr_i <- tr_i [which (!names (tr_i) %in%
c ("fn_name", "formals", "num_traces", "source"))]
Expand Down Expand Up @@ -64,10 +64,10 @@ load_traces <- function (files = FALSE, quiet = FALSE) {
trace_name = i,
trace_number = num_traces,
trace_source = trace_source,
trace_file = call_envs$file,
call_env = call_envs$call_env,
fn_name = fn_name,
fn_call_hash = fn_call_hash,
trace_file = call_envs$file,
call_env = call_envs$call_env,
par_name = par_name,
class = classes,
typeof = types,
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/mpadge/typetracer",
"issueTracker": "https://github.com/mpadge/typetracer/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.1.015",
"version": "0.1.1.016",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-trace-fns.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ test_that ("trace call", {
names (x),
c (
"trace_name", "trace_number",
"fn_name", "fn_call_hash",
"trace_file", "call_env",
"fn_name", "fn_call_hash", "par_name",
"class", "typeof", "mode", "storage_mode", "length",
"formal", "uneval", "eval"
"par_name", "class", "typeof", "mode", "storage_mode",
"length", "formal", "uneval", "eval"
)
)
})
Expand Down
9 changes: 6 additions & 3 deletions tests/testthat/test-trace-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ test_that ("trace installed package", {
names (x0),
c (
"trace_number", "trace_source",
"fn_name", "fn_call_hash",
"trace_file", "call_env",
"fn_name", "fn_call_hash", "par_name", "class",
"par_name", "class",
"typeof", "mode", "storage_mode", "length",
"formal", "uneval", "eval", "source"
)
Expand All @@ -48,8 +49,9 @@ test_that ("trace installed package", {
names (x1),
c (
"trace_number", "trace_source",
"fn_name", "fn_call_hash",
"trace_file", "call_env",
"fn_name", "fn_call_hash", "par_name", "class",
"par_name", "class",
"typeof", "mode", "storage_mode", "length",
"formal", "uneval", "eval", "source"
)
Expand Down Expand Up @@ -94,8 +96,9 @@ test_that ("trace source package", {
names (x0),
c (
"trace_number", "trace_source",
"fn_name", "fn_call_hash",
"trace_file", "call_env",
"fn_name", "fn_call_hash", "par_name", "class",
"par_name", "class",
"typeof", "mode", "storage_mode", "length",
"formal", "uneval", "eval", "source"
)
Expand Down

0 comments on commit 2ed726e

Please sign in to comment.