lorenzwalthert / touchstone

Smart benchmarking of pull requests with statistical confidence
https://lorenzwalthert.github.io/touchstone
Other
54 stars 8 forks source link

Touchstone fails when there is a slash in the branch name #125

Open sbfnk opened 1 year ago

sbfnk commented 1 year ago

Failures might be occurring in multiple places because of the way touchstone relies on traversing paths for identifying branches but here's a reprex showing that this is an issue in benchmark_ls:

library("touchstone")
#> ✖ Could not find git repository from current working directory!
#> ℹ Please manually set the option "touchstone.git_root".

touchstone_clear()
branch <- "main"
atomic <- bench::mark(1 + 1, iterations = 1)
benchmark_write(atomic, name = "x", branch = branch)
## works with branch name "main"
benchmark_ls()
#> # A tibble: 1 × 2
#>   name  branch
#>   <chr> <chr> 
#> 1 x     main

touchstone_clear()
branch <- "test/branch"
atomic <- bench::mark(1 + 1, iterations = 1)
benchmark_write(atomic, name = "x", branch = branch)
## doesn't work with branch name "test/branch"
benchmark_ls()
#> # A tibble: 0 × 2
#> # ℹ 2 variables: name <chr>, branch <chr>

Created on 2023-10-25 with reprex v2.0.2

lorenzwalthert commented 1 year ago

Thanks for the detailed report. I currently don't have the capacity to fix this, but contributions are welcome.