Skip to content

Commit

Permalink
Merge branch 'main' into maintenance_curation.Rmd-pt-auto
Browse files Browse the repository at this point in the history
  • Loading branch information
yabellini authored Feb 6, 2024
2 parents 73e5e5d + caf6477 commit 69b5155
Show file tree
Hide file tree
Showing 22 changed files with 259 additions and 194 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 3
extra-packages: local::.

- name: Render book
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Generated by roxygen2: do not edit by hand

export(translate_page)
25 changes: 25 additions & 0 deletions R/translate.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
#' Function translating one placeholder to actual content
#'
#' Also helps opening the PR
#'
#' @param page_path Path to the placeholder. First create on main,
#' for instance to translate index.Rmd to Portuguese,
#' first create a copy of index.Rmd as index.pt.Rmd on main.
#' @param language Language to which to translate.
#' See [docs of the `source_lang` and `target_lang` API parameters](https://www.deepl.com/docs-api/translate-text).
#' @param glossary Glossary name.
#'
#' @details
#' First follow babeldown docs to set the two environment variables.
#'
#' ```r
#' Sys.setenv("DEEPL_API_URL" = "https://api.deepl.com")
#' Sys.setenv(DEEPL_API_KEY = keyring::key_get("deepl"))
#' ```
#'
#'
#' @return Nothing
#' @export
#'
#' @examples
#' translate_page("index.pt.Rmd", "PT-BR")
translate_page <- function(page_path, language, glossary = NULL) {
git_branch_name <- sprintf(
"%s-%s-auto",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Refer to [this blog post for more details and resources about bookdown deploymen

If you're an associate editor, you can also push directly to `main` for small fixes. We shall use PRs to `main` for discussing larger updates.

If you're an associate editor and you want to render the book locally you need to install `bookdown` and the other dependencies stated in [DESCRIPTION](DESCRIPTION) in particular use `devtools::install_github("bergant/airtabler")`, and [get and store an Airtable API key following their instructions](https://github.com/bergant/airtabler#get-and-store-the-api-key) (if you're not an editor, you don't have access to our Airtable base). Then use `bookdown::render_book('index.Rmd', 'bookdown::gitbook')` and the book will be generated in the `_book` folder; you can open the book on the command line by doing `open _book/index.html`.
If you're an associate editor and you want to render the book locally you need to install Quarto and the other dependencies stated in [DESCRIPTION](DESCRIPTION) in particular use `pak::pak("bergant/airtabler")`, and [get and store an Airtable API key following their instructions](https://github.com/bergant/airtabler#get-and-store-the-api-key) (if you're not an editor, you don't have access to our Airtable base). Then use `bookdown::render_book('index.Rmd', 'bookdown::gitbook')` and the book will be generated in the `_book` folder; you can open the book on the command line by doing `open _book/index.html`.

# Meta

Expand Down
8 changes: 7 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ book:
The third section also features a chapter for anyone wishing
to start contributing to rOpenSci packages.
cover-image: images/cover.png
reader-mode: true
site-url: https://devguide.ropensci.org/
repo-url: https://github.com/ropensci/dev_guide/
repo-actions: [edit, issue]
Expand Down Expand Up @@ -99,6 +98,13 @@ format:
include-in-header: "preamble.tex"
output-file: "ropensci-dev-guide"
babelquarto:
languagecodes:
- name: es
text: "Español"
- name: en
text: "English"
- name: pt
text: "Português"
mainlanguage: en
languages: ['es', 'pt']
title-pt: title in pt
Expand Down
2 changes: 2 additions & 0 deletions booknews.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## dev (0.9.0)

- 2024-01-09, update roxygen2 wording (`@vincentvanhees`, #792).

- 2023-12-15, update roxygen2 advice, mainly linking to roxygen2 website (#750).

- 2023-09-15, add suggestions for API packages (#496).
Expand Down
2 changes: 1 addition & 1 deletion index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ u <- "https://zenodo.org/record/2553043" # universal URL redirects to latest
s <- rvest::session(u)
u <- paste0(s$url, "/export/bibtex") # redirected
out <- rvest::read_html(u)
bibentry <- rvest::html_text(rvest::html_element(out, "pre"))
bibentry <- rvest::html_text(out)
cat(bibentry)
cat("\n```\n")
```
Expand Down
170 changes: 85 additions & 85 deletions maintenance_collaboration.pt.Rmd

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions maintenance_marketing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ aliases:
We will help you promoting your package but here are some more things to keep in mind.
```

- If you hear of an use case of your package, please encourage its author to post the link to our [discussion forum in the Use Cases category](https://discuss.ropensci.org/c/usecases), [for a tweet from rOpenSci and possible inclusion in the rOpenSci biweekly newsletter](https://discuss.ropensci.org/t/about-the-usecases-category/33). We also recommend you to add a link to the use case in a "use cases in the wild" section of your README.
- If you hear of an use case of your package, please encourage its author to post the link to our [discussion forum in the Use Cases category](https://discuss.ropensci.org/c/usecases), [for a toot (Mastodon post) from rOpenSci and inclusion in the rOpenSci monthly newsletter](https://discuss.ropensci.org/t/about-the-usecases-category/33). We also recommend you to add a link to the use case in a "use cases in the wild" section of your README.

- Post about your package on Mastodon using the "#rstats" hashtag and tag rOpenSci! This might help with contributor/user engagement. Example posts from rOpenSci itself: [A package a day](hachyderm.io/@rOpenSci/111611705648653729), [Help wanted post](hachyderm.io/@rOpenSci/111460729804231877), [Use cases](hachyderm.io/@rOpenSci/111371091053569287), [Welcome post]( hachyderm.io/@rOpenSci/111342069863172097).

- When you [release](#releasing) a new version of your package or release it to CRAN for the first time,

- Make a pull request to [R Weekly](https://github.com/rweekly/rweekly.org) with a line about the release under the "New Releases" section (or "New Packages" for the first GitHub/CRAN release).

- Tweet about it using the "#rstats" hashtag and tag rOpenSci! This might help with contributor/user engagement. [Example](https://twitter.com/opencpu/status/1003934871830622208).
- Post about it on social media.

- Consider submitting a short post about the release to [rOpenSci tech notes](https://ropensci.org/technotes/). Contact rOpenSci Community Manager, (e.g. via Slack or [[email protected]](mailto:[email protected])). Refer to [the guidelines about contributing a blog post](https://blogguide.ropensci.org)).

- Submit your package to lists of packages such as [CRAN Task Views](https://cran.r-project.org/web/views/), and [rOpenSci non-CRAN Task Views](https://github.com/search?utf8=%E2%9C%93&q=user%3Aropensci+%22task+view%22&type=Repositories&ref=searchresults).
- Submit your package to lists of packages such as [CRAN Task Views](https://cran.r-project.org/web/views/).

- If you choose to market your package by giving a talk about it at a meetup or conference (excellent idea!)
read [this article of Jenny Bryan's and Mara Averick's](https://www.tidyverse.org/articles/2018/07/carpe-talk/).
Expand Down
13 changes: 7 additions & 6 deletions maintenance_marketing.es.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ repo-actions: true

```{block, type="summaryblock"}
Te ayudaremos a promocionar tu paquete, pero aquí hay algunas cosas más para tener en cuenta.
```
- Si te enteras de un caso de uso de tu paquete, anima a quien lo escribió a publicar el enlace en nuestro [foro de debate en la categoría Casos de uso](https://discuss.ropensci.org/c/usecases), [para recibir un tweet de rOpenSci y su posible inclusión en el boletín quincenal de rOpenSci](https://discuss.ropensci.org/t/about-the-usecases-category/33).
- Si te enteras de un caso de uso de tu paquete, anima a quien lo escribió a publicar el enlace en nuestro [foro de debate en la categoría Casos de uso](https://discuss.ropensci.org/c/usecases), [para recibir un toot (mensaje en Mastodon) de rOpenSci y su posible inclusión en el boletín mensual de rOpenSci](https://discuss.ropensci.org/t/about-the-usecases-category/33).
También te recomendamos que añadas un enlace al caso de uso en la sección "casos de uso reales" de tu archivo *README*.
- Cuando [publiques](#releasing) una nueva versión de tu paquete o lo publiques en CRAN por primera vez,
- Comparte sobre el paquete en Mastodon utilizando el hashtag "#rstats" y etiqueta a rOpenSci!
Esto puede ayudar llegar a gente que pueda colaborar o usar el paquete.
Ejemplos enviados desde rOpenSci mismo: ["A package a day" (un paquete al dia)](hachyderm.io/@rOpenSci/111611705648653729), [Help wanted (se necesita ayuda)](hachyderm.io/@rOpenSci/111460729804231877), [Use case (caso de uso)](hachyderm.io/@rOpenSci/111371091053569287), [Welcome post (mensaje de bienvenida)]( hachyderm.io/@rOpenSci/111342069863172097).
- haz un *pull request* a [R Weekly](https://github.com/rweekly/rweekly.org) con una mensaje sobre la versión en la sección "*New Releases*" (o "*New Packages*" para la primera versión de GitHub/CRAN).
- ¡Tuitea sobre ello utilizando el hashtag "#rstats" y etiqueta a rOpenSci!
Esto puede ayudar llegar a gente que pueda colaborar o usar el paquete.
[Por ejemplo](https://twitter.com/opencpu/status/1003934871830622208).
- Comparte en tus redes sociales.
- Considera enviar un breve artículo sobre el lanzamiento a [rOpenSci tech notes](https://ropensci.org/technotes/).
Ponte en contacto con la persona encargada de gestionar la comunidad de rOpenSci, (por ejemplo, a través de Slack o [[email protected]](mailto:[email protected])).
Consulta [las recomendaciones sobre cómo contribuir con un artículo en el blog](https://blogguide.ropensci.org)).
- Envía tu paquete a listas de paquetes como [*CRAN Task Views*](https://cran.r-project.org/web/views/), y [rOpenSci non-CRAN Task Views](https://github.com/search?utf8=%E2%9C%93&q=user%3Aropensci+%22task+view%22&type=Repositories&ref=searchresults).
- Envía tu paquete a listas de paquetes como [*CRAN Task Views*](https://cran.r-project.org/web/views/).
- Si decides promocionar tu paquete dando una charla sobre él en una reunión o conferencia (¡excelente idea!) lee en [este artículo de Jenny Bryan y Mara Averick (en inglés)](https://www.tidyverse.org/articles/2018/07/carpe-talk/).
Expand Down
2 changes: 1 addition & 1 deletion maintenance_releases.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Note that you could streamline the process of updating NEWS and versioning your

## Versioning {#versioning}

- We strongly recommend that rOpenSci packages use semantic versioning. A detailed explanation is available in the [description chapter](https://r-pkgs.org/description.html#version).
- We strongly recommend that rOpenSci packages use semantic versioning. A detailed explanation is available in the [lifecycle chapter of the R packages book](https://r-pkgs.org/lifecycle.html).

## Releasing {#releasing}

Expand Down
7 changes: 6 additions & 1 deletion maintenance_releases.es.Rmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
aliases:
- releasing.html
---

# Publicar un paquete {#releasing}

```{block, type="summaryblock"}
Expand All @@ -10,7 +15,7 @@ Ten en cuenta que el proceso de actualización de *NEWS* y de versionado de tu p

## Versionar {#versioning}

- Recomendamos encarecidamente que los paquetes de rOpenSci utilicen el versionado semántico. Hay una explicación detallada en el [capítulo sobre el archivo *DESCRIPTION* (en inglés)](https://r-pkgs.org/description.html#version).
- Recomendamos encarecidamente que los paquetes de rOpenSci utilicen el versionado semántico. Hay una explicación detallada en el [capitulo "lifecyle" del libro "R packages" (en inglés)](https://r-pkgs.org/lifecycle.html).

## Publicar {#releasing}

Expand Down
44 changes: 22 additions & 22 deletions maintenance_releases.pt.Rmd
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
---
aliases:
aliases:
- releasing.html
---

# Releasing a package {#releasing}
# Publicação de um pacote {#releasing}

```{block, type="summaryblock"}
Your package should have different versions over time: snapshots of a state of the package that you can release to CRAN for instance. These versions should be properly _numbered_, _released_ and _described in a NEWS file_. More details below.
Seu pacote deve ter versões diferentes ao longo do tempo: *snapshots* de um estado do pacote que você pode publicar no CRAN, por exemplo. Essas versões devem ser devidamente _numeradas_, _publicadas_ e _descritas em um arquivo NEWS_. Mais detalhes abaixo.
Note that you could streamline the process of updating NEWS and versioning your package by using [the `fledge` package](https://github.com/cynkra/fledge).
Observe que você pode simplificar o processo de atualização do NEWS e do controle de versão do seu pacote usando [o pacote `fledge`] (https://github.com/cynkra/fledge).
```

## Versioning {#versioning}
## Controle de versão {#versioning}

- We strongly recommend that rOpenSci packages use semantic versioning. A detailed explanation is available in the [description chapter](https://r-pkgs.org/description.html#version).
- Recomendamos enfaticamente que os pacotes rOpenSci usem controle de versão semântico. Uma explicação detalhada está disponível no [capítulo de ciclo de vida do livro *R Packages*](https://r-pkgs.org/lifecycle.html).

## Releasing {#releasing}
## Publicação {#releasing}

- Using `usethis::use_release_issue()` and `devtools::release()` will help you remember about more checks.
- Usando `usethis::use_release_issue()` e `devtools::release()` ajudará você a se lembrar de mais verificações.

- Git tag each release after every submission to CRAN. [more info](https://help.github.com/articles/creating-releases/)
- Marque cada versão no Git após cada envio ao CRAN. [Mais informações](https://help.github.com/articles/creating-releases/)

- CRAN does not like too frequent updates. That said, if you notice a major problem one week after a CRAN release, explain it in cran-comments.md and try releasing a newer version.
- O CRAN não gosta de atualizações muito frequentes. Dito isso, se você notar um grande problema uma semana após o lançamento do CRAN, explique-o no cran-comments.md e tente lançar uma versão mais recente.

## News file {#news}
## Arquivo de notícias {#news}

A NEWS file describing changes associated with each version makes it easier for users to see what's changing in the package and how it might impact their workflow. You must add one for your package, and make it easy to read.
Um arquivo NEWS que descreve as alterações associadas a cada versão facilita para os usuários verem o que está mudando no pacote e como isso pode afetar seu fluxo de trabalho. Você deve adicionar um para o seu pacote e torná-lo fácil de ler.

- It is mandatory to use a `NEWS` or `NEWS.md` file in the root of your package. We recommend using `NEWS.md` to make the file [more browsable](https://happygitwithr.com/workflows-browsability.html).
- Please use our example [NEWS file](#newstemplate) as a model. You can find a good NEWS file in the wild [in the `taxize` package repo](https://github.com/ropensci/taxize/blob/master/NEWS.md) for instance.
- If you use `NEWS`, add it to `.Rbuildignore`, but not if you use `NEWS.md`
- Update the news file before every CRAN release, with a section with the package name, version and date of release, like (as seen in our example [NEWS file](#newstemplate)):
- É obrigatório usar um arquivo `NEWS` ou `NEWS.md` na raiz do seu pacote. Recomendamos que você use o arquivo `NEWS.md` para tornar o arquivo [mais navegável](https://happygitwithr.com/workflows-browsability.html).
- Por favor, use nosso exemplo [Arquivo NEWS](#newstemplate) como modelo. Você pode encontrar um bom arquivo NEWS na natureza [na seção `taxize` repositório de pacotes](https://github.com/ropensci/taxize/blob/master/NEWS.md) por exemplo.
- Se você usar `NEWS` adicione-o a `.Rbuildignore` mas não se você usar `NEWS.md`
- Atualize o arquivo de notícias antes de cada lançamento do CRAN, com uma seção com o nome do pacote, a versão e a data de lançamento, como (como visto em nosso exemplo) [Arquivo NEWS](#newstemplate)):

```
foobar 0.2.0 (2016-04-01)
=========================
```

- Under that header, put in sections as needed, including: `NEW FEATURES`, `MINOR IMPROVEMENTS`, `BUG FIXES`, `DEPRECATED AND DEFUNCT`, `DOCUMENTATION FIXES` and any special heading grouping a large number of changes. Under each header, list items as needed (as seen in our example [NEWS file](#newstemplate)). For each item give
a description of the new feature, improvement, bug fix, or deprecated function/feature. Link
to any related GitHub issue like `(#12)`. The `(#12)` will resolve on GitHub in Releases to a link to that issue in the repo.
- After you have added a `git tag` and pushed up to GitHub, add the news items for that tagged version to the Release notes of a release in your GitHub repo with a title like `pkgname v0.1.0`. See [GitHub docs about creating a release](https://help.github.com/articles/creating-releases/).
- New CRAN releases will be written about [in our newsletter](https://news.ropensci.org/) but see [next chapter about marketing](#marketing) about how to inform more potential users about the release.
- For more guidance about the NEWS file we suggest reading the [tidyverse NEWS style guide](https://style.tidyverse.org/news.html).
- Sob esse cabeçalho, coloque as seções conforme necessário, incluindo: `NEW FEATURES`, `MINOR IMPROVEMENTS`, `BUG FIXES`, `DEPRECATED AND DEFUNCT`, `DOCUMENTATION FIXES` e qualquer título especial que agrupe um grande número de alterações. Em cada cabeçalho, liste os itens conforme necessário (como visto em nosso exemplo [Arquivo NEWS](#newstemplate)). Para cada item, forneça
uma descrição do novo recurso, melhoria, correção de bug ou função/característica obsoleta. Link
para qualquer problema relacionado no GitHub, como `(#12)`. O problema `(#12)` será resolvido no GitHub em Releases para um link para esse problema no repositório.
- Depois que você tiver adicionado um `git tag` e enviado para o GitHub, adicione os itens de notícias para essa versão marcada às notas de versão de uma versão no seu repositório do GitHub com um título como `pkgname v0.1.0`. Você pode ver [Documentos do GitHub sobre a criação de uma versão](https://help.github.com/articles/creating-releases/).
- Novos lançamentos do CRAN serão escritos sobre [em nosso boletim informativo](https://news.ropensci.org/) mas veja [próximo capítulo sobre marketing](#marketing) sobre como informar mais usuários em potencial sobre o lançamento.
- Para obter mais orientações sobre o arquivo NEWS, sugerimos que você leia o documento [guia de estilo do tidyverse NEWS](https://style.tidyverse.org/news.html).


34 changes: 34 additions & 0 deletions man/translate_page.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 69b5155

Please sign in to comment.