Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions _deepl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
preferences:
- source: en
target: es-419
formality: less
glossary: "glosario"
yaml_fields: ["title"]
- source: en
target: pt-br
formality: less
yaml_fields: ["title", "description"]
- source: pt
target: en-us
formality: prefer_less
yaml_fields: ["title", "description"]
- source: es
target: en-us
formality: prefer_less
yaml_fields: ["title", "description"]

excludes: ["*.md"]

languages:
- extension: es
target: es-419
source: es
- extension: ''
target: en-us
source: en
- extension: pt
target: pt-br
source: pt
25 changes: 13 additions & 12 deletions pkg_building.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ We recommend you to use the [`codemetar` package](https://github.com/ropensci/co

### Console messages {#console-messages}

- Use either the [cli package](https://cli.r-lib.org/), or base R's tools (`message()` and `warning()`) to communicate with the user in your functions.
- Use either the [cli package](https://cli.r-lib.org/), or base R's tools (`message()` and `warning()`) to communicate with the user in your functions.

- Highlights of the cli package include: automatic wrapping, respect of the [NO_COLOR convention](https://cli.r-lib.org/articles/cli-config-user.html?q=no#no_color), many [semantic elements](https://cli.r-lib.org/articles/semantic-cli.html), and extensive documentation. Read more in a [blog post](https://blog.r-hub.io/2023/11/30/cliff-notes-about-cli/).
- Highlights of the cli package include: automatic wrapping, respect of the [NO\_COLOR convention](https://cli.r-lib.org/articles/cli-config-user.html?q=no#no_color), many [semantic elements](https://cli.r-lib.org/articles/semantic-cli.html), and extensive documentation. Read more in a [blog post](https://blog.r-hub.io/2023/11/30/cliff-notes-about-cli/).

- Please do not use `print()` or `cat()` unless it's for a `print.*()` or `str.*()` methods, as these methods of printing messages are harder for users to suppress.

Expand All @@ -67,7 +67,7 @@ We recommend you to use the [`codemetar` package](https://github.com/ropensci/co

If providing a graphical user interface (GUI) (such as a Shiny app), to facilitate workflow, include a mechanism to automatically reproduce steps taken in the GUI. This could include auto-generation of code to reproduce the same outcomes, the output of intermediate values produced in the interactive tool, or simply clear and well-documented mapping between GUI actions and scripted functions. (See also ["Testing"](#testing) below.)

The [`tabulizer` package](https://github.com/ropensci/tabulizer) e.g. has an interactive workflow to extract tables, but can also only extract coordinates so one can re-run things as a script. Besides, two examples of shiny apps that do code generation are [https://gdancik.shinyapps.io/shinyGEO/](https://gdancik.shinyapps.io/shinyGEO/), and [https://github.com/wallaceEcoMod/wallace/](https://github.com/wallaceEcoMod/wallace/).
The [`tabulizer` package](https://github.com/ropensci/tabulizer) e.g. has an interactive workflow to extract tables, but can also only extract coordinates so one can re-run things as a script. Besides, two examples of shiny apps that do code generation are <https://gdancik.shinyapps.io/shinyGEO/>, and <https://github.com/wallaceEcoMod/wallace/>.

### Input checking

Expand All @@ -86,7 +86,6 @@ If your package accesses a web API or another web resource,

For more information refer to the blog post [Why You Should (or Shouldn't) Build an API Client](https://ropensci.org/blog/2022/06/16/publicize-api-client-yes-no).


### Packages wrapping external software {#external-software}

- Document clearly how to install the package, including all required external packages or libraries, including where applicable explicit steps on common operating systems.
Expand Down Expand Up @@ -271,7 +270,7 @@ There are a few elements we'd like to underline here.

### Automatic deployment of the documentation website {#docsropensci}

You only need to worry about automatic deployment of your website until approval and transfer of your package repo to the ropensci organization; indeed, after that a pkgdown website will be built for your package after each push to the GitHub repo. You can find the status of these builds at `https://dev.ropensci.org/job/package_name`, e.g. [for `magick`](https://dev.ropensci.org/job/magick); and the website at `https://docs.ropensci.org/package_name`, e.g. [for `magick`](https://docs.ropensci.org/magick). The website build will use your pkgdown config file if you have one, except for the styling that will use the [`rotemplate` package](https://github.com/ropensci-org/rotemplate/). The resulting website will have a local search bar. Please report bugs, questions and feature requests about the central builds at [https://github.com/ropensci/docs/](https://github.com/ropensci/docs/) and about the template at [https://github.com/ropensci/rotemplate/](https://github.com/ropensci/rotemplate/).
You only need to worry about automatic deployment of your website until approval and transfer of your package repo to the ropensci organization; indeed, after that a pkgdown website will be built for your package after each push to the GitHub repo. You can find the status of these builds at `https://dev.ropensci.org/job/package_name`, e.g. [for `magick`](https://dev.ropensci.org/job/magick); and the website at `https://docs.ropensci.org/package_name`, e.g. [for `magick`](https://docs.ropensci.org/magick). The website build will use your pkgdown config file if you have one, except for the styling that will use the [`rotemplate` package](https://github.com/ropensci-org/rotemplate/). The resulting website will have a local search bar. Please report bugs, questions and feature requests about the central builds at <https://github.com/ropensci/docs/> and about the template at <https://github.com/ropensci/rotemplate/>.

*If your package vignettes need credentials (API keys, tokens, etc.) to knit, you might want to [precompute them](https://ropensci.org/technotes/2019/12/08/precompute-vignettes/) since credentials cannot be used on the docs server.*

Expand All @@ -297,7 +296,7 @@ You can make your website content easier to browse by tweaking the navbar, refer

### Math rendering {#mathjax}

Please refer to [pkgdown documentation](https://pkgdown.r-lib.org/dev/articles/customise.html#math-rendering).
Please refer to [pkgdown documentation](https://pkgdown.r-lib.org/dev/articles/customise.html#math-rendering).
Our template is compatible with this configuration.

### Package logo {#package-logo}
Expand All @@ -316,9 +315,9 @@ If you feel that your reviewers have made a substantial contribution to the deve
comment = "Bea reviewed the package (v. X.X.XX) for rOpenSci, see <https://github.com/ropensci/software-review/issues/116>"),
```

Only include reviewers after asking for their consent.
Read more in this blog post ["Thanking Your Reviewers: Gratitude through Semantic Metadata"](https://ropensci.org/blog/2018/03/16/thanking-reviewers-in-metadata/).
Please do not list editors as contributors.
Only include reviewers after asking for their consent.
Read more in this blog post ["Thanking Your Reviewers: Gratitude through Semantic Metadata"](https://ropensci.org/blog/2018/03/16/thanking-reviewers-in-metadata/).
Please do not list editors as contributors.
Your participation in and contribution to rOpenSci is thanks enough!

### Authorship of included code {#authorship-included-code}
Expand All @@ -327,7 +326,7 @@ Many packages include code from other software. Whether entire files or single f

> The ownership of copyright and intellectual property rights of all components of the package must be clear and unambiguous (including from the authors specification in the DESCRIPTION file). Where code is copied (or derived) from the work of others (including from R itself), care must be taken that any copyright/license statements are preserved and authorship is not misrepresented.
>
> Preferably, an 'Authors@R' field would be used with ctb' roles for the authors of such code. Alternatively, the 'Author' field should list these authors as contributors.
> Preferably, an 'Authors@R' field would be used with 'ctb' roles for the authors of such code. Alternatively, the 'Author' field should list these authors as contributors.
>
> Where copyrights are held by an entity other than the package authors, this should preferably be indicated via 'cph' roles in the 'Authors@R' field, or using a 'Copyright' field (if necessary referring to an inst/COPYRIGHTS file).
>
Expand Down Expand Up @@ -385,13 +384,15 @@ For how to update your DESCRIPTION file, see the [R packages book](https://r-pkg
## Package dependencies {#pkgdependencies}

- It is very generally better to have fewer dependencies.

- Consider the trade-offs involved in relying on a package as a dependency. On one hand,
using dependencies reduces coding effort, and can build on useful functionality developed by
others, especially if the dependency performs complex tasks, is high-performance,
and/or is well vetted and tested. On the other hand, having many dependencies
places a burden on the maintainer to keep up with changes in those packages, at risk
to your package's long-term sustainability. It also
increases installation time and size, primarily a consideration on your and others' development cycle, and in automated build systems. "Heavy" packages - those with many dependencies themselves, and those with large amounts of compiled code - increase this cost.

- Approaches to reducing dependencies include:

- Small, simple functions from a dependency package may be better copied into
Expand Down Expand Up @@ -456,7 +457,6 @@ For how to update your DESCRIPTION file, see the [R packages book](https://r-pkg
`configure` scripts can be challenging as they often require hacky solutions
to make diverse system dependencies work across systems. Use examples ([more here](https://github.com/search?q=org%3Acran+anticonf&type=Code)) as a starting point but note that it is common to encounter bugs and edge cases and often violate CRAN policies. Do not hesitate to [ask for help on our forum](https://discuss.ropensci.org/).


## Recommended scaffolding {#recommended-scaffolding}

- For HTTP requests we recommend using [httr2](https://httr2.r-lib.org), [httr](https://httr.r-lib.org), [curl](https://jeroen.r-universe.dev/curl#), or [crul](http://docs.ropensci.org/crul/) over [RCurl](https://cran.rstudio.com/web/packages/RCurl/). If you like low-level clients for HTTP, curl is best, whereas httr2, httr and crul are better for higher-level access.
Expand Down Expand Up @@ -549,4 +549,5 @@ If you intend your package to be submitted to, or if your package is on, Biocond
#### MOOCs {#moo-cs}

There is a [Coursera specialization corresponding to the book by Roger Peng, Sean Kross and Brooke Anderson](https://fr.coursera.org/specializations/r), with a course specifically about R packages.



Loading
Loading