Skip to content

Add Literate tutorials with embedded tests#50

Merged
rsenne merged 1 commit into
mainfrom
literate-tutorials
Jul 12, 2026
Merged

Add Literate tutorials with embedded tests#50
rsenne merged 1 commit into
mainfrom
literate-tutorials

Conversation

@rsenne

@rsenne rsenne commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Three tutorials in examples/ (basics, GLM emissions, ACDC model selection): Literate.jl scripts whose @test lines are hidden from the rendered docs with #src but run as part of the package test suite. docs/make.jl converts them into a Tutorials section, and test/runtests.jl includes each example as a testset.

Resolves #45

Three tutorials in examples/ (basics, GLM emissions, ACDC model
selection) in the style of HiddenMarkovModels.jl: Literate.jl scripts
whose @test lines are hidden from the rendered docs with #src but run
as part of the package test suite. docs/make.jl converts them into a
Tutorials section, and test/runtests.jl includes each example as a
testset.
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.28%. Comparing base (8634168) to head (37e66a9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
+ Coverage   99.12%   99.28%   +0.15%     
==========================================
  Files           7        7              
  Lines        1257     1257              
==========================================
+ Hits         1246     1248       +2     
+ Misses         11        9       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main 37e66a9... main / 37e66a9...
fit!/BernoulliGLM 0.216 ± 0.005 ms 0.217 ± 0.0051 ms 0.999 ± 0.033
fit!/GaussianGLM 13.1 ± 1.6 μs 13.1 ± 1.6 μs 1 ± 0.18
fit!/MultivariateT 2.32 ± 0.011 ms 2.33 ± 0.011 ms 0.996 ± 0.0065
fit!/MultivariateTDiag 0.496 ± 0.0089 ms 0.498 ± 0.0088 ms 0.996 ± 0.025
fit!/MvBernoulliGLM 0.44 ± 0.0094 ms 0.436 ± 0.0092 ms 1.01 ± 0.03
fit!/MvGaussianGLM 21.2 ± 0.15 μs 21.5 ± 0.17 μs 0.988 ± 0.01
fit!/MvPoissonGLM 0.257 ± 0.0089 ms 0.259 ± 0.009 ms 0.993 ± 0.049
fit!/PoissonGLM 0.2 ± 0.0038 ms 0.2 ± 0.004 ms 0.999 ± 0.028
fit!/PoissonZeroInflated 6.99 ± 0.06 μs 6.91 ± 0.041 μs 1.01 ± 0.011
logdensityof/BernoulliGLM 13.6 ± 0.049 μs 13.1 ± 0.051 μs 1.04 ± 0.0055
logdensityof/GaussianGLM 6.81 ± 0.02 μs 6.79 ± 0.041 μs 1 ± 0.0067
logdensityof/MultivariateT 0.0687 ± 0.00083 ms 0.0707 ± 0.0005 ms 0.972 ± 0.014
logdensityof/MultivariateTDiag 29 ± 0.12 μs 28.9 ± 0.1 μs 1 ± 0.0054
logdensityof/MvBernoulliGLM 26 ± 0.081 μs 26 ± 0.12 μs 1 ± 0.0056
logdensityof/MvGaussianGLM 0.0425 ± 0.00051 ms 0.0426 ± 0.00051 ms 0.996 ± 0.017
logdensityof/MvPoissonGLM 21 ± 0.07 μs 21 ± 0.081 μs 0.999 ± 0.0051
logdensityof/PoissonGLM 11.6 ± 0.06 μs 11.6 ± 0.05 μs 0.999 ± 0.0067
logdensityof/PoissonZeroInflated 18.1 ± 0.06 μs 18.1 ± 0.06 μs 0.999 ± 0.0047
rand!/MultivariateT 0.141 ± 0.01 μs 0.15 ± 0.011 μs 0.94 ± 0.096
rand!/MultivariateTDiag 0.09 ± 0.009 μs 0.09 ± 0 μs 1 ± 0.1
rand!/MvBernoulliGLM 0.071 ± 0.01 μs 0.071 ± 0.01 μs 1 ± 0.2
rand!/MvGaussianGLM 0.12 ± 0.01 μs 0.12 ± 0.001 μs 1 ± 0.084
rand!/MvPoissonGLM 0.12 ± 0.021 μs 0.12 ± 0.021 μs 1 ± 0.25
rand/BernoulliGLM 0.06 ± 0.01 μs 0.051 ± 0.01 μs 1.18 ± 0.3
rand/GaussianGLM 0.04 ± 0.01 μs 0.04 ± 0.01 μs 1 ± 0.35
rand/PoissonGLM 0.05 ± 0.001 μs 0.05 ± 0.01 μs 1 ± 0.2
rand/PoissonZeroInflated 0.06 ± 0.02 μs 0.06 ± 0.02 μs 1 ± 0.47
time_to_load 0.945 ± 0.015 s 0.936 ± 0.0087 s 1.01 ± 0.019
Memory benchmarks
main 37e66a9... main / 37e66a9...
fit!/BernoulliGLM 0.139 k allocs: 6.02 kB 0.139 k allocs: 6.02 kB 1
fit!/GaussianGLM 4 allocs: 0.188 kB 4 allocs: 0.188 kB 1
fit!/MultivariateT 0.099 k allocs: 9.13 kB 0.099 k allocs: 9.13 kB 1
fit!/MultivariateTDiag 11 allocs: 4.32 kB 11 allocs: 4.32 kB 1
fit!/MvBernoulliGLM 0.28 k allocs: 12.2 kB 0.28 k allocs: 12.2 kB 1
fit!/MvGaussianGLM 10 allocs: 0.516 kB 10 allocs: 0.516 kB 1
fit!/MvPoissonGLM 0.28 k allocs: 12.2 kB 0.28 k allocs: 12.2 kB 1
fit!/PoissonGLM 0.183 k allocs: 7.78 kB 0.183 k allocs: 7.78 kB 1
fit!/PoissonZeroInflated 0 allocs: 0 B 0 allocs: 0 B
logdensityof/BernoulliGLM 0 allocs: 0 B 0 allocs: 0 B
logdensityof/GaussianGLM 0 allocs: 0 B 0 allocs: 0 B
logdensityof/MultivariateT 1 k allocs: 0.0381 MB 1 k allocs: 0.0381 MB 1
logdensityof/MultivariateTDiag 0 allocs: 0 B 0 allocs: 0 B
logdensityof/MvBernoulliGLM 0 allocs: 0 B 0 allocs: 0 B
logdensityof/MvGaussianGLM 1 k allocs: 0.0381 MB 1 k allocs: 0.0381 MB 1
logdensityof/MvPoissonGLM 0 allocs: 0 B 0 allocs: 0 B
logdensityof/PoissonGLM 0 allocs: 0 B 0 allocs: 0 B
logdensityof/PoissonZeroInflated 0 allocs: 0 B 0 allocs: 0 B
rand!/MultivariateT 0 allocs: 0 B 0 allocs: 0 B
rand!/MultivariateTDiag 0 allocs: 0 B 0 allocs: 0 B
rand!/MvBernoulliGLM 0 allocs: 0 B 0 allocs: 0 B
rand!/MvGaussianGLM 0 allocs: 0 B 0 allocs: 0 B
rand!/MvPoissonGLM 0 allocs: 0 B 0 allocs: 0 B
rand/BernoulliGLM 0 allocs: 0 B 0 allocs: 0 B
rand/GaussianGLM 0 allocs: 0 B 0 allocs: 0 B
rand/PoissonGLM 0 allocs: 0 B 0 allocs: 0 B
rand/PoissonZeroInflated 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.149 k allocs: 11.1 kB 0.149 k allocs: 11.1 kB 1

@rsenne rsenne merged commit 7f9cbe0 into main Jul 12, 2026
8 checks passed
@rsenne rsenne deleted the literate-tutorials branch July 12, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Literate tutorials with embedded tests

1 participant