library("magrittr")# my chibi made by Oz Locke!maelle <- magick::image_read("assets/happy_maelle.png") %>% magick::image_resize("100x100")magick::image_blank(500, 100, col = "salmon") %>% magick::image_composite(maelle, offset = "+0+0") %>% magick::image_annotate("Good morning! Goeie môre! Sanibonani! Molweni!", boxcolor = "white", location = "+100+25", size = 15)
row1 <- c(magick::image_read("assets/locke.png"), magick::image_read("assets/rweekly.png")) %>% magick::image_append()row2 <- c(magick::image_read("assets/ropensci.png"), magick::image_read("assets/rladies.png")) %>% magick::image_append()magick::image_blank(225, 200, col = "white") %>% magick::image_composite(row1, offset = "+0+100") %>% magick::image_composite(row2, offset = "+50+25")
magick::image_read("assets/stan.JPG") %>% magick::image_resize("400x400") %>% magick::image_composite(maelle, offset = "+200+200")
magick::image_read("assets/pepiniere.JPG") %>% magick::image_resize("400x400") %>% magick::image_composite(maelle, offset = "+220+190")
magick::image_read("assets/mandela.JPG") %>% magick::image_resize("400x400")
Community of researchers and software developpers
R packages for open and reproducible science
Community and staff contributions
How to ensure quality in the whole suite?
How to ensure quality in the whole suite?
Open software reviews.
How to ensure quality in the whole suite?
Open software reviews.
How to ensure quality in the whole suite?
Open software reviews.
drive adoption of best practices and standards
build a community of practice
How to ensure quality in the whole suite?
Open software reviews.
drive adoption of best practices and standards
build a community of practice
partnerships with the Journal of Open Source Software and Methods in Ecology and Evolution
magick::image_read("https://raw.github.com/jtleek/rpackages/master/documentation.png")
Open-source initiative (OSI) compatible license
Complete docs
High test coverage
Readable code
Usability
Open-source initiative (OSI) compatible license
Complete docs
High test coverage
Readable code
Usability
https://github.com/ropensci/onboarding/blob/master/packaging_guide.md
Open-source initiative (OSI) compatible license
Complete docs
High test coverage
Readable code
Usability
https://github.com/ropensci/onboarding/blob/master/packaging_guide.md
Soon as bookdown!
Open & non-adversarial
No rejections
Open & non-adversarial
No rejections
Makes the process constructive for everyone involved
Open & non-adversarial
No rejections
Makes the process constructive for everyone involved
Technically, using GitHub infrastructure
magick_webshot <- function(...){ webshot::webshot(...) webshot <- magick::image_read("webshot.png") file.remove("webshot.png") webshot}
magick_webshot(url = "https://github.com/ropensci/onboarding", selector = ".public", expand = c(92, 800, 500, 10))
webshot
docs: "If you are familiar with JavaScript"webshot
docs: "If you are familiar with JavaScript"
Thanks Bea for coaching!
webshot
docs: "If you are familiar with JavaScript"
Thanks Bea for coaching!
Use the "return URL" instead of the URL
magick_webshot(url = "https://github.com/login?return_to=%2Fropensci%2Fonboarding")
magick_webshot_login <- function(url, ...){ return_url <- stringr::str_replace(url, "github.com/", "github.com/login?return_to=%2F") load("pwd.RData") eval <- paste0("casper.then(function() { this.sendKeys('#login_field', 'chibimaelle'); this.sendKeys('#password', '",pwd,"'); this.click('.btn-block'); this.wait(50); });") magick_webshot(return_url, eval = eval, ...)}
magick_webshot_login <- function(url, ...){ return_url <- stringr::str_replace(url, "github.com/", "github.com/login?return_to=%2F") load("pwd.RData") eval <- paste0("casper.then(function() { this.sendKeys('#login_field', 'chibimaelle'); this.sendKeys('#password', '",pwd,"'); this.click('.btn-block'); this.wait(50); });") magick_webshot(return_url, eval = eval, ...)}
Only for my screenshots!
GitHub APIs (Application Programming Interfaces) to interact with GitHub and its data
magick_webshot_login("https://github.com/ropensci/onboarding", selector = ".public", expand = c(0, 800, 500, 10))
magick_webshot("https://github.com/ropensci/onboarding/issues", selector = ".public", expand = c(0, 800, 500, 10))
magick_webshot_login("https://github.com/AustralianAntarcticDivision/bowerbird", selector = ".public", expand = c(0, 800, 500, 10))
magick_webshot("https://github.com/ropensci/onboarding/issues", selector = ".public", expand = c(0, 800, 500, 10))
magick_webshot_login("https://github.com/ropensci/onboarding/issues/new", selector = ".public", expand = c(0, 800, 500, 10))
No rejections... but out-of-scope packages not onboarded.
https://github.com/ropensci/onboarding/blob/master/policies.md
No rejections... but out-of-scope packages not onboarded.
https://github.com/ropensci/onboarding/blob/master/policies.md
No rejections... but out-of-scope packages not onboarded.
https://github.com/ropensci/onboarding/blob/master/policies.md
fit in our categories: data retrieval, data extraction, database access, data munging, data deposition, reproducibility, geospatial data, text analysis.
application in science
No rejections... but out-of-scope packages not onboarded.
https://github.com/ropensci/onboarding/blob/master/policies.md
fit in our categories: data retrieval, data extraction, database access, data munging, data deposition, reproducibility, geospatial data, text analysis.
application in science
better than similar packages
No rejections... but out-of-scope packages not onboarded.
https://github.com/ropensci/onboarding/blob/master/policies.md
fit in our categories: data retrieval, data extraction, database access, data munging, data deposition, reproducibility, geospatial data, text analysis.
application in science
better than similar packages
When in doubt, pre-submission enquiry!
magick_webshot_login("https://github.com/ropensci/onboarding/issues/110", selector = ".public", expand = c(0, 800, 500, 10))
magick_webshot_login("https://github.com/ropensci/onboarding/issues/129", selector = ".public", expand = c(0, 800, 500, 10))
webshot::webshot("https://github.com/ropensci/onboarding/issues/139", selector = "#show_issue")
Ongoing discussion until acceptance and transfer
Ongoing discussion until acceptance and transfer
Often a blog post https://ropensci.org/tags/review/
How to perform a data analysis of onboarding?
How to perform a data analysis of onboarding?
Remember Jenny Bryan's talk last year?
How to perform a data analysis of onboarding?
Remember Jenny Bryan's talk last year? Let's rectangle onboarding!
# Meme image by Allie Brosh https://en.wikipedia.org/wiki/Hyperbole_and_a_Halfmagick::image_read("assets/rectangle.jpg") %>% magick::image_resize("300x300")
magick_webshot("https://github.com/ropensci/onboarding/issues", selector = ".public", expand = c(0, 800, 500, 10))
GitHub GraphQL API v4. Better than v3? Get only the data you need.
GitHub GraphQL API v4. Better than v3? Get only the data you need.
My experience
GitHub GraphQL API v4. Better than v3? Get only the data you need.
My experience
Online API explorer
jq play to write a JSON wrangling magical code
Use the query defined previously via ghql
Get raw JSON
writeClipboard
get_contents
function of my ghrecipes
package
token <- Sys.getenv("GITHUB_GRAPHQL_TOKEN")cli <- ghql::GraphqlClient$new( url = "https://api.github.com/graphql", headers = httr::add_headers(Authorization = paste0("Bearer ", token)))cli$load_schema()
query <- paste0('query{ repository(owner: "', owner, '", name:"', repo,'"){ ref(qualifiedName: "master") { target { ... on Commit { id history(first: 1) { edges { node { tree{ entries { name } } } } } } } } }}')
qry <- ghql::Query$new() qry$query('foobar', query)cli$exec(qry$queries$foobar) %>% jqr::jq("..|.entries?|select(.!=null)|.[].name") %>% as.character() %>% stringr::str_replace_all('\\\"', '')
ghrecipes::get_contents(owner = "ropensci", repo = "onboarding")
## [1] "CNAME" "README.Rmd" ## [3] "README.md" "editor_template.md" ## [5] "editors_guide.md" "icon_lettering_color.png" ## [7] "issue_template.md" "news_template.md" ## [9] "packaging.png" "packaging_guide.md" ## [11] "policies.md" "review_request_template.md"## [13] "reviewer_template.md" "reviewing_guide.md"
GitHub V4 magic + some wrangling later...
GitHub V4 magic + some wrangling later...
threads <- readr::read_csv("data/clean_data.csv")threads
## # A tibble: 2,521 x 10## title created_at closed_at body user issue package## <chr> <dttm> <dttm> <chr> <chr> <int> <chr> ## 1 rrli~ 2015-03-31 00:25:14 2015-04-13 23:26:38 "- 1~ rich~ 6 rrlite ## 2 rrli~ 2015-04-01 17:30:51 2015-04-13 23:26:38 "hey~ scko~ 6 rrlite ## 3 rrli~ 2015-04-01 17:36:03 2015-04-13 23:26:38 "@sc~ kart~ 6 rrlite ## 4 rrli~ 2015-04-02 03:36:09 2015-04-13 23:26:38 "Sur~ jero~ 6 rrlite ## 5 rrli~ 2015-04-02 03:50:43 2015-04-13 23:26:38 "IMO~ gabo~ 6 rrlite ## 6 rrli~ 2015-04-02 03:53:57 2015-04-13 23:26:38 "Ide~ rich~ 6 rrlite ## 7 rrli~ 2015-04-02 18:58:53 2015-04-13 23:26:38 "> H~ kart~ 6 rrlite ## 8 stpl~ 2015-04-08 23:56:17 2015-10-29 14:14:35 "- 1~ Robi~ 10 stplanr## 9 rrli~ 2015-04-10 21:52:39 2015-04-13 23:26:38 "@ri~ stew~ 6 rrlite ## 10 rrli~ 2015-04-10 22:10:48 2015-04-13 23:26:38 "Tha~ rich~ 6 rrlite ## # ... with 2,511 more rows, and 3 more variables: is_review <lgl>,## # commenter <chr>, role <chr>
length(unique(threads$package))
## [1] 70
magick_webshot_login("https://github.com/AustralianAntarcticDivision/bowerbird/commits/master", selector = ".public", expand = c(0, 800, 500, 10))
git2r
https://github.com/ropensci/git2rClone them all using git2r
https://github.com/ropensci/git2r
Reset them at pre-submission state using git2r
. git reset hard
... time-machine!
Clone them all using git2r
https://github.com/ropensci/git2r
Reset them at pre-submission state using git2r
. git reset hard
... time-machine!
Get commit logs using gitsum
. https://github.com/lorenzwalthert/gitsum
Clone them all using git2r
https://github.com/ropensci/git2r
Reset them at pre-submission state using git2r
. git reset hard
... time-machine!
Get commit logs using gitsum
. https://github.com/lorenzwalthert/gitsum
Get lines of code using cloc
. https://github.com/hrbrmstr/cloc
Clone them all using git2r
https://github.com/ropensci/git2r
Reset them at pre-submission state using git2r
. git reset hard
... time-machine!
Get commit logs using gitsum
. https://github.com/lorenzwalthert/gitsum
Get lines of code using cloc
. https://github.com/hrbrmstr/cloc
Get number of exported classes and functions using devtools::parse_ns_file
Full code will be reported in blog posts.
Visualization packages: ggplot2
, hrbrthemes
, viridis
.
Work by authors
Work for reviewers
CRAN data via Bob Rudis.
CRAN data via Bob Rudis.
Hard to define metrics
Very hard working volunteers!
Hard to define metrics
Very hard working volunteers!
Decreasing time by automation
Hard to define metrics
Very hard working volunteers!
Decreasing time by automation
What about editors? In Tim Trice's words, "guiding angels from start to finish during the entire onboarding and review process".
rtweet::tweet_shot("801761258097803264") %>% magick::image_crop("517x300+0+90")
rtweet::tweet_shot("967074247301566465") %>% magick::image_crop("517x300+0+90")
Ann Gentle's essay in http://open-advice.org/
Impressions, examples... more general approach for onboarding?
Ann Gentle's essay in http://open-advice.org/
Impressions, examples... more general approach for onboarding?
Tidy text analysis for the win! Reminder of Julia Silge's talk last year.
Ann Gentle's essay in http://open-advice.org/
Impressions, examples... more general approach for onboarding?
Tidy text analysis for the win! Reminder of Julia Silge's talk last year.
Text cleaning involving tokenization in lines.
tidytext
and sentimentr
https://www.tidytextmining.com/ by Julia Silge and David Robinson
## # A tibble: 15 x 2## line sentiment## <chr> <dbl>## 1 @ultinomics no more things, although do make sure to add mor~ -1.63 ## 2 not sure what you mean, but i'll use different object names ~ -1.20 ## 3 error in .local(.object, ...) : -1.00 ## 4 error: -1.00 ## 5 #### miscellaneous -1.00 ## 6 error: command failed (1) -0.866## 7 - get_plate_size_from_number_of_columns: maybe throwing an e~ -0.786## 8 "this code returns an error, which is good, but it would be ~ -0.744## 9 0 errors | 0 warnings | 0 notes -0.722## 10 once i get to use this package more, i'm sure i'll have more~ -0.721## 11 - i now realize i've pasted the spelling mistakes without th~ -0.707## 12 minor issues: -0.707## 13 ## minor issues -0.707## 14 replicates issue -0.707## 15 visualization issue -0.707
## # A tibble: 15 x 2## line sentiment## <chr> <dbl>## 1 absolutely - it's really important to ensure it really has b~ 1.84## 2 overall, really easy to use and really nicely done. 1.73## 3 this package is a great and lightweight addition to working ~ 1.46## 4 i am very grateful for your approval and i very much look fo~ 1.26## 5 thank you very much for the constructive thoughts. 1.24## 6 thanks for the approval, all in all a very helpful and educa~ 1.22## 7 - really good use of helper functions 1.14## 8 - i believe the utf note is handled correctly and this is ju~ 1.13## 9 seem more unified and consistent. 1.13## 10 very much appreciated! 1.13## 11 - well organized, readable code 1.10## 12 - wow very extensive testing! well done, very thorough 1.10## 13 - i'm delighted that you find my work interesting and i'm ve~ 1.08## 14 thank you very much for your thorough and thoughtful review,~ 1.08## 15 great, thank you very much for accepting this package. i am ~ 1.07
Let humans focus on what humans are best at!
R CMD check/BiocCheck #repository standardstestthat::test_package() #functionalitycovr::package_coverage() #testing completenessdevtools::spell_check() #documentationlintr::lint_package() #code stylegoodpractice::gp() #antipatterns/complexity
devtools::release
Submission from R? Like devtools::release
Setting up the review project: https://github.com/ropenscilabs/pkgreviewr by Anna Krystalli
Submission from R? Like devtools::release
Setting up the review project: https://github.com/ropenscilabs/pkgreviewr by Anna Krystalli
Matching reviewers and packages via better volunteering data
Submission from R? Like devtools::release
Setting up the review project: https://github.com/ropenscilabs/pkgreviewr by Anna Krystalli
Matching reviewers and packages via better volunteering data
Running goodpractice::gp
automatically and not locally
Submission from R? Like devtools::release
Setting up the review project: https://github.com/ropenscilabs/pkgreviewr by Anna Krystalli
Matching reviewers and packages via better volunteering data
Running goodpractice::gp
automatically and not locally
And even more ideas!
rOpenSci
The official repo https://github.com/ropensci/onboarding
Read more https://ropensci.org/tags/review/
Volunteer to become a reviewer https://ropensci.org/onboarding/
Thank you and thanks to...
Thank you and thanks to...
images_annotate <- function(images, texts, ...){ purrr::map2(images, texts, magick::image_annotate, ...) %>% magick::image_join()}set.seed(42)thank <- function(names){ load("adjectives.RData") compliments <- sample(adjectives, size = length(names)) glue::glue("https://github.com/{names}.png") %>% magick::image_read() %>% magick::image_resize("200x200") %>% as.list() %>% images_annotate(glue::glue("So {compliments}!"), boxcolor = "white", size = 15)%>% magick::image_join() %>% magick::image_append() }
thank(c("DataWookie", "Axiematic", "jonmcalder", "theoniphotopoulou"))
thank(c("kakaalikins", "katrintirok", "kviljoen", "satrdays"))
thank(c("chucheria", "dacornu", "lauracion"))
thank(c("karthik", "noamross", "sckott"))
Minus editors. Only threads of onboarded packages.
http://www.masalmon.eu/satrday_keynote/slides
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |