Skip to content
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

WIP for reprex_scrape() #199

Closed
wants to merge 3 commits into from
Closed

Conversation

crew102
Copy link

@crew102 crew102 commented Aug 31, 2018

Putting comments for this PR in the #67 thread

"x + y",
"#' Created on 2018-08-31 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0)."
)
out <- reprex_scrape("https://github.com/r-lib/ghurl/issues/7")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the use of ghurl that you had in mind?

@krlmlr
Copy link
Member

krlmlr commented Sep 15, 2018

This is what reprex:::reprex_scrape("https://github.com/tidyverse/dplyr/issues/3826") gets me:

#' From https://github.com/tidyverse/dplyr/issues/3545#issuecomment-385150055, should we skip evaluating cases where there is no match?
library(tidyverse)
noisy_case_when <- function(..., .default = NA_character_) {
  case_when(..., TRUE ~ {
    warning("case not covered")
    .default
  })
}
noisy_case_when(
  TRUE ~ "case covered"
)
#' <sup>Created on 2018-09-15 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)</sup>
#' 

Amazing stuff!

Minor remarks:

  • reprex_scrape() doesn't seem to be exported yet
  • Do we want to keep the "Created on ..." ad? Do we want to add our own comment, like <sup>Scraped on ... from ...</sup>, instead or in addition to?
  • This branch now conflicts with master

@crew102
Copy link
Author

crew102 commented Sep 17, 2018

Hey @krlmlr , I was waiting until this PR was reviewed before documenting reprex_scrape() (though perhaps I should of at least exported it with @export...I'll export when doing rest of roxygen tags).

Re: how to handle the advertisement tag, I don't have a strong opinion either way.

I'll rebase on top of master when I come back to this PR after #204 is addressed.

@jennybc
Copy link
Member

jennybc commented Sep 17, 2018

Re: keeping the ad. This is a good question. I played with "undo" some, while building up to this weekend's patch release. Currently, roundtrips lead to a steady accumulation of ad instances, which is gross. I think they should probably be stripped by default (?). If you are undoing and immediately calling reprex, then presence of the add suggests re-calling with advertise = TRUE.

@crew102 crew102 closed this Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants