From 0ab2c5a7bf0558442679bf9dd5f799fc3d9229d2 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Sun, 17 Dec 2023 10:12:09 -0800 Subject: [PATCH 1/2] Update Stan model to new array syntax (#310) * Update Stan model to new array syntax * Bump cmdstan version used in docs * Bump EvoTrees compat --- .github/workflows/documenter.yml | 2 +- docs/Project.toml | 2 +- docs/src/quickstart.jl | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/documenter.yml b/.github/workflows/documenter.yml index 5e0e5321..7694b463 100644 --- a/.github/workflows/documenter.yml +++ b/.github/workflows/documenter.yml @@ -8,7 +8,7 @@ on: - cron: "0 0 * * *" env: - CMDSTAN_VERSION: "2.25.0" + CMDSTAN_VERSION: "2.33.1" CMDSTAN_PATH: "${{ GITHUB.WORKSPACE }}/.cmdstan/" JULIA_NUM_THREADS: 2 diff --git a/docs/Project.toml b/docs/Project.toml index c568a8f8..f7aeb2ca 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -35,7 +35,7 @@ DataFrames = "1" DimensionalData = "0.23, 0.24" Distributions = "0.25" Documenter = "0.27" -EvoTrees = "0.14.8, 0.15" +EvoTrees = "0.14.8, 0.15, 0.16" MCMCDiagnosticTools = "0.3" MLJBase = "1" MLJIteration = "0.6" diff --git a/docs/src/quickstart.jl b/docs/src/quickstart.jl index 9ceab5f6..f2c8cfa6 100644 --- a/docs/src/quickstart.jl +++ b/docs/src/quickstart.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.16 +# v0.19.36 using Markdown using InteractiveUtils @@ -299,14 +299,14 @@ begin schools_code = """ data { int J; - real y[J]; - real sigma[J]; + array[J] real y; + array[J] real sigma; } parameters { real mu; real tau; - real theta[J]; + array[J] real theta; } model { From 2cfd6af50db07017de31210cbdecf4a085cef8db Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Sun, 17 Dec 2023 11:48:17 -0800 Subject: [PATCH 2/2] Build docs with Documenter v1 (#311) * Require Documenter v1 * Use correct analytics syntax * Declare prettyurl * Specify exceptions where warnings are raised * Avoid errors when not using pretty urls * Allow PlutoStaticHTML build files to exceed size limit * Always warn on missing cross-references * Cache downloaded CmdStan * Avoid status 301 redirects * Always check links --- .github/workflows/documenter.yml | 6 ++++++ docs/Project.toml | 2 +- docs/make.jl | 16 ++++++++++++---- docs/src/index.md | 12 ++++++------ 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/documenter.yml b/.github/workflows/documenter.yml index 7694b463..5b8a639a 100644 --- a/.github/workflows/documenter.yml +++ b/.github/workflows/documenter.yml @@ -30,6 +30,12 @@ jobs: key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('docs/CondaPkg.toml') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}- + - name: Cache CmdStan + id: cache-cmdstan + uses: actions/cache@v2 + with: + path: ${{ env.CMDSTAN_PATH }} + key: cmdstan-${{ env.CMDSTAN_VERSION }}-${{ runner.os }} - name: Download and build CmdStan if: steps.cache-cmdstan.outputs.cache-hit != 'true' run: | diff --git a/docs/Project.toml b/docs/Project.toml index f7aeb2ca..66b15b75 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -34,7 +34,7 @@ CairoMakie = "0.8.9, 0.9, 0.10" DataFrames = "1" DimensionalData = "0.23, 0.24" Distributions = "0.25" -Documenter = "0.27" +Documenter = "1" EvoTrees = "0.14.8, 0.15, 0.16" MCMCDiagnosticTools = "0.3" MLJBase = "1" diff --git a/docs/make.jl b/docs/make.jl index 445d662b..63a0671a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -67,6 +67,14 @@ doctestfilters = [ r"\s+\"created_at\" => .*", # ignore timestamps in doctests ] +prettyurls = haskey(ENV, "CI") + +warnonly = [ + :missing_docs, # we don't reexport or document all of MCMCDiagnosticTools + :cross_references, # we reference the pages built by PlutoStaticHTML with pretty relative URLs + :linkcheck, # avoid checking links to pages built with PlutoStaticHTML +] + makedocs(; modules, sitename="ArviZ.jl", @@ -90,16 +98,16 @@ makedocs(; ], checkdocs=:exports, format=Documenter.HTML(; - prettyurls=haskey(ENV, "CI"), + prettyurls, + size_threshold=2 * 10^6, # 2Mb, needed since PlutoStaticHTML embeds images in markdown assets=["assets/favicon.ico", "assets/custom.css"], sidebar_sitename=false, canonical="stable", + analytics="G-W1G68W77YV", ), doctestfilters, linkcheck=true, - analytics="G-W1G68W77YV", - # allow linkcheck to fail so we can use pretty links to PlutoStaticHTML notebooks - strict=Documenter.except(:footnote, :linkcheck, :missing_docs), + warnonly, ) deploydocs(; repo="github.com/arviz-devs/ArviZ.jl.git", devbranch="main", push_preview=true) diff --git a/docs/src/index.md b/docs/src/index.md index d2882954..8a8591db 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,14 +4,14 @@ ArviZ.jl is a Julia meta-package for exploratory analysis of Bayesian models. It is part of the [ArviZ project](https://www.arviz.org/), which also includes a related [Python package](https://python.arviz.org/). ArviZ consists of and re-exports the following subpackages, along with extensions integrating them with InferenceObjects: -- [InferenceObjects.jl](https://julia.arviz.org/InferenceObjects): a base package implementing the [`InferenceData`](@ref) type with utilities for building, saving, and working with it -- [MCMCDiagnosticTools.jl](https://julia.arviz.org/MCMCDiagnosticTools): diagnostics for Markov Chain Monte Carlo methods -- [PSIS.jl](https://julia.arviz.org/PSIS): Pareto-smoothed importance sampling -- [PosteriorStats.jl](https://julia.arviz.org/PosteriorStats): common statistical analyses for the Bayesian workflow +- [InferenceObjects.jl](https://julia.arviz.org/InferenceObjects/): a base package implementing the [`InferenceData`](@ref) type with utilities for building, saving, and working with it +- [MCMCDiagnosticTools.jl](https://julia.arviz.org/MCMCDiagnosticTools/): diagnostics for Markov Chain Monte Carlo methods +- [PSIS.jl](https://julia.arviz.org/PSIS/): Pareto-smoothed importance sampling +- [PosteriorStats.jl](https://julia.arviz.org/PosteriorStats/): common statistical analyses for the Bayesian workflow Additional functionality can be loaded with the following packages: -- [ArviZExampleData.jl](https://julia.arviz.org/ArviZExampleData): example `InferenceData` objects, useful for demonstration and testing -- [ArviZPythonPlots.jl](https://julia.arviz.org/ArviZPythonPlots): Python ArviZ's library of plotting functions for Julia types +- [ArviZExampleData.jl](https://julia.arviz.org/ArviZExampleData/): example `InferenceData` objects, useful for demonstration and testing +- [ArviZPythonPlots.jl](https://julia.arviz.org/ArviZPythonPlots/): Python ArviZ's library of plotting functions for Julia types See the navigation bar for more useful packages.