New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supress readr output from 'write_package' #120
Comments
Thanks for the suggestion. Would you suggest something similar for |
Thanks for the quick response @peterdesmet. Note a more general context for my interest in frictionless: I'm leading a small-ish rOpenSci project to develop "deposits", for which we are going to start using frictionless as a standard metadata template. As long as this comment of yours remains applicable, particularly in regard to permitting custom properties, it should be implemented relatively soon. I'll email you soon to give a more general description of our intentions with regard to frictionless. Great work! |
Excellent! Great to hear that you plan to adopt frictionless for deposits. Some personal thoughts:
|
For both write_package() and read_resource():
|
Yes, show by default, as that is the default readr behavior. Silence with explicit
I wasn't aware, but I would leave those enabled by default |
I did a bit more digging and I found a few more cases where progress bars could pop up: Of the readr functions that use the progress argument, Or in other words, quiet should be implemented in:
I'd like to have a go at implementing a isTRUE(getOption("readr.show_progress")) &&
rlang::is_interactive() &&
!isTRUE(getOption("rstudio.notebook.executing")) |
@peterdesmet Thanks for considering this now admittedly naive request so seriously. The ensuing discussion via (private) rOpenSci slack led, .among other things, to tidyverse/design#42, which raises some good arguments for considering approaches different to my suggestion of a function-level parameter. In particular, i find the argument for package-level control compelling, and it is indeed then very easy to implement some kind of So @PietrH I'd suggest a little more discussion here on preferred approach(es) before impelenting anything 😃 |
@mpadge I understand, I'll hold off for now, I'm certainly invested so I'll contribute to the discussion where I can. |
Thanks to reply here as well @mpadge. I'm happy to support what is recommended by the rOpenSci dev guide. |
And we'd be very happy to have you help us by expressing any opinions via the link shown above 😉 . Failing that, we've scheduled a chunk of Dev Guide work for Feb 9th, and that might hopefully yield some concrete recommendations. |
@mpadge any news on community-wide recommendations to silence messages? |
Nope, alas. Still waiting for the tidyverse/design issue referenced above to be resolved. |
Community-wide recommendations on silencing are now published by @mpadge and @maelle at https://ropensci.org/blog/2024/02/06/verbosity-control-packages/ 🎉 @mpadge I will update |
Sounds great 👍
…On Thu, 8 Feb 2024, 18:10 Peter Desmet, ***@***.***> wrote:
Community-wide recommendations on silencing are now published by @mpadge
<https://github.com/mpadge> and @maelle <https://github.com/maelle> at
https://ropensci.org/blog/2024/02/06/verbosity-control-packages/ 🎉
@mpadge <https://github.com/mpadge> I will update read_package() and
read_resource() that it can be silenced. I will likely also set a
frequency for read_package(), so it only shows the message when a
specific dataset (based on its DOI) is loaded for the first time.
—
Reply to this email directly, view it on GitHub
<#120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALOW2O7TGOUOUTCCN7WN473YSUBHZAVCNFSM6AAAAAATPRW5VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGU3DSNZRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@mpadge the upcoming version of frictionless no longer returns a message (on usage rights) in
The main change is that these messages are now written with library(frictionless)
library(magrittr)
p1 <- read_package("https://zenodo.org/records/5653311/files/datapackage.json")
write_package(p1)
#> Downloading file from
#> 'https://zenodo.org/records/5653311/files/O_ASSEN-reference-data.csv'.
#> Downloading file from
#> 'https://zenodo.org/records/5653311/files/O_ASSEN-gps-2018.csv.gz'.
#> Downloading file from
#> 'https://zenodo.org/records/5653311/files/O_ASSEN-gps-2019.csv.gz'.
#> Downloading file from
#> 'https://zenodo.org/records/5653311/files/O_ASSEN-acceleration-2018.csv.gz'.
#> Downloading file from
#> 'https://zenodo.org/records/5653311/files/O_ASSEN-acceleration-2019.csv.gz'.
rlang::local_options(rlib_message_verbosity = "quiet")
p2 <- read_package("https://zenodo.org/records/10055494/files/datapackage.json")
write_package(p2)
rlang::local_options(rlib_message_verbosity = "verbose")
p3 <- read_package("https://zenodo.org/records/10054818/files/datapackage.json")
write_package(p3)
#> Downloading file from
#> 'https://zenodo.org/records/10054818/files/MEDGULL_ANTWERPEN-reference-data.csv'.
#> Downloading file from
#> 'https://zenodo.org/records/10054818/files/MEDGULL_ANTWERPEN-gps-2021.csv.gz'.
#> Downloading file from
#> 'https://zenodo.org/records/10054818/files/MEDGULL_ANTWERPEN-gps-2022.csv.gz'. Created on 2024-03-27 with reprex v2.1.0 |
Current behaviour produces by default the output from
readr
(which can't bereprex
'ed here, because it's viacat
, no ignored byreprex
). It'd be good to have aquiet
option inwrite_package
which simply did this:The text was updated successfully, but these errors were encountered: