Skip to content

Commit 1e61025

Browse files
Merge branch 'master' of https://github.com/TuringLang/DynamicPPL.jl into tor/benchmark-update
2 parents 3b5e448 + 5c0cebe commit 1e61025

File tree

8 files changed

+32
-543
lines changed

8 files changed

+32
-543
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- master
77
- backport-*
88
pull_request:
9-
branches:
10-
- master
11-
- backport-*
129
merge_group:
1310
types: [checks_requested]
1411

.github/workflows/Docs.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
- master
77
tags: '*'
88
pull_request:
9-
branches:
10-
- master
119
merge_group:
1210
types: [checks_requested]
1311

@@ -17,19 +15,14 @@ concurrency:
1715
group: ${{ github.workflow }}-${{ github.ref }}
1816
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1917

18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
2022
jobs:
2123
docs:
2224
runs-on: ubuntu-latest
25+
2326
steps:
24-
- uses: actions/checkout@v4
25-
- uses: julia-actions/setup-julia@v2
26-
with:
27-
version: '1'
28-
- name: Install dependencies
29-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
30-
- name: Build and deploy
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
33-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
34-
JULIA_DEBUG: Documenter # Print `@debug` statements (https://github.com/JuliaDocs/Documenter.jl/issues/955)
35-
run: julia --project=docs/ docs/make.jl
27+
- name: Build and deploy Documenter.jl docs
28+
uses: TuringLang/actions/DocsDocumenter@main

.github/workflows/DocsNav.yml

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,39 @@
1-
name: Add Navbar
1+
name: Rebuild docs with newest navbar
22

33
on:
4-
page_build: # Triggers the workflow on push events to gh-pages branch
5-
workflow_dispatch: # Allows manual triggering
4+
# 3:25 AM UTC every Sunday -- choose an uncommon time to avoid
5+
# periods of heavy GitHub Actions usage
66
schedule:
7-
- cron: '0 0 * * 0' # Runs every week on Sunday at midnight (UTC)
7+
- cron: '25 3 * * 0'
8+
# Whenever needed
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
813

914
jobs:
10-
add-navbar:
15+
update-navbar:
1116
runs-on: ubuntu-latest
12-
permissions:
13-
contents: write
17+
1418
steps:
15-
- name: Checkout gh-pages
19+
- name: Checkout gh-pages branch
1620
uses: actions/checkout@v4
1721
with:
1822
ref: gh-pages
19-
fetch-depth: 0
2023

21-
- name: Download insert_navbar.sh
22-
run: |
23-
curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/insert_navbar.sh
24-
chmod +x insert_navbar.sh
24+
- name: Insert navbar
25+
uses: TuringLang/actions/DocsNav@main
26+
with:
27+
doc-path: '.'
2528

26-
- name: Update Navbar
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Commit and push changes
2930
run: |
30-
git config user.name github-actions[bot]
31-
git config user.email github-actions[bot]@users.noreply.github.com
32-
33-
# Define the URL of the navbar to be used
34-
NAVBAR_URL="https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/TuringNavbar.html"
35-
36-
# Update all HTML files in the current directory (gh-pages root)
37-
./insert_navbar.sh . $NAVBAR_URL
38-
39-
# Remove the insert_navbar.sh file
40-
rm insert_navbar.sh
41-
42-
# Check if there are any changes
4331
if [[ -n $(git status -s) ]]; then
44-
git add .
45-
git commit -m "Added navbar and removed insert_navbar.sh"
46-
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" gh-pages
32+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
33+
git config --global user.name "GitHub Actions"
34+
git add -A
35+
git commit -m "Update navbar (automated)"
36+
git push
4737
else
4838
echo "No changes to commit"
4939
fi

.github/workflows/Format.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches:
9-
- master
108
merge_group:
119
types: [checks_requested]
1210

Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
1515
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1616
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1717
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
18-
# TODO(penelopeysm,mhauru) KernelAbstractions is only a dependency so that we can pin its version, see
19-
# https://github.com/TuringLang/DynamicPPL.jl/pull/781#event-16017866767
2018
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
2119
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2220
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
@@ -58,9 +56,7 @@ Compat = "4"
5856
ConstructionBase = "1.5.4"
5957
Distributions = "0.25"
6058
DocStringExtensions = "0.9"
61-
# TODO(penelopeysm,mhauru) See https://github.com/TuringLang/DynamicPPL.jl/pull/781#event-16017866767
62-
# for why KernelAbstractions is pinned like this.
63-
KernelAbstractions = "< 0.9.32"
59+
KernelAbstractions = "0.9.33"
6460
EnzymeCore = "0.6 - 0.8"
6561
ForwardDiff = "0.10"
6662
JET = "0.9"

docs/make.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ makedocs(;
2020
format=Documenter.HTML(; size_threshold=2^10 * 400),
2121
modules=[DynamicPPL],
2222
pages=[
23-
"Home" => "index.md",
24-
"API" => "api.md",
25-
"Internals" => ["internals/varinfo.md", "internals/transformations.md"],
23+
"Home" => "index.md", "API" => "api.md", "Internals" => ["internals/varinfo.md"]
2624
],
2725
checkdocs=:exports,
2826
doctest=false,
2927
)
30-
31-
deploydocs(; repo="github.com/TuringLang/DynamicPPL.jl.git", push_preview=true)

docs/src/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ VarInfo
279279
TypedVarInfo
280280
```
281281

282-
One main characteristic of [`VarInfo`](@ref) is that samples are transformed to unconstrained Euclidean space and stored in a linearized form, as described in the [transformation page](internals/transformations.md).
282+
One main characteristic of [`VarInfo`](@ref) is that samples are transformed to unconstrained Euclidean space and stored in a linearized form, as described in the [main Turing documentation](https://turinglang.org/docs/developers/transforms/dynamicppl/).
283283
The [Transformations section below](#Transformations) describes the methods used for this.
284284
In the specific case of `VarInfo`, it keeps track of whether samples have been transformed by setting flags on them, using the following functions.
285285

0 commit comments

Comments
 (0)