Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI run and resolve errors #19

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ concurrency:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: ${{ matrix.downgrade && 'Downgrade / ' || '' }}Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }}
name: ${{ matrix.downgrade && 'Downgrade / ' || '' }}Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0' # minimum supported version
- '1.3' # minimum version with default database
- '1.3'
- '1'
- 'nightly'
os:
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PosteriorDB"
uuid = "1c4bc282-d2f5-44f9-b6d1-8c4424a23ad4"
authors = ["Seth Axen <seth@sethaxen.com> and contributors"]
version = "0.5.1"
version = "0.5.2"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -17,8 +17,8 @@ Compat = "3, 4"
JSON3 = "1"
OrderedCollections = "1"
Test = "<0.0.1, 1"
ZipFile = "0.8, 0.9, 0.10"
julia = "1"
ZipFile = "0.8.3, 0.9, 0.10"
julia = "1.3"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
2 changes: 1 addition & 1 deletion src/PosteriorDB.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module PosteriorDB
using JSON3, ZipFile
using OrderedCollections: OrderedDict
using Compat: stack
VERSION ≥ v"1.3" && using Artifacts
using Artifacts

include("utils.jl")
include("common.jl")
Expand Down
15 changes: 4 additions & 11 deletions src/posterior_database.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,10 @@ used.
database
database(path::String) = PosteriorDatabase(path)

@static if VERSION ≥ v"1.3"
function database()
artifact_path = artifact"posteriordb"
path = joinpath(artifact_path, readdir(artifact_path)[1], "posterior_database")
return database(path)
end
else
function database()
@error "On Julia versions < 1.3, the path to the posterior database must be provided. A copy can be downloaded from https://github.com/stan-dev/posteriordb."
return throw(MethodError(database, ()))
end
function database()
artifact_path = artifact"posteriordb"
path = joinpath(artifact_path, readdir(artifact_path)[1], "posterior_database")
return database(path)
end

Base.show(io::IO, ::PosteriorDatabase) = print(io, "PosteriorDatabase(...)")
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ POSTERIOR_DB_PATH = get(ENV, "POSTERIOR_DB_PATH", "")
@testset "PosteriorDatabase" begin
@test pdb isa PosteriorDB.PosteriorDatabase
@test isdir(PosteriorDB.path(pdb))
VERSION < v"1.3" && @test_throws MethodError PosteriorDB.database()
end

@testset "posterior" begin
Expand Down
Loading