Skip to content

Commit

Permalink
Merge a36e3cf into 47eac94
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 8, 2022
2 parents 47eac94 + a36e3cf commit 4ed02c5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/CI.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
version:
- '1.0'
- '1.3'
- '1'
- 'nightly'
os:
Expand All @@ -43,16 +43,7 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
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/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/Docs.yml
Expand Up @@ -18,14 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
JULIA_DEBUG: Documenter # Print `@debug` statements (https://github.com/JuliaDocs/Documenter.jl/issues/955)
run: julia --project=docs/ docs/make.jl
6 changes: 3 additions & 3 deletions Project.toml
@@ -1,7 +1,7 @@
name = "EllipticalSliceSampling"
uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2"
authors = ["David Widmann <david.widmann@it.uu.se>"]
version = "0.4.7"
version = "0.5.0"

[deps]
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
Expand All @@ -11,10 +11,10 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
AbstractMCMC = "3.2"
AbstractMCMC = "3.2, 4"
ArrayInterface = "2, 3, 4, 5"
Distributions = "0.22, 0.23, 0.24, 0.25"
julia = "1"
julia = "1.3"

[extras]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand Down
28 changes: 28 additions & 0 deletions test/simple.jl
Expand Up @@ -33,6 +33,13 @@
@test all(length(x) == 2_000 for x in samples)
@test mean(mean, samples) μ atol = 0.05
@test mean(var, samples) σ² atol = 0.05

# initial parameter
init_x = randn(5)
samples = sample(
ESSModel(prior, ℓ), ESS(), alg, 10, 5; progress=false, init_params=init_x
)
@test map(first, samples) == init_x
end

# initial parameter
Expand Down Expand Up @@ -66,6 +73,13 @@
@test all(length(x) == 2_000 for x in samples)
@test mean(mean, samples) μ atol = 0.05
@test mean(var, samples) σ² atol = 0.05

# initial parameter
init_x = randn(5)
samples = sample(
ESSModel(prior, ℓ), ESS(), alg, 10, 5; progress=false, init_params=init_x
)
@test map(first, samples) == init_x
end

# initial parameter
Expand Down Expand Up @@ -100,6 +114,13 @@
@test all(length(x) == 2_000 for x in samples)
@test mean(mean, samples) μ atol = 0.05
@test mean(var, samples) σ² atol = 0.05

# initial parameter
init_x = [randn(1) for _ in 1:5]
samples = sample(
ESSModel(prior, ℓvec), ESS(), alg, 10, 5; progress=false, init_params=init_x
)
@test map(first, samples) == init_x
end

# initial parameter
Expand Down Expand Up @@ -136,6 +157,13 @@
@test all(length(x) == 2_000 for x in samples)
@test mean(mean, samples) μ atol = 0.05
@test mean(var, samples) σ² atol = 0.05

# initial parameter
init_x = [randn(1) for _ in 1:5]
samples = sample(
ESSModel(prior, ℓvec), ESS(), alg, 10, 5; progress=false, init_params=init_x
)
@test map(first, samples) == init_x
end

# initial parameter
Expand Down

0 comments on commit 4ed02c5

Please sign in to comment.