worldbank / blackmarbler

Georeferenced Rasters and Statistics of Nighttime Lights from NASA Black Marble
https://worldbank.github.io/blackmarbler/
Other
16 stars 3 forks source link

Setting quiet=TRUE in bm_raster doesn't make it run quietly #6

Open simon-smart88 opened 7 months ago

simon-smart88 commented 7 months ago

The documentation for bm_raster() says that setting quiet=TRUE will "Suppress output that show downloading progress and other messages." but if even when I set this, I get a download progress bar. This is especially inconvenient if you knit an Rmd containing a call to the function as it prints > 100 lines and there doesn't seem to be a way to suppress it.

I think the problem lies here: https://github.com/worldbank/blackmarbler/blob/4fbb68ffdd6c709c46861a28cd1308e45354b91b/R/blackmarbler.R#L450 and could be fixed by only including the progress() in that function if quiet = FALSE

ramarty commented 6 months ago

@simon-smart88 Thanks for flagging this! Just made a fix in the development version, so if you install via:

devtools::install_github("worldbank/blackmarbler")

quiet=TRUE should work as expected. However, let me know if you still run into any issues. I'll get this to CRAN soon.

simon-smart88 commented 6 months ago

Yes all good now - thanks!