Skip to content

Commit 4f8d59b

Browse files
committed
Default branch change
1 parent e381e4b commit 4f8d59b

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Render Docs Website
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
- backport-v0.*
88
workflow_dispatch: # manual trigger for testing
99

.github/workflows/resolve_manifest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This action runs Pkg.instantiate() and Pkg.resolve() every time the master
1+
# This action runs Pkg.instantiate() and Pkg.resolve() every time the main
22
# branch is pushed to. If this leads to a change in the Manifest.toml file, it
33
# will open a PR to update the Manifest.toml file. This ensures that the
44
# contents of the Manifest in the repository are consistent with the contents
@@ -11,7 +11,7 @@ name: Resolve Manifest
1111
on:
1212
push:
1313
branches:
14-
- master
14+
- main
1515
workflow_dispatch:
1616

1717
jobs:

.github/workflows/version_check.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This action checks that the minor versions of Turing.jl specified in the
22
# Project.toml, _quarto.yml, and Manifest.toml files are consistent.
33
#
4-
# For pushes to master or PRs to master, it additionally also checks that the
4+
# For pushes to main or PRs to main, it additionally also checks that the
55
# version specified in Manifest.toml matches the latest release on GitHub.
66
#
77
# If any discrepancies are observed, it will open a PR to fix them.
@@ -10,11 +10,11 @@ name: Check Turing.jl version consistency
1010
on:
1111
push:
1212
branches:
13-
- master
13+
- main
1414
- backport-*
1515
pull_request:
1616
branches:
17-
- master
17+
- main
1818
- backport-*
1919
workflow_dispatch:
2020

@@ -27,9 +27,9 @@ jobs:
2727
pull-requests: write
2828

2929
env:
30-
# Determine whether the target branch is master (i.e. this is a push to
31-
# master or a PR to master).
32-
TARGET_IS_MASTER: ${{ (github.event_name == 'push' && github.ref_name == 'master') || (github.event_name == 'pull_request' && github.base_ref == 'master') }}
30+
# Determine whether the target branch is main (i.e. this is a push to
31+
# main or a PR to main).
32+
TARGET_IS_MAIN: ${{ (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'pull_request' && github.base_ref == 'main') }}
3333
IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
3434
# Disable precompilation as it takes a long time and is not needed for this workflow
3535
JULIA_PKG_PRECOMPILE_AUTO: 0
@@ -46,7 +46,7 @@ jobs:
4646
echo github.event_name: ${{ github.event_name }}
4747
echo github.ref_name: ${{ github.ref_name }}
4848
echo github.base_ref: ${{ github.base_ref }}
49-
echo TARGET_IS_MASTER: ${{ env.TARGET_IS_MASTER }}
49+
echo TARGET_IS_MAIN: ${{ env.TARGET_IS_MAIN }}
5050
echo IS_PR_FROM_FORK: ${{ env.IS_PR_FROM_FORK }}
5151
5252
- name: Check version consistency
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Create a PR with suggested changes
5757
id: create_pr
58-
if: always() && steps.version_check.outcome == 'failure' && env.TARGET_IS_MASTER && (! env.IS_PR_FROM_FORK)
58+
if: always() && steps.version_check.outcome == 'failure' && env.TARGET_IS_MAIN && (! env.IS_PR_FROM_FORK)
5959
uses: peter-evans/create-pull-request@v6
6060
with:
6161
base: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Documentation and Tutorials for Turing.jl
22

