Skip to content

Commit

Permalink
pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkimbrel committed Sep 13, 2023
1 parent 5f45468 commit 7b77c02
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
^\.Rproj\.user$
^LICENSE\.md$
^README\.Rmd$
^_pkgdown\.yml$
^docs$
^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/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.Rdata
.httr-oauth
.DS_Store
inst/doc
docs
11 changes: 9 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: qSIP2
Title: qSIP Analysis
Version: 0.3.4
Version: 0.4.0
Authors@R:
person("Jeff", "Kimbrel", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))
Expand All @@ -10,6 +10,8 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Imports:
Expand All @@ -18,5 +20,10 @@ Imports:
ggplot2,
glue,
S7
URL: https://github.com/jeffkimbrel/qSIP2
URL: https://github.com/jeffkimbrel/qSIP2,
https://jeffkimbrel.github.io/qSIP2/
BugReports: https://github.com/jeffkimbrel/qSIP2/issues
VignetteBuilder: knitr
Depends:
R (>= 2.10)
LazyData: true
12 changes: 6 additions & 6 deletions R/qsip_sample_object.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
qsip_sample_object <- S7::new_class("qsip_sample_object",
properties = list(
data = S7::class_data.frame,
isotope = S7::class_character,
isotopolog = S7::class_character,
isotope = S7::new_property(S7::class_character, default = "isotope"),
#isotopolog = S7::class_character,
isotopolog_label = S7::class_character,
isotopolog_approach = S7::class_character,
#isotopolog_approach = S7::class_character,
gradient_position = S7::new_property(S7::class_character, default = "gradient_position"),
gradient_pos_density = S7::new_property(S7::class_character, default = "gradient_pos_density"),
gradient_pos_amt = S7::new_property(S7::class_character, default = "gradient_pos_amt"),
gradient_pos_rel_amt = S7::new_property(S7::class_character, default = "gradient_pos_rel_amt"),
source_mat_id = S7::new_property(S7::class_character, default = "source_mat_id")
),
validator = function(self) {
qSIP2::isotope_validation(self@data %>% pull(self@isotope))
qSIP2::gradient_pos_density_validation(self@data %>% pull(self@gradient_pos_density))
qSIP2::gradient_position_validation(self@data %>% pull(self@gradient_position))
qSIP2::isotope_validation(self@data |> dplyr::pull(self@isotope))
qSIP2::gradient_pos_density_validation(self@data |> dplyr::pull(self@gradient_pos_density))
qSIP2::gradient_position_validation(self@data |> dplyr::pull(self@gradient_position))
}
)

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://jeffkimbrel.github.io/qSIP2/
template:
bootstrap: 5

Binary file added data/sample_data_MISIP.rda
Binary file not shown.
2 changes: 0 additions & 2 deletions man/qsip_sample_object.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
37 changes: 37 additions & 0 deletions vignettes/sample_data.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "sample_data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{sample_data}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(qSIP2)
```

# Sample Data

The `qSIP2` package comes with a basic example tibble called `sample_data_MISIP`, and some of the columns are already formatted with proper MISIP headers.

# Make a qSIP sample data object

The `qsip_sample_object` constructor builds a sample data object from a dataframe.

```{r}
qdf = qsip_sample_object(sample_data_MISIP)
```

And that's that, for now.


0 comments on commit 7b77c02

Please sign in to comment.