diff --git a/.Rbuildignore b/.Rbuildignore index 434cb0c..3e011f5 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -13,6 +13,8 @@ doc/Old ^\.Rproj\.user$ README.Rmd README.md +CAUTION.md ^_pkgdown\.yml$ ^docs$ -^pkgdown$ \ No newline at end of file +^pkgdown$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..ed7650c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -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 diff --git a/CAUTION.md b/CAUTION.md new file mode 100644 index 0000000..1a90e4e --- /dev/null +++ b/CAUTION.md @@ -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. diff --git a/DESCRIPTION b/DESCRIPTION index 4dfa70a..029d723 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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/ diff --git a/README.Rmd b/README.Rmd index c90e247..7125b3e 100644 --- a/README.Rmd +++ b/README.Rmd @@ -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 @@ -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 diff --git a/README.md b/README.md index 32bc1d1..fe6616e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -29,7 +29,14 @@ 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 @@ -37,22 +44,10 @@ 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 diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..f2736fd --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://irsn.github.io/SeaLev/ +template: + bootstrap: 5 +