33
This repository is part of [Turing.jl's](https://turinglang.org/) website (i.e. `https://turinglang.org/docs/`). It contains the Turing.jl documentation and tutorials.
4-
- The `master` branch contains the quarto source
5-
- The `gh-pages` branch contains the `html` version of these documents compiled from the `master` branch.
4+
- The `main` branch contains the quarto source
5+
- The `gh-pages` branch contains the `html` version of these documents compiled from the `main` branch.
66

77
## Local development
88

_quarto.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ website:
116116
background: "#073c44"
117117
left: |
118118
Turing is created by <a href="http://mlg.eng.cam.ac.uk/hong/" target="_blank">Hong Ge</a>, and lovingly maintained by the <a href="https://github.com/TuringLang/Turing.jl/graphs/contributors" target="_blank">core team</a> of volunteers. <br>
119-
The contents of this website are © 2024 under the terms of the <a href="https://github.com/TuringLang/Turing.jl/blob/master/LICENCE" target="_blank">MIT License</a>.
119+
The contents of this website are © 2024 under the terms of the <a href="https://github.com/TuringLang/Turing.jl/blob/main/LICENCE" target="_blank">MIT License</a>.
120120
121121
right:
122122
- icon: twitter
@@ -129,7 +129,7 @@ website:
129129
back-to-top-navigation: true
130130
repo-url: https://github.com/TuringLang/docs
131131
repo-actions: [edit, issue]
132-
repo-branch: master
132+
repo-branch: main
133133
repo-link-target: _blank
134134
page-navigation: true
135135

assets/scripts/changelog.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
url="https://raw.githubusercontent.com/TuringLang/Turing.jl/master/HISTORY.md"
1+
url="https://raw.githubusercontent.com/TuringLang/Turing.jl/main/HISTORY.md"
22

33
changelog_content=$(curl -s "$url")
44

developers/inference/abstractmcmc-turing/index.qmd

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ chn = sample(mod, alg, n_samples, progress=false)
3737

3838
The function `sample` is part of the AbstractMCMC interface. As explained in the [interface guide]({{<meta using-turing-interface>}}), building a sampling method that can be used by `sample` consists in overloading the structs and functions in `AbstractMCMC`. The interface guide also gives a standalone example of their implementation, [`AdvancedMH.jl`]().
3939

40-
Turing sampling methods (most of which are written [here](https://github.com/TuringLang/Turing.jl/tree/master/src/mcmc)) also implement `AbstractMCMC`. Turing defines a particular architecture for `AbstractMCMC` implementations, that enables working with models defined by the `@model` macro, and uses DynamicPPL as a backend. The goal of this page is to describe this architecture, and how you would go about implementing your own sampling method in Turing, using Importance Sampling as an example. I don't go into all the details: for instance, I don't address selectors or parallelism.
40+
Turing sampling methods (most of which are written [here](https://github.com/TuringLang/Turing.jl/tree/main/src/mcmc)) also implement `AbstractMCMC`. Turing defines a particular architecture for `AbstractMCMC` implementations, that enables working with models defined by the `@model` macro, and uses DynamicPPL as a backend. The goal of this page is to describe this architecture, and how you would go about implementing your own sampling method in Turing, using Importance Sampling as an example. I don't go into all the details: for instance, I don't address selectors or parallelism.
4141

4242
First, we explain how Importance Sampling works in the abstract. Consider the model defined in the first code block. Mathematically, it can be written:
4343

@@ -86,7 +86,7 @@ mod = gdemo(1.5, 2)
8686

8787
creates an instance `mod` of the struct `Model`, which corresponds to the observations of a value of `1.5` for `x`, and a value of `2` for `y`.
8888

89-
This is all handled by DynamicPPL, more specifically [here](https://github.com/TuringLang/DynamicPPL.jl/blob/master/src/model.jl). I will return to how models are used to inform sampling algorithms [below](#assumeobserve).
89+
This is all handled by DynamicPPL, more specifically [here](https://github.com/TuringLang/DynamicPPL.jl/blob/main/src/model.jl). I will return to how models are used to inform sampling algorithms [below](#assumeobserve).
9090

9191
### Algorithms
9292

@@ -217,7 +217,7 @@ A lot of the things here are method-specific. However, Turing also has some func
217217
- its value: $\theta$
218218
- log of the joint probability of the observed data and this sample: `lp`
219219

220-
`Inference.jl` [defines](https://github.com/TuringLang/Turing.jl/blob/master/src/inference/Inference.jl#L103) a struct `Transition`, which corresponds to this default situation
220+
`Inference.jl` [defines](https://github.com/TuringLang/Turing.jl/blob/main/src/inference/Inference.jl#L103) a struct `Transition`, which corresponds to this default situation
221221

222222
```{julia}
223223
#| eval: false
@@ -227,7 +227,7 @@ struct Transition{T,F<:AbstractFloat}
227227
end
228228
```
229229

230-
It also [contains](https://github.com/TuringLang/Turing.jl/blob/master/src/inference/Inference.jl#L108) a constructor that builds an instance of `Transition` from an instance `spl` of `Sampler`: $\theta$ is `spl.state.vi` converted to a `namedtuple`, and `lp` is `getlogp(spl.state.vi)`. `is.jl` uses this default constructor at the end of the `step!` function [here](https://github.com/TuringLang/Turing.jl/blob/master/src/inference/is.jl#L58).
230+
It also [contains](https://github.com/TuringLang/Turing.jl/blob/main/src/inference/Inference.jl#L108) a constructor that builds an instance of `Transition` from an instance `spl` of `Sampler`: $\theta$ is `spl.state.vi` converted to a `namedtuple`, and `lp` is `getlogp(spl.state.vi)`. `is.jl` uses this default constructor at the end of the `step!` function [here](https://github.com/TuringLang/Turing.jl/blob/main/src/inference/is.jl#L58).
231231

232232
### How `sample` works
233233

0 commit comments

Comments
 (0)