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
Copy file name to clipboardExpand all lines: docs/index.html
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -2162,38 +2162,38 @@ <h4 id="set-up-git-and-manage-github-credentials">set-up git and manage GitHub c
2162
2162
</div>
2163
2163
<h3id="next-level">Next Level…</h3>
2164
2164
<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>
2165
-
<p>Containerize your repository with binder.org using the <ahref="https://karthik.github.io/holepunch/"><code>holepunch</code> package</a>.</p>
2166
-
<h4id="quick_publish-your-code-in-a-binder.org-container">Quick_Publish your code in a binder.org container</h4>
2167
-
<p>Use the <ahref="https://karthik.github.io/holepunch/"><code>holepunch</code> package</a></p>
2165
+
<h4id="share-a-zero-install-compute-environment">Share a zero-install compute environment</h4>
2166
+
<!-- Containerize your repository with binder.org using the [`holepunch` package](https://karthik.github.io/holepunch/) -->
2167
+
<p>Publish your code in a binder.org container</p>
2168
+
<!-- Use the [`holepunch` package](https://karthik.github.io/holepunch/) -->
<h4id="bespoke_publish-your-code-in-a-binder">Bespoke_Publish your code in a binder</h4>
2180
-
<p>I recently found my QuickPublish approach <em>didn’t quite work</em>. So I RTFMed the binder.org docs and it seemed to imply a preference for NOT using a <code>.binder/Dockerfile</code>. Therefore, here is an approach that is slightly less automated but more bulletproof.</p>
2172
+
<!-- #### Bespoke_Publish your code in a binder -->
2173
+
<!-- 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 slightly less automated but more bulletproof. -->
2174
+
<p>Everything you need is exemplified in binder-example for R that you can <ahref="https://github.com/binder-examples/r">find on github</a></p>
2175
+
<p>The key elements are an <code>install.R</code> and <code>runtime.txt</code> files. The content and format of each file is demonstrated properly at the GitHub repo. Browse and you will see.</p>
2181
2176
<p><strong>Step 1</strong></p>
2182
2177
<divclass="layout-chunk" data-layout="l-body">
2183
-
<divclass="sourceCode">
2184
-
<preclass="sourceCode r"><codeclass="sourceCode r"><spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'>write_compendium_description</span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is a DESCRIPTION file in the project root</span>
2185
-
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'>write_runtime</span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is .binder/runtime.txt</span>
2186
-
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'>write_install</span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is .binder/install.R</span>
2187
-
<spanclass='fu'>holepunch</span><spanclass='fu'>::</span><spanclass='fu'>generate_badge</span><spanclass='op'>(</span><spanclass='op'>)</span><spanclass='co'># output is a badge to be found in the README file(s)</span>
2188
-
</code></pre>
2189
-
</div>
2178
+
2190
2179
</div>
2191
-
<p><strong>Step 2</strong></p>
2192
2180
<oltype="a">
2193
-
<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>
2194
-
<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>
2195
-
<li>Edit the <code>DESCRIPTION</code> file using this basic <ahref="https://github.com/libjohn/workshop_twitter_analysis/blob/main/DESCRIPTION">model</a>. <strong>Modify all the fields</strong>. You may want to base the <code>Depends</code> and <code>Remotes</code> sections on your <code>.binder/install.R</code> file</li>
2181
+
<li>Create an <code>install.R</code> file and store it in the RStudio Project’s root directory.<br> Follow the example at <ahref="https://github.com/binder-examples/r" class="uri">https://github.com/binder-examples/r</a><br></li>
2196
2182
</ol>
2183
+
<blockquote>
2184
+
<p>This file should consist of install functions for each package used in your R code. If you’re not sure what packages you’re using, try running <code>holepunch::write_compendium_description()</code> and you will find the details listed in the DESCRIPTION file under the ‘Depends’ and ‘Remotes’ sections. <strong>IMPORTANT</strong>: Delete the <code>DESCRIPTION</code> file Before launching the binder build. In my experience the DESCRIPTION file will conflict with the binder’s build process. <br> For non-CRAN packages – specifically packages installed from GitHub – I recommend using the format: <code>remotes::install_github("gadenbuie/countdown")</code> for each package that is not on CRAN. CRAN packages can follow the format: <code>install.packages("dplyr")</code></p>
2185
+
</blockquote>
2186
+
<olstart="2" type="a">
2187
+
<li>Create a <code>runtime.txt</code> file and store it in the RStudio Project’s root directory<br> Follow the example at <ahref="https://github.com/binder-examples/r" class="uri">https://github.com/binder-examples/r</a><br></li>
2188
+
</ol>
2189
+
<blockquote>
2190
+
<p>Note: If you try using <code>holepunch</code>, it will store these files in a <code>.binder</code> subdirectory. In my experience this will cause the binder build to fail. For this reason, I don’t recommend using holepunch and I do recommend storing the two files in the Project root directory.</p>
2191
+
</blockquote>
2192
+
<p><strong>Step 2</strong></p>
2193
+
<p>Generate a binder badge with <code>holepunch::generate_badge()</code>. This should store the badge in your GitHub’s project <code>README.md</code> file. Then <code>commit</code> and <code>push</code> your changes to GitHub; go to the README on GitHub, launch the build and wait for the long launch/build time.</p>
2194
+
<!-- a. Edit the `.binder/install.R` file using the following [model](https://github.com/binder-examples/r/blob/master/install.R). -->
2195
+
<!-- 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) -->
2196
+
<!-- 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 -->
2197
2197
<hr/>
2198
2198
<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>
2199
2199
<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\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\n# Before next step → stage & commit changes\r\nuse_github() # Connect local repo to GitHub\r\n\r\n\r\n\r\nRename default branch\r\n\r\n\r\nlibrary(usethis)\r\ngit_default_branch()\r\ngit_default_branch_rename()\r\ngit_default_branch_rediscover()\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\nusethis::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\nQuick_Publish 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\nBespoke_Publish your code in a binder\r\nI 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 slightly less automated but 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 using this basic model. Modify all the fields. You may want to base the Depends and Remotes sections on your .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": "2022-04-05T11:39:25-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\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\n# Before next step → stage & commit changes\r\nuse_github() # Connect local repo to GitHub\r\n\r\n\r\n\r\nRename default branch\r\n\r\n\r\nlibrary(usethis)\r\ngit_default_branch()\r\ngit_default_branch_rename()\r\ngit_default_branch_rediscover()\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\nusethis::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\nShare a zero-install compute environment\r\n\r\nPublish your code in a binder.org container\r\n\r\n\r\n\r\n\r\n\r\n\r\nEverything you need is exemplified in binder-example for R that you can find on github\r\nThe key elements are an install.R and runtime.txt files. The content and format of each file is demonstrated properly at the GitHub repo. Browse and you will see.\r\nStep 1\r\n\r\n\r\n\r\nCreate an install.R file and store it in the RStudio Project’s root directory. Follow the example at https://github.com/binder-examples/r \r\n\r\nThis file should consist of install functions for each package used in your R code. If you’re not sure what packages you’re using, try running holepunch::write_compendium_description() and you will find the details listed in the DESCRIPTION file under the ‘Depends’ and ‘Remotes’ sections. IMPORTANT: Delete the DESCRIPTION file Before launching the binder build. In my experience the DESCRIPTION file will conflict with the binder’s build process. For non-CRAN packages – specifically packages installed from GitHub – I recommend using the format: remotes::install_github(\"gadenbuie/countdown\") for each package that is not on CRAN. CRAN packages can follow the format: install.packages(\"dplyr\")\r\n\r\nCreate a runtime.txt file and store it in the RStudio Project’s root directory Follow the example at https://github.com/binder-examples/r \r\n\r\nNote: If you try using holepunch, it will store these files in a .binder subdirectory. In my experience this will cause the binder build to fail. For this reason, I don’t recommend using holepunch and I do recommend storing the two files in the Project root directory.\r\n\r\nStep 2\r\nGenerate a binder badge with holepunch::generate_badge(). This should store the badge in your GitHub’s project README.md file. Then commit and push your changes to GitHub; go to the README on GitHub, launch the build and wait for the long launch/build time.\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": "2022-04-08T14:55:24-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",
0 commit comments