-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into torfjelde/check-model
- Loading branch information
Showing
89 changed files
with
3,197 additions
and
2,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
style="blue" | ||
format_markdown = true | ||
import_to_using = false | ||
# TODO | ||
# We ignore these files because when formatting was first put in place they were being worked on. | ||
# These ignores should be removed once the relevant PRs are merged/closed. | ||
ignore = [ | ||
# https://github.com/TuringLang/Turing.jl/pull/2231/files | ||
"src/experimental/gibbs.jl", | ||
"src/mcmc/abstractmcmc.jl", | ||
"test/experimental/gibbs.jl", | ||
"test/test_utils/numerical_tests.jl", | ||
# https://github.com/TuringLang/Turing.jl/pull/2218/files | ||
"src/mcmc/Inference.jl", | ||
"test/mcmc/Inference.jl", | ||
# https://github.com/TuringLang/Turing.jl/pull/1887 # Enzyme PR | ||
"test/mcmc/Inference.jl", | ||
"test/mcmc/hmc.jl", | ||
"test/mcmc/sghmc.jl", | ||
"test/runtests.jl", | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Format | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: 1 | ||
- name: Format code | ||
run: | | ||
using Pkg | ||
Pkg.add(; name="JuliaFormatter", uuid="98e50ef6-434e-11e9-1051-2b60c6c9e899") | ||
using JuliaFormatter | ||
format("."; verbose=true) | ||
shell: julia --color=yes {0} | ||
- uses: reviewdog/action-suggester@v1 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
tool_name: JuliaFormatter | ||
fail_on_error: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.version == 'nightly' }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-args: | ||
# Run some of the slower test files individually. The last one catches everything | ||
# not included in the others. | ||
- "essential/ad.jl" | ||
- "mcmc/gibbs.jl" | ||
- "mcmc/hmc.jl" | ||
- "mcmc/abstractmcmc.jl" | ||
- "mcmc/Inference.jl" | ||
- "experimental/gibbs.jl" | ||
- "mcmc/ess.jl" | ||
- "--skip essential/ad.jl mcmc/gibbs.jl mcmc/hmc.jl mcmc/abstractmcmc.jl mcmc/Inference.jl experimental/gibbs.jl mcmc/ess.jl" | ||
version: | ||
- '1.7' | ||
- '1' | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macOS-latest | ||
arch: | ||
- x64 | ||
- x86 | ||
num_threads: | ||
- 1 | ||
- 2 | ||
exclude: | ||
# With Windows and macOS, only run Julia 1.7, x64, 2 threads. We just want to see | ||
# some combination work on OSes other than Ubuntu. | ||
- os: windows-latest | ||
version: '1' | ||
- os: macOS-latest | ||
version: '1' | ||
- os: windows-latest | ||
arch: x86 | ||
- os: macOS-latest | ||
arch: x86 | ||
- os: windows-latest | ||
num_threads: 1 | ||
- os: macOS-latest | ||
num_threads: 1 | ||
# It's sufficient to test x86 with one version of Julia and one thread. | ||
- version: '1' | ||
arch: x86 | ||
- num_threads: 2 | ||
arch: x86 | ||
|
||
steps: | ||
- name: Print matrix variables | ||
run: | | ||
echo "OS: ${{ matrix.os }}" | ||
echo "Architecture: ${{ matrix.arch }}" | ||
echo "Julia version: ${{ matrix.version }}" | ||
echo "Number of threads: ${{ matrix.num_threads }}" | ||
echo "Test arguments: ${{ matrix.test-args }}" | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: '${{ matrix.version }}' | ||
arch: ${{ matrix.arch }} | ||
- uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-artifacts | ||
with: | ||
path: ~/.julia/artifacts | ||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-test-${{ env.cache-name }}- | ||
${{ runner.os }}-test- | ||
${{ runner.os }}- | ||
- uses: julia-actions/julia-buildpkg@latest | ||
- name: Call Pkg.test | ||
run: julia --color=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; test_args=ARGS)' -- ${{ matrix.test-args }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.