Skip to content

Commit

Permalink
Initialize master
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeleites committed Jun 27, 2023
0 parents commit 6470a6d
Show file tree
Hide file tree
Showing 18 changed files with 400 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
^codecov\.yml$
^appveyor\.yml$
^\.github$
^docs
53 changes: 53 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:
ps: Bootstrap

cache:
- C:\RLibrary

environment:
NOT_CRAN: true
# env vars that may need to be set, at least temporarily, from time to time
# see https://github.com/krlmlr/r-appveyor#readme for details
# USE_RTOOLS: true
# R_REMOTES_STANDALONE: true

# Adapt as necessary starting from here

build_script:
- travis-tool.sh install_deps

test_script:
- Rscript -e "roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace', 'vignette'))"
- travis-tool.sh run_tests

on_failure:
- 7z a failure.zip *.Rcheck\*
- appveyor PushArtifact failure.zip

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
12 changes: 12 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
51 changes: 51 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches: 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@master

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

- 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: Cache R packages
uses: actions/cache@v1
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: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
install.packages(c("devtools", "roxygen2"))
shell: Rscript {0}

- name: Roxygenize
run: |
devtools::document(roclets = c('rd', 'collate', 'namespace', 'vignette'))
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
man/*.Rd
docs/
NAMESPACE
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: R
sudo: false
cache: packages
warnings_are_errors: true

os:
- linux
- osx

r:
- oldrel
- release
- devel

jobs:
exclude:
- os: osx
r: devel

before-script:
- R -e "install.packages ('roxygen2'); roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace', 'vignette'))"

after-success:
- Rscript -e "covr::codecov()"
25 changes: 25 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Package:
Type: Package
Title:
Version: 0.0.0.9000
Maintainer: Erick Oduniyi <[email protected]>
Authors@R: c(
person("Claudia", "Beleites", role = c("aut"), email = "[email protected]"),
person("Erick", "Oduniyi", role = c("aut","cre"), email = "[email protected]")),
person("Vilmantas", "Gegzna", role = c("aut"))),
person("Bryan", "Hanson", role = c("aut")))
Description:
License: MIT + file LICENSE
Encoding: UTF-8
LazyLoad: yes
LazyData: yes
Depends:
hyperSpec
Imports:
hySpc.testthat
Suggests:
knitr,
VignetteBuilder: knitr
RoxygenNote: 7.1.0
Roxygen: list(markdown = TRUE)
Collate:
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2020-
COPYRIGHT HOLDER: the SKELETON authors - see file DESCRIPTION
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SKELETON

## Acknowledgements
The `hyperSpec` team gratefully acknowledges support from the Google Summer of Code program, which sponsored student Erick Oduniyi during summer 2020.
Erick and the team carried out a significant overhaul of `hyperSpec` which led to this release.

# Version

## User-visible Changes

### Bug Fixes
### Breaking Changes
### New Functions

## Internal Changes
5 changes: 5 additions & 0 deletions R/unittestdata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#' package internal unit test data
#' @noRd
{

}
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# hyperSpec Package Skeleton
<!-- badges: start -->
<!--
[![CRAN
status](https://www.r-pkg.org/badges/version/SKELETON)](https://cran.r-project.org/package=SKELETON)
[![Build Status on Travis](https://travis-ci.com/r-hyperspec/SKELETON.svg?branch=master) (master; Linux, Mac))](https://travis-ci.com/github/r-hyperspec/SKELETON)
[![Build status on Appveyor](https://ci.appveyor.com/api/projects/status/APPVEYOR-CODE?svg=true) (Windows)](https://ci.appveyor.com/project/r-hyperspec/SKELETON)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Codecov test coverage](https://codecov.io/gh/r-hyperspec/SKELETON/branch/master/graph/badge.svg) (master)](https://codecov.io/gh/r-hyperspec/SKELETON?branch=master)
-->
<!-- badges: end -->

package skeleton for hyperSpec ecosystem

When creating a repo,

- replace `SKELETON` with new package name
- [ ] `LICENSE`
- [ ] `NEWS.md`
- [ ] `README.md`
- appveyor badge needs appveyor code
- [ ] `tests/testthat.R`
- [ ] `tests/testthat/test_attached.R`

- create issue labels
- [ ] apply github labels (in `github-helpers/`),
- [ ] delete `github-helpers/`
8 changes: 8 additions & 0 deletions github-helpers/get-skeleton-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# get labels from hySpc.skeleton package
curl https://api.github.com/repos/r-hyperspec/hySpc.skeleton/labels |\
grep -ve '\"id\":' - |\
grep -ve '\"node_id\":' - |\
grep -ve '\"url\":' - |\
grep -ve '\"default\":' - > github-helpers/hySpc.skeleton.labels.json
117 changes: 117 additions & 0 deletions github-helpers/hySpc.skeleton.labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
[
{
"name": "IO",
"color": "8B4513",
"description": "Input and output (read/write) related functions"
},
{
"name": "Proposal",
"color": "5319e7",
"description": ""
},
{
"name": "blocked :no_entry_sign:",
"color": "f9646e",
"description": "Cannot be started until another issue is resolved"
},
{
"name": "bug :bomb:",
"color": "ee0701",
"description": "something is not working as it should"
},
{
"name": "confirmed",
"color": "b60205",
"description": "Someone else besides the one who originally described the issue also has this issue."
},
{
"name": "datasets :date:",
"color": "edac15",
"description": "Related to datasets"
},
{
"name": "documentation :blue_book:",
"color": "000080",
"description": ""
},
{
"name": "duplicate",
"color": "cfd3d7",
"description": "This issue or pull request already exists"
},
{
"name": "enhancement",
"color": "84b6eb",
"description": "New feature or request"
},
{
"name": "good first issue",
"color": "7057ff",
"description": "Good for newcomers"
},
{
"name": "guideline",
"color": "57dd4d",
"description": ""
},
{
"name": "help wanted",
"color": "128A0C",
"description": "Extra attention is needed"
},
{
"name": "invalid",
"color": "e6e6e6",
"description": "This doesn't seem right"
},
{
"name": "plots :chart_with_upwards_trend:",
"color": "a3e07d",
"description": "related to plotting, graphical display and interaction with graphical display"
},
{
"name": "poll :arrow_up: :arrow_down:",
"color": "baa5f7",
"description": "A question where everyone can vote"
},
{
"name": "priority high/urgent",
"color": "FF0000",
"description": ""
},
{
"name": "priority low",
"color": "C0ffA0",
"description": ""
},
{
"name": "priority medium",
"color": "FFC000",
"description": ""
},
{
"name": "question :grey_question:",
"color": "800080",
"description": "Further information is requested"
},
{
"name": "ready :heavy_check_mark:",
"color": "60ff60",
"description": ""
},
{
"name": "unit test",
"color": "ffff00",
"description": ""
},
{
"name": "vignette :green_book:",
"color": "ffe998",
"description": ""
},
{
"name": "wontfix",
"color": "ffffff",
"description": "This will not be worked on"
}
]
16 changes: 16 additions & 0 deletions github-helpers/put-skeleton-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# hySpc.skeleton shell script
# author: Erick Oduniyi

# Make sure github-labels node package is installed
npm install github-labels -g

# Get Github username and repo name
echo "enter username and name of derived package repository (username/repo)"
read pkg_repo

# Get personal access tokens
echo "enter Personal access tokens"
read token

# Pass the skeleton labels to the derived package repo
labels -c hypSpc.skeleton.labels.json pkg_repo -t token
Loading

0 comments on commit 6470a6d

Please sign in to comment.