-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b00b9e4
commit e013417
Showing
1 changed file
with
108 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,120 @@ | ||
# inc.rtests | ||
|
||
Este meetup ofrece una visión general del flujo de trabajo para el desarrollo de paquetes, con un enfoque en las pruebas unitarias y CI/CD. | ||
|
||
## Importancia | ||
|
||
> Un paquete es un conjunto de convenciones para organizar tu código y los artefactos relacionados: si sigues esas convenciones, obtienes un montón de herramientas gratis. | ||
> -- https://mastering-shiny.org/scaling-packaging.html | ||
## Audiencia | ||
|
||
Científicos de datos con algo de experiencia escribiendo código y funciones en R, pero con poca o ninguna experiencia en el desarrollo de paquetes en R. | ||
|
||
## Objetivos | ||
|
||
Crear y chequear la infraestructura básica de un paquete: | ||
|
||
- Crear un paquete en R. | ||
- Chequear la estructura y corregir problemas. | ||
- Crear un checklist de infraestructura adicional a considerar. | ||
- Documentar el "home page", con el objetivo, installación y ejemplo. | ||
- Configurar checks de estructura en GitHub. | ||
- Configurar el despliege del website en GitHub. | ||
|
||
Crear y probar una función simple: | ||
|
||
- Crear una función simple. | ||
- Reportar la cobertura. | ||
- Probarla. | ||
- Documentarla. | ||
- Chequear la estructura y corregir problemas. | ||
- Chequear el website localmente. | ||
|
||
Mostrar otras cosas que hicimos pero que no podemos cubrir hoy: | ||
|
||
* Check de integración para una dependencias reversa. | ||
* El formato "incubadora". | ||
|
||
## Flujo de trabajo | ||
|
||
<img src=https://github.com/user-attachments/assets/aabb5a62-7f4b-4767-b1d7-52130c395531 width=500> | ||
|
||
https://r-pkgs.org/whole-game.html#review | ||
|
||
## Demo | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
En vivo. | ||
|
||
## Recursos | ||
|
||
* Paquete [usethis](https://usethis.r-lib.org/reference/index.html) para crear paquetes y mucho mas. | ||
* Workflows para trabajar con R: [r-lib/actions/examples](https://github.com/r-lib/actions/tree/v2/examples#example-workflows). | ||
* [R packages (2e)](https://r-pkgs.org/). | ||
* Worflow personalizado para checkear la integracion con una dependencia reversa: [ejemplo](https://github.com/ixpantia/tower/pull/14/files#diff-8fe6f19b5ce17649a885f3ad91e83f63c1ca2dc91dbcd00fa3bd7e242f80dda7). | ||
* El formato "incubadora" ([template](https://github.com/dsincubator/template)). | ||
|
||
|
||
|
||
<details> | ||
<summary>EN</summary> | ||
|
||
# inc.rtests | ||
|
||
<!-- badges: start --> | ||
This meetup provides an overview of the workflow for package development, focusing on unit testing and CI/CD. | ||
|
||
## Importance | ||
|
||
> A package is a set of conventions for organizing your code and related artifacts: if you follow those conventions, you get a bunch of free | ||
tools. | ||
> -- https://mastering-shiny.org/scaling-packaging.html | ||
## Audience | ||
|
||
Data scientists with some experience writing code and functions in R, but with little to no experience in R package development. | ||
|
||
## Objectives | ||
|
||
Create and check the basic infrastructure of a package: | ||
|
||
- Create a package in R. | ||
- Check the structure and fix issues. | ||
- Create a checklist of additional infrastructure to consider. | ||
- Document the "home page," including the aim, installation, and example. | ||
- Set up structure checks on GitHub. | ||
- Set up the deployment of the website on GitHub. | ||
|
||
Create and test a simple function: | ||
|
||
- Create a simple function. | ||
- Report the coverage. | ||
- Test it. | ||
- Document it. | ||
- Check the structure and fix issues. | ||
- Check the website locally. | ||
|
||
Show other things we've done but cannot cover today: | ||
|
||
* Integration check for reverse dependencies. | ||
* The "incubator" format. | ||
|
||
[![R-CMD-check](https://github.com/ixpantia/inc.rtests/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ixpantia/inc.rtests/actions/workflows/R-CMD-check.yaml) | ||
<!-- badges: end --> | ||
## Workflow | ||
|
||
The goal of inc.rtests is to greet you. | ||
<img src=https://github.com/user-attachments/assets/aabb5a62-7f4b-4767-b1d7-52130c395531 width=500> | ||
|
||
## Installation | ||
https://r-pkgs.org/whole-game.html#review | ||
|
||
You can install the development version of inc.rtests from | ||
[GitHub](https://github.com/) with: | ||
## Demo | ||
|
||
``` r | ||
# install.packages("pak") | ||
pak::pak("ixpantia/inc.rtests") | ||
``` | ||
Live. | ||
|
||
## Example | ||
## Resources | ||
|
||
This is a basic example which shows you how to solve a common problem: | ||
* Package [usethis](https://usethis.r-lib.org/reference/index.html) for creating packages and much more. | ||
* Workflows for working with R: [r-lib/actions/examples](https://github.com/r-lib/actions/tree/v2/examples#example-workflows). | ||
* [R packages (2e)](https://r-pkgs.org/). | ||
* Custom workflow to check integration with a reverse dependency: | ||
[example](https://github.com/ixpantia/tower/pull/14/files#diff-8fe6f19b5ce17649a885f3ad91e83f63c1ca2dc91dbcd00fa3bd7e242f80dda7). | ||
* The "incubator" format ([template](https://github.com/dsincubator/template)). | ||
|
||
``` r | ||
library(inc.rtests) | ||
## basic example code | ||
``` | ||
</details> |