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
<!-- Generated by pkgdown: do not edit by hand --><htmllang="en"><head><metahttp-equiv="Content-Type" content="text/html; charset=UTF-8"><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible" content="IE=edge"><metaname="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Contributing to crane • crane</title><scriptsrc="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><metaname="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><linkhref="deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><scriptsrc="deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><linkhref="deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><linkhref="deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><scriptsrc="deps/headroom-0.11.0/headroom.min.js"></script><scriptsrc="deps/headroom-0.11.0/jQuery.headroom.min.js"></script><scriptsrc="deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><scriptsrc="deps/clipboard.js-2.0.11/clipboard.min.js"></script><scriptsrc="deps/search-1.0.0/autocomplete.jquery.min.js"></script><scriptsrc="deps/search-1.0.0/fuse.min.js"></script><scriptsrc="deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><scriptsrc="pkgdown.js"></script><metaproperty="og:title" content="Contributing to crane"><linkrel="stylesheet" href="consent.css"><scriptsrc="consent.js" type="text/javascript" charset="utf-8"></script></head><body>
2
+
<!-- Generated by pkgdown + https://github.com/insightsengineering/r-pkgdown-multiversion -->
<p>You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the <em>source</em> file. This generally means you’ll need to edit <ahref="https://roxygen2.r-lib.org/articles/roxygen2.html" class="external-link">roxygen2 comments</a> in an <code>.R</code>, not a <code>.Rd</code> file. You can find the <code>.R</code> file that generates the <code>.Rd</code> by reading the comment in the first line.</p>
<p>If you want to make a bigger change, it’s a good idea to first file an issue and make sure someone from the team agrees that it’s needed. If you’ve found a bug, please file an issue that illustrates the bug with a minimal <ahref="https://www.tidyverse.org/help/#reprex" class="external-link">reprex</a> (this will also help you write a unit test, if needed). See guide on <ahref="https://code-review.tidyverse.org/issues/" class="external-link">how to create a great issue</a> for more advice.</p>
<li><p>Fork the package and clone onto your computer.</p></li>
49
80
<li><p>Install all development dependencies with <code><ahref="https://devtools.r-lib.org/reference/install_deps.html" class="external-link">devtools::install_dev_deps()</a></code>, and then make sure the package passes R CMD check by running <code><ahref="https://devtools.r-lib.org/reference/check.html" class="external-link">devtools::check()</a></code>. If R CMD check doesn’t pass cleanly, it’s a good idea to ask for help before continuing.</p></li>
50
81
<li><p>Create a Git branch for your pull request (PR).</p></li>
51
82
<li><p>Make your changes, commit to git, and then create a PR. The title of your PR should briefly describe the change. The body of your PR should contain <code>Closes #issue-number</code>.</p></li>
52
83
<li><p>For user-facing changes, add a bullet to the top of <code>NEWS.md</code> (i.e. just below the first header). Follow the style described in <ahref="https://style.tidyverse.org/news.html" class="external-link uri">https://style.tidyverse.org/news.html</a>.</p></li>
<ul><li><p>New code should follow the tidyverse <ahref="https://style.tidyverse.org" class="external-link">style guide</a>. You can use the <ahref="https://CRAN.R-project.org/package=styler" class="external-link">styler</a> package to apply these styles, but please don’t restyle code that has nothing to do with your PR.</p></li>
<li><p>New code should follow the tidyverse <ahref="https://style.tidyverse.org" class="external-link">style guide</a>. You can use the <ahref="https://CRAN.R-project.org/package=styler" class="external-link">styler</a> package to apply these styles, but please don’t restyle code that has nothing to do with your PR.</p></li>
57
91
<li><p>We use <ahref="https://cran.r-project.org/package=roxygen2" class="external-link">roxygen2</a>, with <ahref="https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html" class="external-link">Markdown syntax</a>, for documentation.</p></li>
58
92
<li><p>We use <ahref="https://cran.r-project.org/package=testthat" class="external-link">testthat</a> for unit tests. Contributions with test cases included are easier to accept.</p></li>
59
93
<li><p>All helper/non-exported function are named with a period prefix, e.g. <code>.helper_function()</code>.</p></li>
60
94
<li><p>All helper/non-exported functions are documented with roxygen2 as indicated above. Include <code>#' @keywords internal</code> to mark the function as internal. Any helper functions that appear in examples, will need to use the <code>crane:::</code> prefix, e.g. <code>#' @example crane:::.helper_function()</code></p></li>
<p>We use the {cli} package to signal errors, warnings, and messages to users. For each call to <code><ahref="https://cli.r-lib.org/reference/cli_abort.html" class="external-link">cli::cli_abort()</a></code>, the <code>call</code> argument must be used to correctly message to users the calling function. Any general function that can be re-used to check, for example, user-passed argument values, shall be placed in <code>R\import-standalone-checks.R</code>. The checks in this file are re-used among multiple projects. If you do need to modify this file, please review the section below about standalone scripts.</p>
<p>Generally, no additional package dependencies may be added. If the code you add would be more readable using, for example, using a {tidyverse} function, consider adding a shim for the function in one of the standalone scripts. See the section below about standalone scripts for details.</p>
<p>The package utilizes a few standalone scripts that are used across a few projects. Some of these scripts make available shims for common tidyverse functions, so you can use the function without depending on the package. The <code>"checks"</code> script is a series of functions to check the argument values supplied by users, and provides informative error messages when the values are not valid. Do not make changes to these files directly: rather, update these files in their source location.</p>
<p>The {crane} package exports basic functions for styling ARDs and tables using the Roche theme.</p>
96
137
</div>
97
138
<divclass="section level2">
98
-
<h2id="code-of-conduct">Code of Conduct<aclass="anchor" aria-label="anchor" href="#code-of-conduct"></a></h2>
139
+
<h2id="code-of-conduct">Code of Conduct<aclass="anchor" aria-label="anchor" href="#code-of-conduct"></a>
140
+
</h2>
99
141
<p>Please note that crane is released with a <ahref="CODE_OF_CONDUCT.html">Contributor Code of Conduct</a>. By contributing to this project you agree to abide by its terms.</p>
100
142
</div>
101
143
</div>
102
144
103
145
</main><asideclass="col-md-3"><navid="toc" aria-label="Table of contents"><h2>On this page</h2>
104
-
</nav></aside></div>
146
+
</nav></aside>
147
+
</div>
105
148
106
149
107
150
<footer><divclass="nest">
108
151
<p>crane is a part of the <strong>NEST</strong> and <ahref="https://pharmaverse.org/" class="external-link"><strong>pharmaverse</strong></a>.</p>
0 commit comments