Skip to content

Commit

Permalink
CompatHelper: bump compat for AbstractMCMC to 4, (keep existing compa…
Browse files Browse the repository at this point in the history
…t) (#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 <compathelper_noreply@julialang.org>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 8, 2022
1 parent 47eac94 commit 5663030
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

2 comments on commit 5663030

@devmotion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/56249

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" 566303065a5490c9fb7f068f292cbbd97d3c6029
git push origin v0.5.0

Please sign in to comment.