diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml new file mode 100644 index 0000000..35ab7bc --- /dev/null +++ b/.github/workflows/pkgdown.yml @@ -0,0 +1,49 @@ +# 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: read + pages: write + id-token: write + steps: + - uses: actions/checkout@v4 + + - 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: actions/deploy-pages@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + artifact-name: github-pages diff --git a/.gitignore b/.gitignore index c4da473..bd9d088 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .Ruserdata parameter_trace .aider* +docs/ diff --git a/DESCRIPTION b/DESCRIPTION index 30591c9..2ea8d17 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,6 +16,7 @@ Description: Implements nested sequential Monte Carlo (SMC) algorithms for and Ulam distances. Based on the methodology described in . License: GPL-3 +URL: https://osorensen.github.io/BayesMallowsSMC2/ Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) @@ -29,5 +30,6 @@ Depends: R (>= 4.1.0) Suggests: testthat (>= 3.0.0), - label.switching (>= 1.8) + label.switching (>= 1.8), + pkgdown Config/testthat/edition: 3 diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..efb460d --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,27 @@ +url: https://osorensen.github.io/BayesMallowsSMC2/ +template: + bootstrap: 5 + +reference: +- title: Main Functions + desc: Core functions for Bayesian Mallows SMC + contents: + - compute_sequentially + - precompute_topological_sorts + +- title: Configuration + desc: Functions to set up parameters and options + contents: + - set_hyperparameters + - set_smc_options + +- title: Data Functions + desc: Functions for handling different data types + contents: + - complete_rankings + - mixtures + - pairwise_preferences + - partial_rankings + +development: + mode: auto