Skip to content

Commit

Permalink
Put HMMBase in extension of HMMTest
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Sep 29, 2024
1 parent a8b048a commit 1dc2dfb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
tags: ['*']
tags: ["*"]
pull_request:
concurrency:
# Skip intermediate builds: always.
Expand All @@ -18,10 +18,13 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1'
os:
- ubuntu-latest
- "1.9"
- "1"
test_suite:
- "normal"
- "hmmbase"
env:
JULIA_HMM_TEST_SUITE: ${{ matrix.test_suite }}
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -36,4 +39,4 @@ jobs:
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: true
7 changes: 6 additions & 1 deletion libs/HMMTest/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ version = "0.1.0"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
HMMBase = "b2b3ca75-8444-5ffa-85e6-af70e2b64fe7"
HiddenMarkovModels = "84ca31d5-effc-45e0-bfda-5a68cd981f47"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
HMMBase = "b2b3ca75-8444-5ffa-85e6-af70e2b64fe7"

[extensions]
HMMTestHMMBaseExt = "HMMBase"
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
module HMMTestHMMBaseExt

function test_identical_hmmbase(
using HiddenMarkovModels
import HiddenMarkovModels as HMMs
using HMMBase: HMMBase
using HMMTest: HMMTest
using Random: AbstractRNG
using Statistics: mean
using Test: @test, @testset, @test_broken

function HMMTest.test_identical_hmmbase(
rng::AbstractRNG,
hmm::AbstractHMM,
T::Integer;
Expand Down Expand Up @@ -54,3 +63,6 @@ function test_identical_hmmbase(
end
end
end


end
3 changes: 2 additions & 1 deletion libs/HMMTest/src/HMMTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ using Random: AbstractRNG
using Statistics: mean
using Test: @test, @testset, @test_broken

function test_identical_hmmbase end # in extension

export transpose_hmm
export test_equal_hmms, test_coherent_algorithms
export test_identical_hmmbase
Expand All @@ -18,7 +20,6 @@ export test_type_stability
include("utils.jl")
include("coherence.jl")
include("allocations.jl")
include("hmmbase.jl")
include("jet.jl")

end

0 comments on commit 1dc2dfb

Please sign in to comment.