Skip to content

Commit

Permalink
Merge pull request #34 from eitsupi/ci
Browse files Browse the repository at this point in the history
ci: use p3m and pak to R package binary installation
  • Loading branch information
ddotta authored Apr 29, 2024
2 parents 286c784 + 8c9c8f9 commit 4c45887
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 16 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/quarto-render-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-deploy:
runs-on: ubuntu-latest
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:
Expand All @@ -25,18 +26,21 @@ 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
with:
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
Expand Down
35 changes: 35 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Package: cookbookrpolars
Title: Cookbook to provide solutions to common tasks and problemes in using Polars with R
Version: 0.0.1
Authors@R:
c(person(given = "Damien",
family = "Dotta",
role = c("aut", "cre"),
email = "[email protected]"))
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
Imports:
polars,
rmarkdown,
dplyr,
tidyr,
arrow,
data.table,
fakir,
tictoc,
duckdb,
DBI,
microbenchmark,
readr,
fs,
ggplot2,
pryr,
dbplyr,
forcats,
collapse
12 changes: 3 additions & 9 deletions book/content/first_steps/_setup_first_steps.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```

0 comments on commit 4c45887

Please sign in to comment.