Ever since UNCMBB team’s season ended about a month ago, I’ve been meaning to update the data in uncmbb package, and I finally got to it. Obviously the new version includes 2017-2018 season match results for both UNC and Duke MBB teams, but it also includes new features in wrapper functions that are useful when working with uncmbb package.
I forgot to take notes of the steps taken when I was submitting uncmbb to CRAN for the first time last year, and this time I remembered to do so and take some screenshots too. Below are some notes related to package submission:
- Update R and RStudio versions
- This is one of the prompts asked when calling devtools::release(), which is almost1 the final step in submitting a package to CRAN.
- I didn’t really start with updating R and RStudio this time and only ended up doing so when I ran into this prompt.
- For R version update, there seem to be much better ways to do it, but I ended up manually downloading latest R from CRAN and installing packages as I needed them, starting, e.g., with tidyverse. I could’ve copied over from previous version’s directory as well as personal directory, but I figured some packages needed to be updated anyway, so I might as well start anew with the packages.2
- Make changes/load all/install and restart/document/check, and commit as needed.
- This workflow (constant cycles of cmd-shift-L/B/D/E) makes sure my package is ok on current OS, which is Mac.
- Travis CI builds linux (Ubuntu) binary package and makes sure package is ok on linux (Ubuntu).
- Once CI is passed, run devtools::build_win()
- This function builds windows binary package and makes sure package is ok on windows (runs R CMD check on windows).
- Built package and check log are sent to email.
- Once devtools::build_win() is passed, run devtools::release()
- The function performs a series of tasks, and for the first several attempts, I kept getting this warning: “…* checking top-level files … WARNING Conversion of ‘README.md’ failed: pandoc: Could not fetch…TlsExceptionHostPort (HandshakeFailed Error_EOF)”img.shields.io" 443…“.
- It seemed pandoc had something to do with this warning, so after several searches, I ended up updating my pandoc via homebrew.
- But even after I updated my pandoc, rmarkdown was still using the old version, and I found out I had to run brew link pandoc to use the latest version.
- The function performs a series of tasks, and for the first several attempts, I kept getting this warning: “…* checking top-level files … WARNING Conversion of ‘README.md’ failed: pandoc: Could not fetch…TlsExceptionHostPort (HandshakeFailed Error_EOF)”img.shields.io" 443…“.
- Once devtools::release() is passed, do the following last step task:
- Go to confirmation page provided in the submission confirmation email5.
- Once confirmed on the page, there will be another cran submission confirmation email.
- Less than an hour later, I received yet another email from CRAN team that says the updated package “is on its way to CRAN now”. Yay!
suppressPackageStartupMessages(library(uncmbb))
suppressPackageStartupMessages(library(dplyr))
tail(unc)
## Season Game_Date Game_Day Type Where Opponent_School Result Tm Opp
## 2187 2018 2018-03-07 Wed CTOURN N Syracuse W 78 59
## 2188 2018 2018-03-08 Thu CTOURN N Miami W 82 65
## 2189 2018 2018-03-09 Fri CTOURN N Duke W 74 69
## 2190 2018 2018-03-10 Sat CTOURN N Virginia L 63 71
## 2191 2018 2018-03-16 Fri NCAA N Lipscomb W 84 66
## 2192 2018 2018-03-18 Sun NCAA N Texas A&M L 65 86
## OT
## 2187 <NA>
## 2188 <NA>
## 2189 <NA>
## 2190 <NA>
## 2191 <NA>
## 2192 <NA>
duke %>% mbb_season_result() %>%
filter(Type == "REG") %>%
arrange(desc(pct_win)) %>%
head(5)
## # A tibble: 5 x 7
## # Groups: Season [5]
## Season Type games wins losses pct_win pct_loss
## <chr> <chr> <int> <int> <int> <dbl> <dbl>
## 1 1999 REG 30 29 1 0.967 0.0333
## 2 1986 REG 31 29 2 0.935 0.0645
## 3 1998 REG 29 27 2 0.931 0.0690
## 4 1992 REG 27 25 2 0.926 0.0741
## 5 1963 REG 23 21 2 0.913 0.0870
unc %>% mbb_champ_season()
## # A tibble: 6 x 1
## # Groups: Season [6]
## Season
## <chr>
## 1 1957
## 2 1982
## 3 1993
## 4 2005
## 5 2009
## 6 2017
I say it almost here, because there’s literally last step one has to do before submitting to CRAN.↩
Yes it’s quite cumbersome, and there’s got to be a better way to do this that I don’t know of yet.↩
The badges ended up giving me some headache during CRAN submission.↩
I didn’t do this after receiving the confirmation email first time (after devtools::release() was completed), and kept wondering why there was no more update coming from CRAN.↩