Skip to content

Commit 5ead461

Browse files
committed
Fix various deps and stuff
1 parent 52203f6 commit 5ead461

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1818
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
1919

2020
[extensions]
21-
AbstractPPLDistributionsExt = ["Distributions", "LinearAlgebra"]
21+
AbstractPPLDistributionsExt = ["Distributions"]
2222

2323
[compat]
2424
AbstractMCMC = "2, 3, 4, 5"

docs/src/api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ hasvalue
2828
getvalue
2929
```
3030

31+
## Splitting VarNames up into components
32+
33+
```@docs
34+
varname_leaves
35+
varname_and_value_leaves
36+
```
37+
3138
## VarName serialisation
3239

3340
```@docs

ext/AbstractPPLDistributionsExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This decision may be revisited in the future.
4949

5050
module AbstractPPLDistributionsExt
5151

52-
using AbstractPPL: AbstractPPL, VarName, Accessors
52+
using AbstractPPL: AbstractPPL, VarName, Accessors, LinearAlgebra
5353
using Distributions: Distributions
5454
using LinearAlgebra: Cholesky, LowerTriangular, UpperTriangular
5555

src/varname_leaves.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ See also: [`varname_and_value_leaves(vn::VarName, x)`](@ref).
122122
```jldoctest varname-and-value-leaves-container
123123
julia> using AbstractPPL: varname_and_value_leaves
124124
125-
julia> # With an `AbstractDict`
126-
dict = Dict(@varname(y) => 1, @varname(z) => [[2.0], [3.0]]);
125+
julia> using OrderedCollections: OrderedDict
126+
127+
julia> # With an `AbstractDict` (we use `OrderedDict` here
128+
# to ensure consistent ordering in doctests)
129+
dict = OrderedDict(@varname(y) => 1, @varname(z) => [[2.0], [3.0]]);
127130
128131
julia> foreach(println, varname_and_value_leaves(dict))
129132
(y, 1)

0 commit comments

Comments
 (0)