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

Release gtrendsR 1.4.6 #347

Closed
13 tasks done
PMassicotte opened this issue May 15, 2020 · 6 comments
Closed
13 tasks done

Release gtrendsR 1.4.6 #347

PMassicotte opened this issue May 15, 2020 · 6 comments

Comments

@PMassicotte
Copy link
Owner

PMassicotte commented May 15, 2020

Prepare for release:

  • Check current CRAN check results
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • Polish NEWS

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()
@PMassicotte
Copy link
Owner Author

PMassicotte commented May 15, 2020

This will be a release to fix a CRAN issue due to failing tests.

https://cran.r-project.org/web/checks/check_results_gtrendsR.html

@eddelbuettel
Copy link
Collaborator

What drove the breakage?

  • Change in tinytest? (Unlikely)
  • Change in our code? (Possible)
  • Change at Google ?(sadly, most likely)

@PMassicotte
Copy link
Owner Author

It was related to a use case where there was no rising data returned by Google. So it was just an unhandled use case in our code.

start_top <- which(grepl("TOP", res))
start_rising <- which(grepl("RISING", res))
if (length(start_top) == 0 | length(start_rising) == 0) {
return(NULL) ## No data returned
}
top <- read.csv(textConnection(res[start_top:(start_rising - 2)]), row.names = NULL)
top$subject <- rownames(top)
rownames(top) <- NULL
top <- top[, c(2, 1)]
names(top) <- c("subject", "top")
top <- reshape(
top,
varying = "top",
v.names = "value",
direction = "long",
timevar = "related_topics",
times = "top"
)
rising <- read.csv(textConnection(res[start_rising:length(res)]), row.names = NULL)
rising$subject <- rownames(rising)
rownames(rising) <- NULL
rising <- rising[, c(2, 1)]
names(rising) <- c("subject", "rising")
rising <- reshape(
rising,
varying = "rising",
v.names = "value",
direction = "long",
timevar = "related_topics",
times = "rising"
)

@PMassicotte
Copy link
Owner Author

PMassicotte commented May 16, 2020

Hi @eddelbuettel

I am facing an issue that I do not understand with tinytest failing on Windows. In this test file, I only have 3 lines of code. If I run it manually, it works, but it fails when I call it from tinytest.

kw <- ""
res <- gtrends(kw)

This works:

kw <- ""
res <- gtrends(kw)

This fails:

tinytest::run_test_file("inst/tinytest/test_encoding_does_not_change.R")

Any ideas?

PS. It works fine on any Linux distro.

@eddelbuettel
Copy link
Collaborator

Yes. It is spelled W. I. N. D. O. W. S.

It simply doesn't have the utf-8 support real computers have. Skip the test on that platform, I do these same in some repo. (See e.g. anytime for a bazillion tests and skips because working with timezones on different OSs is only for crazy people ....) Off for a run now, poke me later if this persists,

@eddelbuettel
Copy link
Collaborator

I think I even have a utf-8 test somewhere that I skip on Windows. Possibly in Rcpp.

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

No branches or pull requests

2 participants