You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass='fu'><ahref='https://rdrr.io/pkg/usethis/man/use_git.html'>use_git</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># initialize a git repo</span>
<spanclass='fu'><ahref='https://usethis.r-lib.org/reference/use_git.html'>use_git</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># initialize a git repo</span>
<spanclass='fu'><ahref='https://rdrr.io/pkg/usethis/man/use_github.html'>use_github</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># Connect local repo to GitHub</span>
<spanclass='fu'><ahref='https://usethis.r-lib.org/reference/use_github.html'>use_github</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># Connect local repo to GitHub</span>
2129
2129
</code></pre>
2130
2130
</div>
2131
2131
</div>
@@ -2135,19 +2135,19 @@ <h4 id="set-up-git-and-manage-github-credentials">set-up git and manage GitHub c
2135
2135
<preclass="sourceCode r"><codeclass="sourceCode r"><spanclass='co'># Sign-in to your GitHub account</span>
<p>Take your reproducibility to the next level. <ahref="https://guides.github.com/activities/citable-code/">Make your code citable</a> by connecting your GitHub repo and your <ahref="https://orcid.org/register">ORCID</a> (unique author ID) through to the <ahref="https://zenodo.org/">Zenodo</a> archival repository. Now, every time you commit a milestone release, you also mint a DOI.</p>
2149
2149
<p>Containerize your repository with binder.org using the <ahref="https://karthik.github.io/holepunch/"><code>holepunch</code> package</a>.</p>
2150
-
<h4id="publish-your-code-in-a-binder.org-container">Publish your code in a binder.org container</h4>
2150
+
<h4id="quickpublish-your-code-in-a-binder.org-container">QuickPublish your code in a binder.org container</h4>
2151
2151
<p>Use the <ahref="https://karthik.github.io/holepunch/"><code>holepunch</code> package</a></p>
2152
2152
<divclass="layout-chunk" data-layout="l-body">
2153
2153
<divclass="sourceCode">
@@ -2160,6 +2160,24 @@ <h4 id="publish-your-code-in-a-binder.org-container">Publish your code in a bind
2160
2160
</code></pre>
2161
2161
</div>
2162
2162
</div>
2163
+
<h4id="bespokepublish-your-code-in-a-binder">BespokePublish your code in a binder</h4>
2164
+
<p>I recently found my QuickPublish approach didn’t quite work so I RTFMed the binder.org docs. Here’s an approach that is more advanced and probably more bulletproof.</p>
2165
+
<p><strong>Step 1</strong></p>
2166
+
<divclass="layout-chunk" data-layout="l-body">
2167
+
<divclass="sourceCode">
2168
+
<preclass="sourceCode r"><codeclass="sourceCode r"><spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'><ahref='https://rdrr.io/pkg/holepunch/man/write_compendium_description.html'>write_compendium_description</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is a DESCRIPTION file in the project root</span>
2169
+
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'><ahref='https://rdrr.io/pkg/holepunch/man/write_runtime.html'>write_runtime</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is .binder/runtime.txt</span>
2170
+
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'><ahref='https://rdrr.io/pkg/holepunch/man/write_install.html'>write_install</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is .binder/install.R</span>
2171
+
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'><ahref='https://rdrr.io/pkg/holepunch/man/generate_badge.html'>generate_badge</a></span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is a badge to be found in the README file(s)</span>
2172
+
</code></pre>
2173
+
</div>
2174
+
</div>
2175
+
<p><strong>Step 2</strong></p>
2176
+
<oltype="a">
2177
+
<li>Edit the <code>.binder/install.R</code> file using the following <ahref="https://github.com/binder-examples/r/blob/master/install.R">model</a>.</li>
2178
+
<li>Edit the <code>binder/install.R</code> file based on this <ahref="https://github.com/binder-examples/r/blob/master/runtime.txt">model</a> or the <ahref="https://github.com/jupyterhub/repo2docker/pull/772#issue-313426641">documentation</a></li>
2179
+
<li>Edit the Description file to following this basic <ahref="https://github.com/libjohn/workshop_twitter_analysis/blob/main/DESCRIPTION">model</a>. <strong>Modify</strong> all the fields identified in the .binder/install.R file</li>
2180
+
</ol>
2163
2181
<hr/>
2164
2182
<p><em>The old documentation from this site can be found in the <ahref="https://github.com/data-and-visualization/git-tutorial/releases/tag/v0.9.2019">v.0.2019 release</a> on GitHub</em>.</p>
2165
2183
<divclass="sourceCode" id="cb1"><preclass="sourceCode r distill-force-highlighting-css"><codeclass="sourceCode r"></code></pre></div>
Copy file name to clipboardExpand all lines: docs/search.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@
5
5
"title": "Git, GitHub & RStudio",
6
6
"description": "RStudio users can leverage git Version control to enhance reproducibility.",
7
7
"author": [],
8
-
"contents": "\r\nThe usethis package and the RStudio IDE will help you orchestrate your version control repositories as RStudio projects.\r\n\r\n\r\n\r\n\r\nSetup\r\nTo get started, make a free GitHub.com account. Make sure you have the latest versions of R, RStudio, and usethis. Then, setup your RStudio configuration using two key documents: Setup, and Managing Git(Hub) Credentials.\r\nTips\r\nClone or fork from GitHub\r\n\r\n\r\nusethis::create_from_github(\"https://github.com/data-and-visualization/git-tutorial\")\r\n\r\n\r\n\r\nCreate the GitHub repo from local\r\n\r\n\r\nlibrary(usethis)\r\nuse_git() # initialize a git repo\r\nuse_git_ignore()\r\nuse_readme.Rmd()\r\nuse_ccby_license()\r\nuse_github() # Connect local repo to GitHub\r\n\r\n\r\n\r\nset-up git and manage GitHub credentials\r\n\r\n\r\n# Sign-in to your GitHub account\r\n# Read: https://usethis.r-lib.org/articles/articles/git-credentials.html\r\n# Read: https://usethis.r-lib.org/articles/articles/usethis-setup.html\r\nusethis::create_github_token()\r\ngitcreds::gitcreds_set()\r\ngh::gh_whoami()\r\nusethis::git_sitrep()\r\nusethis::use_git_config(user.name = \"Jane Doe\", user.email = \"[email protected]\")\r\ngh::git_sitrep()\r\n\r\n\r\n\r\nNext Level…\r\nTake your reproducibility to the next level. Make your code citable by connecting your GitHub repo and your ORCID (unique author ID) through to the Zenodo archival repository. Now, every time you commit a milestone release, you also mint a DOI.\r\nContainerize your repository with binder.org using the holepunch package.\r\nPublish your code in a binder.org container\r\nUse the holepunch package\r\n\r\n\r\nlibrary(holepunch)\r\n\r\nwrite_compendium_description()\r\nwrite_dockerfile()\r\ngenerate_badge()\r\nbuild_binder()\r\n\r\n\r\n\r\nThe old documentation from this site can be found in the v.0.2019 release on GitHub.\r\n\r\n\r\n\r\n",
9
-
"last_modified": "2021-06-09T19:45:49-04:00"
8
+
"contents": "\r\nThe usethis package and the RStudio IDE will help you orchestrate your version control repositories as RStudio projects.\r\n\r\n\r\n\r\n\r\nSetup\r\nTo get started, make a free GitHub.com account. Make sure you have the latest versions of R, RStudio, and usethis. Then, setup your RStudio configuration using two key documents: Setup, and Managing Git(Hub) Credentials.\r\nTips\r\nClone or fork from GitHub\r\n\r\n\r\nusethis::create_from_github(\"https://github.com/data-and-visualization/git-tutorial\")\r\n\r\n\r\n\r\nCreate the GitHub repo from local\r\n\r\n\r\nlibrary(usethis)\r\nuse_git() # initialize a git repo\r\nuse_git_ignore()\r\nuse_readme.Rmd()\r\nuse_ccby_license()\r\nuse_github() # Connect local repo to GitHub\r\n\r\n\r\n\r\nset-up git and manage GitHub credentials\r\n\r\n\r\n# Sign-in to your GitHub account\r\n# Read: https://usethis.r-lib.org/articles/articles/git-credentials.html\r\n# Read: https://usethis.r-lib.org/articles/articles/usethis-setup.html\r\nusethis::create_github_token()\r\ngitcreds::gitcreds_set()\r\ngh::gh_whoami()\r\nusethis::git_sitrep()\r\nusethis::use_git_config(user.name = \"Jane Doe\", user.email = \"[email protected]\")\r\ngh::git_sitrep()\r\n\r\n\r\n\r\nNext Level…\r\nTake your reproducibility to the next level. Make your code citable by connecting your GitHub repo and your ORCID (unique author ID) through to the Zenodo archival repository. Now, every time you commit a milestone release, you also mint a DOI.\r\nContainerize your repository with binder.org using the holepunch package.\r\nQuickPublish your code in a binder.org container\r\nUse the holepunch package\r\n\r\n\r\nlibrary(holepunch)\r\n\r\nwrite_compendium_description()\r\nwrite_dockerfile()\r\ngenerate_badge()\r\nbuild_binder()\r\n\r\n\r\n\r\nBespokePublish your code in a binder\r\nI recently found my QuickPublish approach didn’t quite work so I RTFMed the binder.org docs. Here’s an approach that is more advanced and probably more bulletproof.\r\nStep 1\r\n\r\n\r\nholepunch::write_compendium_description() # output is a DESCRIPTION file in the project root\r\nholepunch::write_runtime() # output is .binder/runtime.txt\r\nholepunch::write_install() # output is .binder/install.R\r\nholepunch::generate_badge() # output is a badge to be found in the README file(s)\r\n\r\n\r\n\r\nStep 2\r\nEdit the .binder/install.R file using the following model.\r\nEdit the binder/install.R file based on this model or the documentation\r\nEdit the Description file to following this basic model. Modify all the fields identified in the .binder/install.R file\r\nThe old documentation from this site can be found in the v.0.2019 release on GitHub.\r\n\r\n\r\n\r\n",
9
+
"last_modified": "2021-06-14T17:04:30-04:00"
10
10
},
11
11
{
12
12
"path": "resources.html",
13
13
"title": "Resources",
14
14
"author": [],
15
15
"contents": "\r\nSlides\r\nResearch Reproducibility, 2021\r\nSocial Coding Sites\r\nhttps://github.com\r\nhttps://gitlab.com\r\nhttps://bitbucket.org\r\nDuke’s GitLab Instance\r\nManaging SSH keys\r\n\r\nGUI Git Clients\r\nRStudio – Free. Great for useRs\r\nSublime’s Merge – Downloaded and evaluated for free. $100 / 3-years of upgrades.\r\nGitKracken – Free if you have the GitHub Student Pack or the GitHub Teacher toolbox\r\nSourceTree – Free. (defaults to use with BitBucket)\r\nPackages\r\nhttps://usethis.r-lib.org/\r\nholepunch to make your reproducible code a container on binder.org\r\nFree Book\r\nHappy Git and GitHub for the useR\r\nHandy Article\r\n10 Common Problems / Solutions\r\nReproducibility\r\nWriting clear code: Tools for Reproducible Research\r\nInitial Steps Toward Reproducible Research\r\nMaking your research reproducible with TIER + R + GitHub Slides. Cetinkaya-Rundel, M. (2016). Open Science Framework. Retrieved from https://osf.io/phyau\r\n\r\n\r\n\r\n",
Copy file name to clipboardExpand all lines: index.Rmd
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Take your reproducibility to the next level. [Make your code citable](https://g
61
61
62
62
Containerize your repository with binder.org using the [`holepunch` package](https://karthik.github.io/holepunch/).
63
63
64
-
#### Publish your code in a binder.org container
64
+
#### QuickPublish your code in a binder.org container
65
65
66
66
Use the [`holepunch` package](https://karthik.github.io/holepunch/)
67
67
@@ -75,6 +75,26 @@ build_binder()
75
75
76
76
```
77
77
78
+
#### BespokePublish your code in a binder
79
+
80
+
I recently found my QuickPublish approach _didn't quite work_. So I RTFMed the binder.org docs and it seemed to imply a preference for NOT using a `.binder/Dockerfile`. Therefore, here is an approach that is more advanced and probably more bulletproof.
81
+
82
+
**Step 1**
83
+
84
+
```{r echo=TRUE, eval=FALSE}
85
+
holepunch::write_compendium_description() # output is a DESCRIPTION file in the project root
86
+
holepunch::write_runtime() # output is .binder/runtime.txt
87
+
holepunch::write_install() # output is .binder/install.R
88
+
holepunch::generate_badge() # output is a badge to be found in the README file(s)
89
+
```
90
+
91
+
**Step 2**
92
+
93
+
94
+
a. Edit the `.binder/install.R` file using the following [model](https://github.com/binder-examples/r/blob/master/install.R).
95
+
b. Edit the `binder/install.R` file based on this [model](https://github.com/binder-examples/r/blob/master/runtime.txt) or the [documentation](https://github.com/jupyterhub/repo2docker/pull/772#issue-313426641)
96
+
b. Edit the `DESCRIPTION` file using this basic [model](https://github.com/libjohn/workshop_twitter_analysis/blob/main/DESCRIPTION). **Modify all the fields**. You may want to base the `Depends` and `Remotes` sections on your `.binder/install.R` file
97
+
78
98
---
79
99
80
100
_The old documentation from this site can be found in the [v.0.2019 release](https://github.com/data-and-visualization/git-tutorial/releases/tag/v0.9.2019) on GitHub_.
0 commit comments