Skip to content

Commit e1fea90

Browse files
committed
Update GitHub templates and workflows
1 parent c839852 commit e1fea90

File tree

13 files changed

+139
-34
lines changed

13 files changed

+139
-34
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ For answers to common questions about this code of conduct, see the FAQ at [http
8282
[Mozilla CoC]: https://github.com/mozilla/diversity
8383
[FAQ]: https://www.contributor-covenant.org/faq
8484
[translations]: https://www.contributor-covenant.org/translations
85+

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
This outlines how to propose a change to tabula. For more detailed info about contributing to this, and other tesselle packages, please see the [**development contributing guide**](https://www.tesselle.org/contributing.html).
3+
This outlines how to propose a change to this package. For more detailed info about contributing to this, and other packages, please see the [**development contributing guide**](https://www.tesselle.org/contributing.html).
44

55
## Fixing typos
66

@@ -12,18 +12,18 @@ If you want to make a bigger change, it's a good idea to first file an issue and
1212

1313
### Pull request process
1414

15-
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("tesselle/tabula", fork = TRUE)`.
15+
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("tesselle/PACKAGE", fork = TRUE)`.
1616
* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`. If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
1717
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`.
1818
* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser. The title of your PR should briefly describe the change. The body of your PR should contain `Fixes #issue-number`.
1919
* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tesselle.org>.
2020

2121
### Code style
2222

23-
* New code should follow the tesselle [style guide](https://style.tesselle.org).
23+
* New code should follow the [style guide](https://style.tesselle.org).
2424
* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation.
2525
* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. Contributions with test cases included are easier to accept.
2626

2727
## Code of Conduct
2828

29-
Please note that the tabula project is released with a [Contributor Code of Conduct](https://www.tesselle.org/conduct.html). By contributing to this project you agree to abide by its terms.
29+
Please note that this project is released with a [Contributor Code of Conduct](https://www.tesselle.org/conduct.html). By contributing to this project you agree to abide by its terms.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve
3+
about: Describe a bug you've seen
44
title: ''
55
labels: bug
6-
assignees: nfrerebeau
7-
86
---
97

108
**Describe the bug**
119
A clear and concise description of what the bug is.
1210

1311
**To Reproduce**
14-
A minimal reproducible example (AKA a reprex). If you've never heard of a [reprex](https://reprex.tidyverse.org/) before, start by reading <https://www.tidyverse.org/help/#reprex>.
12+
A minimal reproducible example (AKA a reprex).
1513

1614
**Expected behavior**
1715
A clear and concise description of what you expected to happen.
@@ -21,3 +19,4 @@ If applicable, add screenshots to help explain your problem.
2119

2220
**Additional context**
2321
Add any other context about the problem here.
22+

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
name: Custom issue template
3-
about: Describe this issue template's purpose here.
2+
name: Custom issue
3+
about: Ask about a specific problem.
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

10-
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for this project
3+
about: Make a case for a new feature
44
title: ''
55
labels: enhancement
6-
assignees: nfrerebeau
7-
86
---
97

108
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
A clear and concise description of what the problem is.
1210

1311
**Describe the solution you'd like**
1412
A clear and concise description of what you want to happen.
@@ -18,3 +16,4 @@ A clear and concise description of any alternative solutions or features you've
1816

1917
**Additional context**
2018
Add any other context or screenshots about the feature request here.
19+

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ methods/functions, include an example if possible to do in brief form -->
1818

1919
<!--- Did you remember to include tests? Unless you're just changing
2020
grammar, please include new tests for your change -->
21+

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
33
branches:
4+
- main
45
- master
56
pull_request:
67
branches:
8+
- main
79
- master
810

911
name: R-CMD-check
@@ -32,9 +34,9 @@ jobs:
3234
- {os: ubuntu-20.04, r: '3.3', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
3335

3436
env:
37+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3538
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3639
RSPM: ${{ matrix.config.rspm }}
37-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3840
# don't treat missing suggested packages as error
3941
_R_CHECK_FORCE_SUGGESTS_: false
4042
# Some packages might unavailable on the older versions, so let's ignore xref warnings
@@ -60,7 +62,7 @@ jobs:
6062
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
6163
shell: Rscript {0}
6264

63-
- name: Cache R packages
65+
- name: Restore R package cache
6466
if: runner.os != 'Windows'
6567
uses: actions/cache@v2
6668
with:
@@ -116,3 +118,4 @@ jobs:
116118
with:
117119
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
118120
path: check
121+

.github/workflows/drat.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# https://github.com/r-hyperspec/hySpc.chondro/blob/develop/.github/workflows/drat--insert-package.yaml
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
name: drat
9+
10+
jobs:
11+
drat:
12+
runs-on: ubuntu-20.04
13+
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
REPO: ${{ github.event.repository.name }}
17+
RELEASE: ${{ github.event.release.tag_name }}
18+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
25+
- uses: r-lib/actions/setup-pandoc@v1
26+
27+
- name: Query dependencies
28+
run: |
29+
install.packages('remotes')
30+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
31+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
32+
shell: Rscript {0}
33+
34+
- name: Restore R package cache
35+
uses: actions/cache@v2
36+
with:
37+
path: ${{ env.R_LIBS_USER }}
38+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
39+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
40+
41+
- name: Install system dependencies
42+
run: |
43+
while read -r cmd
44+
do
45+
eval sudo $cmd
46+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
47+
48+
- name: Install dependencies
49+
run: |
50+
remotes::install_deps(dependencies = TRUE)
51+
install.packages(c("pkgbuild", "drat"))
52+
shell: Rscript {0}
53+
54+
- name: Build source package
55+
run: |
56+
dir.create("build", showWarnings = FALSE)
57+
pkgbuild::build(dest_path = "build", binary = FALSE, vignettes = TRUE, manual = FALSE)
58+
shell: Rscript {0}
59+
60+
- name: Configure git
61+
# https://stackoverflow.com/a/60548651/633251
62+
env:
63+
TOKEN: ${{ secrets.ACCESS_TOKEN }}
64+
run: |
65+
git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
66+
git config --global user.email "${REPO}@tesselle.org"
67+
git config --global user.name "${REPO}"
68+
69+
- name: Clone tesselle/packages
70+
if: success()
71+
run: |
72+
rm -rf tmp
73+
git clone https://github.com/tesselle/packages.git tmp
74+
75+
- name: Insert package
76+
if: success()
77+
run: |
78+
targz <- list.files(path = "build", pattern = "\\.tar\\.gz", full.names = TRUE)
79+
drat::insertPackage(file = targz, repodir = "tmp", action = "archive", location = "docs")
80+
shell: Rscript {0}
81+
82+
- name: Deploy
83+
if: success()
84+
run: |
85+
cd tmp
86+
git add *
87+
# .tar.gz files are globally blocked (git ignored) by git,
88+
# must add manually and force it
89+
git add -f *.tar.gz
90+
git commit -m "Add ${REPO} ${RELEASE}"
91+
git push origin master
92+

.github/workflows/pkgdown.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
2626
shell: Rscript {0}
2727

28-
- name: Cache R packages
28+
- name: Restore R package cache
2929
uses: actions/cache@v2
3030
with:
3131
path: ${{ env.R_LIBS_USER }}
@@ -47,3 +47,4 @@ jobs:
4747
git config --local user.email "actions@github.com"
4848
git config --local user.name "GitHub Actions"
4949
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
50+

.github/workflows/test-coverage.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
3030
shell: Rscript {0}
3131

32-
- name: Cache R packages
32+
- name: Restore R package cache
3333
uses: actions/cache@v2
3434
with:
3535
path: ${{ env.R_LIBS_USER }}
@@ -46,3 +46,4 @@ jobs:
4646
- name: Test coverage
4747
run: covr::codecov()
4848
shell: Rscript {0}
49+

README.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ knitr::opts_chunk$set(
3535

3636
An easy way to examine archaeological count data. **tabula** provides a convenient and reproducible toolkit for relative and absolute dating and analysis of (chronological) patterns. It includes functions for matrix seriation (reciprocal ranking, CA-based seriation), chronological modeling and dating of archaeological assemblages and/or objects. Beyond these, the package provides several tests and measures of diversity: heterogeneity and evenness (Brillouin, Shannon, Simpson, etc.), richness and rarefaction (Chao1, Chao2, ACE, ICE, etc.), turnover and similarity (Brainerd-Robinson, etc.). The package make it easy to visualize count data and statistical thresholds: rank vs. abundance plots, heatmaps, Ford (1962) and Bertin (1977) diagrams.
3737

38-
To cite **tabula** in publications please use:
39-
40-
> Frerebeau, N. (2019). tabula: An R Package for Analysis, Seriation, and Visualization of Archaeological Count Data. *Journal of Open Source Software*, 4(44), 1821. DOI [10.21105/joss.01821](https://doi.org/10.21105/joss.01821).
38+
```{r citation, echo=FALSE}
39+
utils::citation("tabula")
40+
```
4141

4242
## Installation
4343

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,25 @@ and rarefaction (Chao1, Chao2, ACE, ICE, etc.), turnover and similarity
4040
data and statistical thresholds: rank vs. abundance plots, heatmaps,
4141
Ford (1962) and Bertin (1977) diagrams.
4242

43-
To cite **tabula** in publications please use:
44-
45-
> Frerebeau, N. (2019). tabula: An R Package for Analysis, Seriation,
46-
> and Visualization of Archaeological Count Data. *Journal of Open
47-
> Source Software*, 4(44), 1821. DOI
48-
> [10.21105/joss.01821](https://doi.org/10.21105/joss.01821).
43+
#>
44+
#> To cite tabula in publications use:
45+
#>
46+
#> Frerebeau, Nicolas (2019). tabula: An R Package for Analysis,
47+
#> Seriation, and Visualization of Archaeological Count Data. Journal of
48+
#> Open Source Software, 4(44), 1821. DOI 10.21105/joss.01821.
49+
#>
50+
#> A BibTeX entry for LaTeX users is
51+
#>
52+
#> @Article{,
53+
#> title = {{tabula}: An R Package for Analysis, Seriation, and Visualization of Archaeological Count Data},
54+
#> author = {Nicolas Frerebeau},
55+
#> year = {2019},
56+
#> journal = {Journal of Open Source Software},
57+
#> volume = {4},
58+
#> number = {44},
59+
#> page = {1821},
60+
#> doi = {10.21105/joss.01821},
61+
#> }
4962

5063
## Installation
5164

_pkgdown.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ reference:
3131
- title: Getters and Setters
3232
contents:
3333
- has_concept("mutator")
34-
- title: Data
35-
contents:
36-
- has_concept("datasets")
3734

3835
navbar:
3936
type: default
@@ -55,5 +52,5 @@ navbar:
5552
- text: Changelog
5653
href: news/index.html
5754
right:
58-
- icon: fa-github fa-lg
59-
href: https://github.com/nfrerebeau/tabula
55+
- icon: fab fa-github fa-lg
56+
href: https://github.com/tesselle/tabula

0 commit comments

Comments
 (0)