Skip to content

Commit 35225f4

Browse files
committed
add tidy tools to repo
1 parent 7553cf5 commit 35225f4

File tree

11 files changed

+228
-2
lines changed

11 files changed

+228
-2
lines changed

.Rbuildignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
^README\.Rmd$
55
^cran-comments\.md$
66
^private$
7+
^\.github$
8+
^codecov\.yml$
9+
^_pkgdown\.yml$
10+
^docs$
11+
^pkgdown$

.github/.gitignore

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

.github/workflows/R-CMD-check.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
#
4+
# NOTE: This workflow is overkill for most R packages and
5+
# check-standard.yaml is likely a better choice.
6+
# usethis::use_github_action("check-standard") will install it.
7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
11+
12+
name: R-CMD-check.yaml
13+
14+
permissions: read-all
15+
16+
jobs:
17+
R-CMD-check:
18+
runs-on: ${{ matrix.config.os }}
19+
20+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
config:
26+
- {os: macos-latest, r: 'release'}
27+
28+
- {os: windows-latest, r: 'release'}
29+
# use 4.0 or 4.1 to check with rtools40's older compiler
30+
- {os: windows-latest, r: 'oldrel-4'}
31+
32+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
33+
- {os: ubuntu-latest, r: 'release'}
34+
- {os: ubuntu-latest, r: 'oldrel-1'}
35+
- {os: ubuntu-latest, r: 'oldrel-2'}
36+
- {os: ubuntu-latest, r: 'oldrel-3'}
37+
- {os: ubuntu-latest, r: 'oldrel-4'}
38+
39+
env:
40+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
41+
R_KEEP_PKG_SOURCE: yes
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: r-lib/actions/setup-pandoc@v2
47+
48+
- uses: r-lib/actions/setup-r@v2
49+
with:
50+
r-version: ${{ matrix.config.r }}
51+
http-user-agent: ${{ matrix.config.http-user-agent }}
52+
use-public-rspm: true
53+
54+
- uses: r-lib/actions/setup-r-dependencies@v2
55+
with:
56+
extra-packages: any::rcmdcheck
57+
needs: check
58+
59+
- uses: r-lib/actions/check-r-package@v2
60+
with:
61+
upload-snapshots: true
62+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: any::pkgdown, local::.
37+
needs: website
38+
39+
- name: Build site
40+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
41+
shell: Rscript {0}
42+
43+
- name: Deploy to GitHub pages 🚀
44+
if: github.event_name != 'pull_request'
45+
uses: JamesIves/[email protected]
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.github/workflows/pr-commands.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
issue_comment:
5+
types: [created]
6+
7+
name: pr-commands.yaml
8+
9+
permissions: read-all
10+
11+
jobs:
12+
document:
13+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
14+
name: document
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
permissions:
19+
contents: write
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: r-lib/actions/pr-fetch@v2
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: r-lib/actions/setup-r@v2
28+
with:
29+
use-public-rspm: true
30+
31+
- uses: r-lib/actions/setup-r-dependencies@v2
32+
with:
33+
extra-packages: any::roxygen2
34+
needs: pr-document
35+
36+
- name: Document
37+
run: roxygen2::roxygenise()
38+
shell: Rscript {0}
39+
40+
- name: commit
41+
run: |
42+
git config --local user.name "$GITHUB_ACTOR"
43+
git config --local user.email "[email protected]"
44+
git add man/\* NAMESPACE
45+
git commit -m 'Document'
46+
47+
- uses: r-lib/actions/pr-push@v2
48+
with:
49+
repo-token: ${{ secrets.GITHUB_TOKEN }}
50+
51+
style:
52+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
53+
name: style
54+
runs-on: ubuntu-latest
55+
env:
56+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
57+
permissions:
58+
contents: write
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- uses: r-lib/actions/pr-fetch@v2
63+
with:
64+
repo-token: ${{ secrets.GITHUB_TOKEN }}
65+
66+
- uses: r-lib/actions/setup-r@v2
67+
68+
- name: Install dependencies
69+
run: install.packages("styler")
70+
shell: Rscript {0}
71+
72+
- name: Style
73+
run: styler::style_pkg()
74+
shell: Rscript {0}
75+
76+
- name: commit
77+
run: |
78+
git config --local user.name "$GITHUB_ACTOR"
79+
git config --local user.email "[email protected]"
80+
git add \*.R
81+
git commit -m 'Style'
82+
83+
- uses: r-lib/actions/pr-push@v2
84+
with:
85+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ rsconnect/
5050
.Rproj.user
5151

5252
private
53+
docs

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ Description: This package provides some alternatives to sf functions,
99
used with duckdb and duckspatial. I have no idea where this project
1010
will go, use at your own risk.
1111
License: MIT + file LICENSE
12+
URL: http://www.ekotov.pro/ducksf/
1213
Imports:
1314
arrow,
1415
DBI,
1516
dplyr,
1617
duckdb,
1718
geoarrow,
1819
glue,
20+
rlang,
1921
sf,
20-
wk,
21-
rlang
22+
wk
2223
Suggests:
2324
areal,
2425
quarto,

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
1212
[![CRAN
1313
status](https://www.r-pkg.org/badges/version/ducksf.png)](https://CRAN.R-project.org/package=ducksf)
14+
[![R-CMD-check](https://github.com/e-kotov/ducksf/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/e-kotov/ducksf/actions/workflows/R-CMD-check.yaml)
15+
<!-- [![Codecov test coverage](https://codecov.io/gh/e-kotov/ducksf/graph/badge.svg)](https://app.codecov.io/gh/e-kotov/ducksf) -->
1416
<!-- badges: end -->
1517

1618
This package provides some alternatives to sf functions, which are

README.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ is_html <- knitr::is_html_output()
2525
<!-- badges: start -->
2626
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
2727
[![CRAN status](https://www.r-pkg.org/badges/version/ducksf)](https://CRAN.R-project.org/package=ducksf)
28+
[![R-CMD-check](https://github.com/e-kotov/ducksf/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/e-kotov/ducksf/actions/workflows/R-CMD-check.yaml)
29+
<!-- [![Codecov test coverage](https://codecov.io/gh/e-kotov/ducksf/graph/badge.svg)](https://app.codecov.io/gh/e-kotov/ducksf) -->
2830
<!-- badges: end -->
2931

3032
This package provides some alternatives to sf functions, which are implemented using duckdb and geoarrow. It is intended to be used with duckdb and duckspatial. I have no idea where this project will go, use at your own risk.

_pkgdown.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
url: http://www.ekotov.pro/ducksf/
2+
template:
3+
bootstrap: 5
4+

0 commit comments

Comments
 (0)