Skip to content

Commit 5663030

Browse files
github-actions[bot]CompatHelper Juliadevmotion
authored
CompatHelper: bump compat for AbstractMCMC to 4, (keep existing compat) (#28)
* CompatHelper: bump compat for AbstractMCMC to 4, (keep existing compat) * Update tests * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bump version * Drop support for Julia < 1.3 * Fix action Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: David Widmann <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 47eac94 commit 5663030

File tree

4 files changed

+35
-18
lines changed

4 files changed

+35
-18
lines changed

.github/workflows/CI.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
version:
23-
- '1.0'
23+
- '1.3'
2424
- '1'
2525
- 'nightly'
2626
os:
@@ -43,16 +43,7 @@ jobs:
4343
with:
4444
version: ${{ matrix.version }}
4545
arch: ${{ matrix.arch }}
46-
- uses: actions/cache@v1
47-
env:
48-
cache-name: cache-artifacts
49-
with:
50-
path: ~/.julia/artifacts
51-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
52-
restore-keys: |
53-
${{ runner.os }}-test-${{ env.cache-name }}-
54-
${{ runner.os }}-test-
55-
${{ runner.os }}-
46+
- uses: julia-actions/cache@v1
5647
- uses: julia-actions/julia-buildpkg@v1
5748
- uses: julia-actions/julia-runtest@v1
5849
with:

.github/workflows/Docs.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- uses: julia-actions/setup-julia@latest
21+
- uses: julia-actions/setup-julia@v1
2222
with:
2323
version: '1'
24-
- name: Install dependencies
25-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
2624
- name: Build and deploy
25+
uses: julia-actions/julia-docdeploy@v1
2726
env:
2827
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
2928
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
3029
JULIA_DEBUG: Documenter # Print `@debug` statements (https://github.com/JuliaDocs/Documenter.jl/issues/955)
31-
run: julia --project=docs/ docs/make.jl

Project.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "EllipticalSliceSampling"
22
uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2"
33
authors = ["David Widmann <[email protected]>"]
4-
version = "0.4.7"
4+
version = "0.5.0"
55

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

1313
[compat]
14-
AbstractMCMC = "3.2"
14+
AbstractMCMC = "3.2, 4"
1515
ArrayInterface = "2, 3, 4, 5"
1616
Distributions = "0.22, 0.23, 0.24, 0.25"
17-
julia = "1"
17+
julia = "1.3"
1818

1919
[extras]
2020
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"

test/simple.jl

+28
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333
@test all(length(x) == 2_000 for x in samples)
3434
@test mean(mean, samples) μ atol = 0.05
3535
@test mean(var, samples) σ² atol = 0.05
36+
37+
# initial parameter
38+
init_x = randn(5)
39+
samples = sample(
40+
ESSModel(prior, ℓ), ESS(), alg, 10, 5; progress=false, init_params=init_x
41+
)
42+
@test map(first, samples) == init_x
3643
end
3744

3845
# initial parameter
@@ -66,6 +73,13 @@
6673
@test all(length(x) == 2_000 for x in samples)
6774
@test mean(mean, samples) μ atol = 0.05
6875
@test mean(var, samples) σ² atol = 0.05
76+
77+
# initial parameter
78+
init_x = randn(5)
79+
samples = sample(
80+
ESSModel(prior, ℓ), ESS(), alg, 10, 5; progress=false, init_params=init_x
81+
)
82+
@test map(first, samples) == init_x
6983
end
7084

7185
# initial parameter
@@ -100,6 +114,13 @@
100114
@test all(length(x) == 2_000 for x in samples)
101115
@test mean(mean, samples) μ atol = 0.05
102116
@test mean(var, samples) σ² atol = 0.05
117+
118+
# initial parameter
119+
init_x = [randn(1) for _ in 1:5]
120+
samples = sample(
121+
ESSModel(prior, ℓvec), ESS(), alg, 10, 5; progress=false, init_params=init_x
122+
)
123+
@test map(first, samples) == init_x
103124
end
104125

105126
# initial parameter
@@ -136,6 +157,13 @@
136157
@test all(length(x) == 2_000 for x in samples)
137158
@test mean(mean, samples) μ atol = 0.05
138159
@test mean(var, samples) σ² atol = 0.05
160+
161+
# initial parameter
162+
init_x = [randn(1) for _ in 1:5]
163+
samples = sample(
164+
ESSModel(prior, ℓvec), ESS(), alg, 10, 5; progress=false, init_params=init_x
165+
)
166+
@test map(first, samples) == init_x
139167
end
140168

141169
# initial parameter

0 commit comments

Comments
 (0)