Skip to content

Commit 2e5d1ee

Browse files
committed
Merge remote-tracking 'rpolars/main' into main
2 parents 0d24b7f + 2c712c6 commit 2e5d1ee

File tree

369 files changed

+31328
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+31328
-1
lines changed

.Rbuildignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
^renv$
2+
^renv\.lock$
3+
^rpolars\.Rproj$
4+
^\.Rproj\.user$
5+
^_pkgdown\.yml$
6+
^docs$
7+
^pkgdown$
8+
^\.github$

.Rprofile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source("renv/activate.R")

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- "**" # Push events to every tag including hierarchical tags like v1.0/beta
8+
pull_request:
9+
branches:
10+
- "*"
11+
#release:
12+
# types: [published]
13+
14+
workflow_dispatch:
15+
16+
name: pkgdown
17+
18+
jobs:
19+
pkgdown:
20+
runs-on: ${{ matrix.config.os }}
21+
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }} rust-${{ matrix.config.rust-version }})
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
config:
27+
- { os: macOS-latest, r: "release", rust-version: "nightly" }
28+
- { os: ubuntu-latest, r: "release", rust-version: "nightly" }
29+
- {
30+
os: windows-latest,
31+
r: "release",
32+
rust-version: "nightly-gnu",
33+
rtools-version: "42",
34+
}
35+
36+
env:
37+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
38+
docs_key: ${{ secrets.DEPLOY_DOCS }}
39+
repo_token: ${{ secrets.GITHUB_TOKEN }}
40+
TOOLCHAIN: ${{ matrix.config.rust-version }}
41+
42+
permissions:
43+
contents: write
44+
45+
steps:
46+
- uses: actions/checkout@v3
47+
48+
- name: check if release
49+
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
50+
run: |
51+
echo this is a release
52+
53+
- name: Fix path for Windows caching
54+
if: runner.os == 'Windows'
55+
shell: bash
56+
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH
57+
58+
- name: cache rpolars rust targets
59+
id: cache-rust-targets
60+
uses: actions/cache@v3
61+
env:
62+
cache-name: cache-rust-targets
63+
with:
64+
path: ./src/rust/target/
65+
key: ${{ runner.os }}-cargo-target-${{ hashFiles('./src/rust/Cargo.toml') }}
66+
restore-keys: |
67+
${{ runner.os }}-cargo-target-${{ hashFiles('./src/rust/Cargo.toml') }}
68+
${{ runner.os }}-cargo-target
69+
70+
- uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: ${{ matrix.config.rust-version }}
73+
default: true
74+
75+
- uses: r-lib/actions/setup-pandoc@v2
76+
77+
- name: Install macOS system dependencies
78+
if: runner.os == 'macOS'
79+
run: |
80+
brew install imagemagick@6
81+
brew install libgit2
82+
brew install harfbuzz fribidi
83+
84+
- name: Install ubuntu SYSTEM REQUIREMENTS
85+
if: runner.os == 'Linux'
86+
run: |
87+
sudo apt-get update -y
88+
sudo apt-get install -y libfontconfig1-dev
89+
sudo apt-get install -y libfreetype6-dev
90+
sudo apt-get install -y libfribidi-dev
91+
sudo apt-get install -y git
92+
sudo apt-get install -y make
93+
sudo apt-get install -y libharfbuzz-dev
94+
sudo apt-get update -y
95+
sudo apt-get install -y libcurl4-openssl-dev
96+
sudo apt-get install -y libgit2-dev
97+
sudo apt-get install -y libicu-dev
98+
sudo apt-get install -y libjpeg-dev
99+
sudo apt-get install -y libpng-dev
100+
sudo apt-get install -y libtiff-dev
101+
sudo apt-get install -y libxml2-dev
102+
sudo apt-get install -y libssl-dev
103+
104+
- uses: r-lib/actions/setup-r@v2
105+
with:
106+
r-version: ${{ matrix.config.r }}
107+
use-public-rspm: false
108+
install-r: true
109+
rtools-version: "42"
110+
update-rtools: true
111+
Ncpus: 2
112+
113+
- uses: r-lib/actions/setup-renv@v2
114+
with:
115+
cache-version: 2
116+
117+
- name: build package + test
118+
run: |
119+
devtools::install(quick = TRUE)
120+
devtools::test(stop_on_failure = TRUE)
121+
shell: Rscript {0}
122+
123+
- name: build binary
124+
run: |
125+
fn = devtools::build(binary = TRUE, args = c('--preclean'))
126+
if (R.version$os != "mingw32") {
127+
newfn = paste0(substr(fn,1,regexpr("_",fn)),"_",R.version$platform,".",tools::file_ext(fn))
128+
file.rename(fn,newfn)
129+
} else {
130+
file.rename(fn,"../rpolars.zip") #R expects specific windows binary filename
131+
}
132+
shell: Rscript {0}
133+
134+
- name: Release
135+
uses: softprops/action-gh-release@v1
136+
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
137+
with:
138+
#tag_name: ${{ github.run_number }}
139+
files: |
140+
../rpolars_*
141+
../rpolars.zip
142+
143+
- name: pre-release
144+
uses: softprops/action-gh-release@v1
145+
if: github.event_name == 'pull_request'
146+
with:
147+
body: "Ignore me: I'm just a pre-release."
148+
prerelease: true
149+
tag_name: Pull-Request-${{github.event.number}}
150+
target_commitish: ""
151+
files: |
152+
../rpolars_*
153+
../rpolars.zip
154+
155+
- name: print files
156+
run: print(list.files("..",recursive = TRUE,full.names=TRUE))
157+
shell: Rscript {0}
158+
159+
- name: print wd
160+
run: print(getwd())
161+
shell: Rscript {0}
162+
163+
- name: Build site
164+
if: runner.os == 'Linux'
165+
run: pkgdown::build_site_github_pages(new_process = FALSE, devel=TRUE, install = FALSE, examples=TRUE)
166+
shell: Rscript {0}
167+
168+
- uses: webfactory/[email protected]
169+
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' && github.event_name != 'pull_request'
170+
with:
171+
ssh-private-key: ${{ secrets.DEPLOY_DOCS }}
172+
173+
- name: Deploy to GitHub pages 🚀
174+
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' && github.event_name != 'pull_request'
175+
uses: JamesIves/github-pages-deploy-action@v4
176+
with:
177+
clean: false
178+
branch: main
179+
folder: docs
180+
repository-name: rpolars/rpolars.github.io
181+
ssh-key: true

