Skip to content

Commit

Permalink
Merge pull request #10 from natverse/github-actions
Browse files Browse the repository at this point in the history
Switch to GitHub actions
  • Loading branch information
jefferis authored Mar 21, 2021
2 parents 665b62b + bfc5aba commit 2a633d6
Show file tree
Hide file tree
Showing 16 changed files with 808 additions and 140 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
^appveyor\.yml$
^cran-comments\.md$
^tic\.R$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
^LICENSE\.md$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
54 changes: 54 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Getting help with nat.utils

Thanks for using nat.utils. We're sorry if you're having trouble, but don't worry,
we're here to help! To get help as quickly as possible, please read the following:

## Search
The first thing is to see if anyone has had your problem before:

* Search the [nat-user google group](https://groups.google.com/forum/#!forum/nat-user).
* Search GitHub for [_issues_ with the nat.utils package](https://github.com/natverse/nat.utils/issues).
* Search GitHub for [issues across the whole natverse](https://github.com/search?q=user%3Anatverse&type=Issues) in case
the problem is with a related package. You can add your own terms to the search
in the search box in the top left of that page.

If that solves your problem, then great!

## Known Problems
If you need more help with a known problem:

* If you found a relevant thread on the [nat-user google group](https://groups.google.com/forum/#!forum/nat-user):
please reply to that.
* If you found a GitHub issue:
please reply to that with more details or just _like_ it (click on the emoji button and add a thumbs up) to let us know you're having trouble too. You'll need to a GitHub login for this.
* If you're not sure:
ask a new question on the [nat-user google group](https://groups.google.com/forum/#!forum/nat-user)
linking to what you have found.


## New Problems
If it looks like a new problem then:

* If you just have a question:
please ask the [nat-user google group](https://groups.google.com/forum/#!forum/nat-user).
* If you need to report a *new* bug:
please [file an issue](https://github.com/natverse/nat.utils/issues/new).
* If you're not sure:
please just ask the [nat-user google group](https://groups.google.com/forum/#!forum/nat-user)! If your
problem _is_ a bug or a feature request, you can easily return here and
report it - and we may be able to point you to an existing report or workaround.

## Good Questions and Bug Reports

* Be specific
* Include the code that triggered the problem
* If at all possible, make a minimal **repr**oducible **ex**ample (a *reprex*)

It will be much easier for us to help if we can run a *reprex* on
our own machine without your data. You might want to use sample data
from a nat package to help, or refer to publicly available data online.
You can use the [reprex](https://reprex.tidyverse.org/) package to help
prepare a reprex. Read the [Get help!](https://www.tidyverse.org/help/)
section of the tidyverse site for more information.

*Thanks for your help!*
32 changes: 32 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
branches:
- main
- master

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
docs/
docs
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

41 changes: 25 additions & 16 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
Package: nat.utils
Authors@R: person("Gregory","Jefferis", email="[email protected]",
role=c("aut", "cre"), comment = c(ORCID = "0000-0002-0587-9355"))
Version: 0.5.1.9000
License: GPL-3
Title: File System Utility Functions for 'NeuroAnatomy Toolbox'
Description: Utility functions that may be of general interest but are
specifically required by the 'NeuroAnatomy Toolbox' ('nat'). Includes
functions to provide a basic make style system to update files based on
timestamp information, file locking and 'touch' utility. Convenience
functions for working with file paths include 'abs2rel', 'split_path'
and 'common_path'. Finally there are utility functions for working with
'zip' and 'gzip' files including integrity tests.
Imports: utils
Version: 0.5.1.9000
Authors@R:
person(given = "Gregory",
family = "Jefferis",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-0587-9355"))
Description: Utility functions that may be of general interest
but are specifically required by the 'NeuroAnatomy Toolbox' ('nat').
Includes functions to provide a basic make style system to update
files based on timestamp information, file locking and 'touch'
utility. Convenience functions for working with file paths include
'abs2rel', 'split_path' and 'common_path'. Finally there are utility
functions for working with 'zip' and 'gzip' files including integrity
tests.
License: GPL (>= 3)
Imports:
utils
Suggests:
testthat (>= 0.9),
roxygen2
RoxygenNote: 7.0.2
Encoding: UTF-8
roxygen2,
testthat (>= 3.0.0)
ByteCompile: true
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.1.1
URL: https://github.com/natverse/nat.utils
BugReports: https://github.com/natverse/nat.utils/issues
Loading

0 comments on commit 2a633d6

Please sign in to comment.