From 13456cdc0ad09448ce467bd4c819a4fede6830cc Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Apr 2024 12:36:04 +0000 Subject: [PATCH 1/5] ci: use p3m and pak to R package binary installation --- .github/workflows/quarto-render-publish.yml | 8 +++--- DESCRIPTION | 30 +++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 DESCRIPTION diff --git a/.github/workflows/quarto-render-publish.yml b/.github/workflows/quarto-render-publish.yml index efdddc8..21745a9 100644 --- a/.github/workflows/quarto-render-publish.yml +++ b/.github/workflows/quarto-render-publish.yml @@ -25,11 +25,13 @@ jobs: - name: Install R uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + Ncpus: 2 + extra-repositories: https://rpolars.r-universe.dev - name: Install packages - run: | - Rscript -e 'install.packages(c("rmarkdown","dplyr","tidyr","arrow","data.table","fakir","tictoc","duckdb","DBI","microbenchmark","readr","fs","ggplot2","pryr","dbplyr","forcats"))' - Rscript -e 'install.packages("polars", repos = "https://rpolars.r-universe.dev")' + uses: r-lib/actions/setup-r-dependencies@v2 - name: Render Quarto Project uses: quarto-dev/quarto-actions/render@v2 diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..13dd58e --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,30 @@ +Package: cookbookrpolars +Title: What the Package Does (One Line, Title Case) +Version: 0.0.0.9000 +Authors@R: + person("First", "Last", , "first.last@example.com", role = c("aut", "cre"), + comment = c(ORCID = "YOUR-ORCID-ID")) +Description: What the package does (one paragraph). +License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a + license +Encoding: UTF-8 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.1 +Imports: + polars, + rmarkdown, + dplyr, + tidyr, + arrow, + data.table, + fakir, + tictoc, + duckdb, + DBI, + microbenchmark, + readr, + fs, + ggplot2, + pryr, + dbplyr, + forcats From 952d54f92892bcad59e36cabbca1b7d1909c03f0 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Apr 2024 12:38:34 +0000 Subject: [PATCH 2/5] ci: check rendering via pull request --- .github/workflows/quarto-render-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/quarto-render-publish.yml b/.github/workflows/quarto-render-publish.yml index 21745a9..f4bc8af 100644 --- a/.github/workflows/quarto-render-publish.yml +++ b/.github/workflows/quarto-render-publish.yml @@ -4,6 +4,10 @@ on: push: branches: - main + pull_request: + branches: + - main + workflow_dispatch: jobs: build-deploy: @@ -39,6 +43,7 @@ jobs: path: book # By default, the current working dir is used i.e `quarto render .` - name: Publish to GitHub Pages (and render) + if: github.event_name != 'pull_request' uses: quarto-dev/quarto-actions/publish@v2 with: path: book From bb0ec591b94a540147afeb35205937e05ab4d83a Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Apr 2024 12:48:00 +0000 Subject: [PATCH 3/5] chore: minor update about installation code --- DESCRIPTION | 3 ++- book/content/first_steps/_setup_first_steps.qmd | 12 +++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 13dd58e..e38b4c4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,4 +27,5 @@ Imports: ggplot2, pryr, dbplyr, - forcats + forcats, + collapse diff --git a/book/content/first_steps/_setup_first_steps.qmd b/book/content/first_steps/_setup_first_steps.qmd index 8bdaa1b..4e164b8 100644 --- a/book/content/first_steps/_setup_first_steps.qmd +++ b/book/content/first_steps/_setup_first_steps.qmd @@ -27,21 +27,15 @@ Until the R polars package is uploaded to CRAN, [the polars package development The most practical one in my opinion at the moment is to use [R-universe](https://r-universe.dev/search/) and install like this: -``` {r} -#| label: installation -#| message: false -#| warning: false -#| results: 'hide' - +```{.r} install.packages("polars", repos = "https://rpolars.r-universe.dev") -library(polars) ``` -To know the version of the `polars` package you have just installed and to have information on which features are enabled, you can use the `polars_info()` method. +To know the version of the `polars` package you have just installed and to have information on which features are enabled, you can use the `polars_info()` function. ```{r} #| label: polars_info-function +library(polars) polars_info() ``` - From b51c686c747516c5e8f766f1d6a8b8c511ee16d1 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sun, 28 Apr 2024 12:52:36 +0000 Subject: [PATCH 4/5] ci: remove unused step --- .github/workflows/quarto-render-publish.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/quarto-render-publish.yml b/.github/workflows/quarto-render-publish.yml index f4bc8af..2df7eea 100644 --- a/.github/workflows/quarto-render-publish.yml +++ b/.github/workflows/quarto-render-publish.yml @@ -15,10 +15,7 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v3 - - - name: Setup pandoc - uses: r-lib/actions/setup-pandoc@v2 - + - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 with: From 8c9c8f9716978f0a41686b0a2af3c5bb7ae936c9 Mon Sep 17 00:00:00 2001 From: Damien Dotta Date: Mon, 29 Apr 2024 09:08:50 +0200 Subject: [PATCH 5/5] doc: fill DESCRIPTION file --- DESCRIPTION | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e38b4c4..afd08c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,16 @@ Package: cookbookrpolars -Title: What the Package Does (One Line, Title Case) -Version: 0.0.0.9000 +Title: Cookbook to provide solutions to common tasks and problemes in using Polars with R +Version: 0.0.1 Authors@R: - person("First", "Last", , "first.last@example.com", role = c("aut", "cre"), - comment = c(ORCID = "YOUR-ORCID-ID")) -Description: What the package does (one paragraph). -License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a - license + c(person(given = "Damien", + family = "Dotta", + role = c("aut", "cre"), + email = "damien.dotta@live.fr")) +Description: The purpose of this book is to introduce some of the features + of Polars with R. It contains a side-by-side comparison between Polars, + R base and the two most popular packages for data manipulation dplyr + and data.table. +License: file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1