matildabrown / rWCVP

Generating Summaries, Reports and Plots from the World Checklist of Vascular Plants
https://matildabrown.github.io/rWCVP/
GNU General Public License v3.0
19 stars 0 forks source link

Persistent progress bar after first wcvp_match_names() use #49

Closed pgomba closed 1 year ago

pgomba commented 1 year ago

Hi, the progress bar from wcvp_match_names() with progress_bar=TRUE works well the first time. But if wcvp_match_names() is used again the progress is spammed everytime the function uses a function from cli::. I have tested this only in one computer. If I run wcvp_match_names() and afterwards I run, for example cli::cli_h1("test"), the message "test" appears in the console terminal followed by the last state of the progress bar (see attached file). I think the "problem" might be related to the function edit_match(), within the function wcvp_match_fuzzy(), in particuar this this bit withr::local_options(list(cli.progress_show_after = 2, cli.progress_clear = FALSE)), but I have not been able to solve it. Maybe the progress bar is not reaching 100% and the environment keeps the info?

My main issue is that I use cli:: in other functions and now I have a frozen progress bar showing everywhere! :D

Captura

matildabrown commented 1 year ago

Interesting - I just tested and it only happens on my machine when I explicitly call progress_bar=TRUE (but not when it is left out, even though TRUE is the default). Can you confirm that this is the same on your machine? Will look into this ASAP.

pgomba commented 1 year ago

The issue still exists for me on a clean session with progress_bar=TRUE left out. I've tested it using a different subsample of my species list (n=400), and the progress bar stops at 98%. Happy to have a Teams meeting if makes things easier!

matildabrown commented 1 year ago

Fixed in branch, will close when merged