.github/workflows/release.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: Publish binaries
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Build
16+
run: cargo build --release
17+
- name: Upload binaries to release
18+
uses: svenstaro/upload-release-action@v2
19+
with:
20+
repo_token: ${{ secrets.GITHUB_TOKEN }}
21+
file: target/release/mything
22+
asset_name: mything
23+
tag: ${{ github.ref }}
24+
overwrite: true
25+
body: "This is my release text"

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# History files
2+
.Rhistory
3+
.Rapp.history
4+
# Session Data files
5+
.RData
6+
# User-specific files
7+
.Ruserdata
8+
# Example code in package build process
9+
*-Ex.R
10+
# Output files from R CMD build
11+
/*.tar.gz
12+
# Output files from R CMD check
13+
/*.Rcheck/
14+
# RStudio files
15+
.Rproj.user/
16+
# produced vignettes
17+
vignettes/*.html
18+
vignettes/*.pdf
19+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
20+
.httr-oauth
21+
# knitr and R markdown default cache directories
22+
*_cache/
23+
/cache/
24+
# Temporary files created by R markdown
25+
*.utf8.md
26+
*.knit.md
27+
# R Environment Variables
28+
.Renviron
29+
.Rproj.user
30+
my.csv
31+
test.csv
32+
docs

DESCRIPTION

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Package: rpolars
2+
Title: Polars ported to R.
3+
Version: 0.2.1
4+
Depends: R (>= 4.1.0)
5+
Authors@R:
6+
person("Soren", "Welling", , "[email protected]", role = c("aut","cre"))
7+
Description: This package aims to port the fast data table Polars to R.
8+
License: use_mit_license()
9+
Encoding: UTF-8
10+
Roxygen: list(markdown = TRUE)
11+
RoxygenNote: 7.2.1
12+
URL: https://github.com/rpolars/rpolars/
13+
Suggests:
14+
devtools, testthat (>= 3.0.0), rextendr, data.table, pkgdown
15+
Config/testthat/edition: 3
16+
Collate:
17+
'extendr-wrappers.R'
18+
'after-wrappers.R'
19+
'csv.R'
20+
'dataframe__frame.R'
21+
'datatype.R'
22+
'docs.R'
23+
'expr__expr.R'
24+
'functions.R'
25+
'groupby.R'
26+
'lazy_functions.R'
27+
'lazyframe__groupby.R'
28+
'lazyframe__lazy.R'
29+
'options.R'
30+
'parquet.R'
31+
'rlang.R'
32+
'series__series.R'
33+
'translation.R'
34+
'utils.R'
35+
'zzz.R'

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Søren Havelund Welling
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NAMESPACE

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
S3method("!",Expr)
4+
S3method("!=",DataType)
5+
S3method("!=",Expr)
6+
S3method("!=",Series)
7+
S3method("$",DataFrame)
8+
S3method("$",DataType)
9+
S3method("$",DataTypeVector)
10+
S3method("$",Expr)
11+
S3method("$",GroupBy)
12+
S3method("$",LazyFrame)
13+
S3method("$",LazyGroupBy)
14+
S3method("$",ProtoExprArray)
15+
S3method("$",RNullValues)
16+
S3method("$",Series)
17+
S3method("$",VecDataFrame)
18+
S3method("$<-",DataFrame)
19+
S3method("&",Expr)
20+
S3method("*",Expr)
21+
S3method("*",Series)
22+
S3method("+",Expr)
23+
S3method("+",Series)
24+
S3method("-",Expr)
25+
S3method("-",Series)
26+
S3method("/",Expr)
27+
S3method("/",Series)
28+
S3method("<",Expr)
29+
S3method("<",Series)
30+
S3method("<=",Expr)
31+
S3method("<=",Series)
32+
S3method("==",DataType)
33+
S3method("==",Expr)
34+
S3method("==",Series)
35+
S3method(">",Expr)
36+
S3method(">",Series)
37+
S3method(">=",Expr)
38+
S3method(">=",Series)
39+
S3method("[[",DataFrame)
40+
S3method("[[",DataType)
41+
S3method("[[",DataTypeVector)
42+
S3method("[[",Expr)
43+
S3method("[[",GroupBy)
44+
S3method("[[",LazyFrame)
45+
S3method("[[",LazyGroupBy)
46+
S3method("[[",ProtoExprArray)
47+
S3method("[[",RNullValues)
48+
S3method("[[",Series)
49+
S3method("[[",VecDataFrame)
50+
S3method("^",Expr)
51+
S3method("|",Expr)
52+
S3method(.DollarNames,DataFrame)
53+
S3method(.DollarNames,Expr)
54+
S3method(.DollarNames,GroupBy)
55+
S3method(.DollarNames,LazyFrame)
56+
S3method(.DollarNames,Series)
57+
S3method(.DollarNames,VecDataFrame)
58+
S3method(as.data.frame,DataFrame)
59+
S3method(c,Series)
60+
S3method(length,Series)
61+
S3method(print,DataFrame)
62+
S3method(print,DataType)
63+
S3method(print,Expr)
64+
S3method(print,GroupBy)
65+
S3method(print,LazyFrame)
66+
S3method(print,LazyGroupBy)
67+
S3method(print,Series)
68+
export("%**%")
69+
export("%**%.Expr")
70+
export(.pr)
71+
export(DataFrame_to_list)
72+
export(Expr_agg_groups)
73+
export(GroupBy_agg)
74+
export(GroupBy_as_data_frame)
75+
export(LazyFrame_print)
76+
export(Series_abs)
77+
export(Series_value_counts)
78+
export(concat)
79+
export(csv_reader)
80+
export(object)
81+
export(pcase)
82+
export(pl)
83+
export(read_csv_)
84+
export(scan_parquet)
85+
export(unwrap)
86+
useDynLib(rpolars, .registration = TRUE)

0 commit comments

Comments
 (0)