Skip to content

Commit

Permalink
pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
yvesdeville committed Dec 29, 2023
1 parent dc5f2ca commit 6713dd4
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 29 deletions.
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ doc/Old
^\.Rproj\.user$
README.Rmd
README.md
CAUTION.md
^_pkgdown\.yml$
^docs$
^pkgdown$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
14 changes: 14 additions & 0 deletions CAUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Use `R CMD check` to check this package, not **RStudio**!

Indeed, in the check, **RStudio** deletes the `inst/doc` directory
without warning. However this directory used here is conforming to
section 1.4 in the [Writing R Extensions
manual](https://cran.r-project.org/doc/manuals/R-exts.html)

"*In addition to the help files in Rd format, R packages allow the
inclusion of documents in arbitrary other formats. The standard
location for these is subdirectory `inst/doc` of a source package, ...*"

In the present case `inst/doc` contains `RenextGuide.pdf` as well as
its source files.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Description: Analysis of Sea Levels using Convolution between Tide and Surge.
Depends: R(>= 2.9.0), stats, methods, graphics, grDevices, splines, Renext, quadprog
License: GPL (>= 2)
LazyLoad: yes
URL: https://irsn.github.io/SeaLev/
19 changes: 9 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ Then the tail distribution of $Z$ can be computed by convolution.
Mind that this package is quite old since it was created during the
pre-RStudio era.

# INSTALLATION
# SeaLev Guide

The package does not have any vignette as such, yet the [SeaLev
Package guide](https://github.com/IRSN/SeaLev/blob/main/inst/doc/SeaLevGuide.pdf)
available here is shipped with the package as a pdf file (with extra
compression).


# Installation

## Using the *remotes* package

Expand All @@ -44,15 +52,6 @@ install_github("IRSN/SeaLev", dependencies = TRUE)
```
This should install the package and make it ready to use.

Mind that by default this does not build the vignette shipped with the
package (long-form documentation). To build the vignette, use instead

```{r, eval=FALSE}
install_github("IRSN/SeaLev", dependencies = TRUE, build_vignettes = TRUE)
```
The installation will then take a longer time but the vignette will be
accessible from the help of the package (link above the "Help Pages"
section).

You can also select a specific branch or a specific commit by using
the suitable syntax for `install_github`. For instance to install the
Expand Down
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
README
R Package SeaLev
================
Yves Deville
2023-05-22

# The SeaLev package
# Scope

The **SeaLev** package is a R package funded by IRSN/Behrig. It is
devoted to the distribution of a Sea Level random variable (r.v.) say
$Z$ viewed as the sum of two independent r.vs $X$ and $Y$ representing
$Z$, viewed as the sum of two independent r.vs $X$ and $Y$ representing
the astronomical tide and the surge. More precisely the r.vs relate to a
*tide interval* defined as the time interval separating two consecutive
astronomical low tides. Then $X$ is the astronomical *high-tide* level
Expand All @@ -29,30 +29,25 @@ Then the tail distribution of $Z$ can be computed by convolution.
Mind that this package is quite old since it was created during the
pre-RStudio era.

# INSTALLATION
# SeaLev Guide

The package does not have any vignette as such, yet the [SeaLev Package
guide](https://github.com/IRSN/SeaLev/blob/main/inst/doc/SeaLevGuide.pdf)
available here is shipped with the package as a pdf file (with extra
compression).

# Installation

## Using the *remotes* package

In an R session use

``` r
library(remotes)
install_github("IRSN/SeaLev", dependencies = TRUE, auth_token = myToken)
```

where `myToken` is *your* GitHub token. This should install the package
and make it ready to use.

Mind that by default this does not build the vignette shipped with the
package (long-form documentation). To build the vignette, use instead

``` r
install_github("IRSN/SeaLev", dependencies = TRUE, auth_token = myToken, build_vignettes = TRUE)
install_github("IRSN/SeaLev", dependencies = TRUE)
```

The installation will then take a longer time but the vignette will be
accessible from the help of the package (link above the “Help Pages”
section).
This should install the package and make it ready to use.

You can also select a specific branch or a specific commit by using the
suitable syntax for `install_github`. For instance to install the branch
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://irsn.github.io/SeaLev/
template:
bootstrap: 5

0 comments on commit 6713dd4

Please sign in to comment.