Skip to content

Commit 958f698

Browse files
committed
init
0 parents  commit 958f698

24 files changed

+727
-0
lines changed

.Rbuildignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
^delphidocs.Rproj$
2+
^\.Rproj\.user$
3+
^\.DS_Store$
4+
^\.Rhistory$
5+
^\.Rdata$
6+
^\.httr-oauth$
7+
^\.secrets$
8+
^LICENSE\.md$
9+
^README\.Rmd$
10+
^\.github$
11+
^_pkgdown\.yml$
12+
^docs$
13+
^pkgdown$
14+
^vignettes/articles$
15+
^.*\.Rproj$

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

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.Rproj.user
2+
.DS_Store
3+
.Rhistory
4+
.Rdata
5+
.httr-oauth
6+
.secrets
7+
.quarto
8+
docs
9+
inst/doc

DESCRIPTION

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Package: delphidocs
2+
Title: pkgdown template for CMU Delphi
3+
Version: 0.0.1
4+
Authors@R: c(
5+
person("Daniel J.", "McDonald", , "[email protected]", role = c("aut", "cre")),
6+
person("CMU's Delphi Research Group", role = c("cph", "fnd"))
7+
)
8+
Description: A pkgdown template for the CMU Delphi R packages.
9+
License: MIT + file LICENSE
10+
URL: https://github.com/cmu-delphi/delphidocs
11+
BugReports: https://github.com/cmu-delphi/delphidocs/issues
12+
Depends:
13+
R (>= 2.10)
14+
Imports:
15+
cli,
16+
glue
17+
Config/Needs/website: rmarkdown
18+
Config/testthat/edition: 3
19+
Encoding: UTF-8
20+
LazyData: true
21+
Roxygen: list(markdown = TRUE)
22+
RoxygenNote: 7.3.2
23+
Suggests:
24+
knitr,
25+
rmarkdown
26+
VignetteBuilder: knitr

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2024
2+
COPYRIGHT HOLDER: delphidocs authors

LICENSE.md

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) 2024 delphidocs authors
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
export(consult_oracle)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# delphidocs 0.0.1
2+
3+
* Init the pkg.
4+
* Add some news items to check if this file appears.

R/consult_oracle.R

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#' Consult the Pythia
2+
#'
3+
#' Need some help? Ask the oracle.
4+
#'
5+
#' @param query something you would like to know
6+
#'
7+
#' @return a random response from the oracle
8+
#' @export
9+
#'
10+
#' @examples
11+
#' consult_oracle(12345L)
12+
#' consult_oracle("A")
13+
consult_oracle <- function(query) {
14+
if (missing(query)) {
15+
cli::cli_inform("Did you have a question?")
16+
}
17+
resp <- sample(delphidocs::responses, 1)
18+
cli::cli_h2(cli::col_yellow("The oracle says: "))
19+
cli::cli_inform(glue::glue(cli::symbol$fancy_question_mark, " {resp}."))
20+
cli::cat_line("")
21+
invisible(resp)
22+
}

R/responses.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#' Some things the oracle might say
2+
"responses"

README.Rmd

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, include = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "man/figures/README-",
12+
out.width = "100%"
13+
)
14+
```
15+
16+
17+
# delphidocs
18+
19+
<!-- badges: start -->
20+
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
21+
[![CRAN status](https://www.r-pkg.org/badges/version/delphidocs)](https://CRAN.R-project.org/package=delphidocs)
22+
<!-- badges: end -->
23+
24+
`{delphidocs}` provides a custom pkgdown template for CMU Delphi packages.
25+
Please don’t use it for your own package, but feel free to modify it for
26+
your own purposes.
27+
28+
Inspired by [rotemplate](https://github.com/ropensci-org/rotemplate).
29+
30+
## Installation
31+
32+
You probably shouldn't install this package. It's just a template.
33+
34+
35+
## Using the template
36+
37+
To use the `{delphidocs}` template for your pkgdown site,
38+
add the following to your `_pkgdown.yml` file:
39+
40+
```{yaml example}
41+
template:
42+
package: delphidocs
43+
```
44+
45+
You will also need to add the following to your `DESCRIPTION` file:
46+
47+
```{yaml needs}
48+
Config/Needs/website: cmu-delphi/delphidocs
49+
```
50+

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# delphidocs
5+
6+
<!-- badges: start -->
7+
8+
[![Lifecycle:
9+
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
10+
[![CRAN
11+
status](https://www.r-pkg.org/badges/version/delphidocs)](https://CRAN.R-project.org/package=delphidocs)
12+
<!-- badges: end -->
13+
14+
`{delphidocs}` provides a custom pkgdown template for CMU Delphi
15+
packages. Please don’t use it for your own package, but feel free to
16+
modify it for your own purposes.
17+
18+
Inspired by [rotemplate](https://github.com/ropensci-org/rotemplate).
19+
20+
## Installation
21+
22+
You probably shouldn’t install this package. It’s just a template.
23+
24+
## Using the template
25+
26+
To use the `{delphidocs}` template for your pkgdown site, add the
27+
following to your `_pkgdown.yml` file:
28+
29+
``` yaml
30+
template:
31+
package: delphidocs
32+
```
33+
34+
You will also need to add the following to your `DESCRIPTION` file:
35+
36+
``` yaml
37+
Config/Needs/website: cmu-delphi/delphidocs
38+
```

_pkgdown.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
url: ~
2+
template:
3+
package: delphidocs

data/responses.rda

335 Bytes
Binary file not shown.

delphidocs.Rproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: No
4+
SaveWorkspace: No
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX
14+
15+
AutoAppendNewline: Yes
16+
StripTrailingWhitespace: Yes
17+
18+
BuildType: Package
19+
PackageUseDevtools: Yes
20+
PackageInstallArgs: --no-multiarch --with-keep.source
21+
PackageRoxygenize: rd,collate,namespace
22+
23+
UseNativePipeOperator: Yes

inst/pkgdown/_pkgdown.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
template:
2+
bootstrap: 5
3+
bslib:
4+
bg: "white"
5+
fg: "#172431"
6+
base_font: {google: "Open Sans"}
7+
heading_font: {google: "Source Serif Pro"}
8+
primary: "#007BC0"
9+
border-radius: 0
10+
headings-color: "#941120"
11+
navbar-light-color: "$headings-color"
12+
navbar-light-brand-color: "$headings-color"
13+
navbar-light-hover-color: "$headings-color"
14+
base_font_size: 1em
15+
link-decoration: "none"
16+
17+
navbar:
18+
structure:
19+
left: [intro, reference, articles, tutorials]
20+
right: [search, github, news]
21+
22+
23+
footer:
24+
structure:
25+
left: developed_by
26+
right: [built_with]
15.1 KB
Loading

0 commit comments

Comments
 (0)