Skip to content

Commit fdf42a5

Browse files
committed
Rename keyword argument only_ddpl to only_dppl and bump patch version
1 parent 80cf12d commit fdf42a5

File tree

9 files changed

+49
-12
lines changed

9 files changed

+49
-12
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/DynamicPPL.jl.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.38.4"
3+
version = "0.38.5"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

ext/DynamicPPLJETExt.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ using DynamicPPL: DynamicPPL
44
using JET: JET
55

66
function DynamicPPL.Experimental.is_suitable_varinfo(
7-
model::DynamicPPL.Model, varinfo::DynamicPPL.AbstractVarInfo; only_ddpl::Bool=true
7+
model::DynamicPPL.Model, varinfo::DynamicPPL.AbstractVarInfo; only_dppl::Bool=true
88
)
99
f, argtypes = DynamicPPL.DebugUtils.gen_evaluator_call_with_types(model, varinfo)
1010
# If specified, we only check errors originating somewhere in the DynamicPPL.jl.
1111
# This way we don't just fall back to untyped if the user's code is the issue.
12-
result = if only_ddpl
12+
result = if only_dppl
1313
JET.report_call(f, argtypes; target_modules=(JET.AnyFrameModule(DynamicPPL),))
1414
else
1515
JET.report_call(f, argtypes)
@@ -18,15 +18,15 @@ function DynamicPPL.Experimental.is_suitable_varinfo(
1818
end
1919

2020
function DynamicPPL.Experimental._determine_varinfo_jet(
21-
model::DynamicPPL.Model; only_ddpl::Bool=true
21+
model::DynamicPPL.Model; only_dppl::Bool=true
2222
)
2323
# Generate a typed varinfo to test model type stability with
2424
varinfo = DynamicPPL.typed_varinfo(model)
2525

2626
# Check type stability of evaluation (i.e. DefaultContext)
2727
model = DynamicPPL.setleafcontext(model, DynamicPPL.DefaultContext())
2828
eval_issuccess, eval_result = DynamicPPL.Experimental.is_suitable_varinfo(
29-
model, varinfo; only_ddpl
29+
model, varinfo; only_dppl
3030
)
3131
if !eval_issuccess
3232
@debug "Evaluation with typed varinfo failed with the following issues:"
@@ -36,7 +36,7 @@ function DynamicPPL.Experimental._determine_varinfo_jet(
3636
# Check type stability of initialisation (i.e. InitContext)
3737
model = DynamicPPL.setleafcontext(model, DynamicPPL.InitContext())
3838
init_issuccess, init_result = DynamicPPL.Experimental.is_suitable_varinfo(
39-
model, varinfo; only_ddpl
39+
model, varinfo; only_dppl
4040
)
4141
if !init_issuccess
4242
@debug "Initialisation with typed varinfo failed with the following issues:"

src/experimental.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Check if the `model` supports evaluation using the provided `varinfo`.
1616
- `varinfo`: The varinfo to verify the support for.
1717
1818
# Keyword Arguments
19-
- `only_ddpl`: If `true`, only consider error reports occuring in the tilde pipeline. Default: `true`.
19+
- `only_dppl`: If `true`, only consider error reports occuring in the tilde pipeline. Default: `true`.
2020
2121
# Returns
2222
- `issuccess`: `true` if the model supports the varinfo, otherwise `false`.
@@ -28,7 +28,7 @@ function is_suitable_varinfo end
2828
function _determine_varinfo_jet end
2929

3030
"""
31-
determine_suitable_varinfo(model; only_ddpl::Bool=true)
31+
determine_suitable_varinfo(model; only_dppl::Bool=true)
3232
3333
Return a suitable varinfo for the given `model`.
3434
@@ -42,7 +42,7 @@ See also: [`DynamicPPL.Experimental.is_suitable_varinfo`](@ref).
4242
- `model`: The model for which to determine the varinfo.
4343
4444
# Keyword Arguments
45-
- `only_ddpl`: If `true`, only consider error reports within DynamicPPL.jl.
45+
- `only_dppl`: If `true`, only consider error reports within DynamicPPL.jl.
4646
4747
# Examples
4848
@@ -83,10 +83,10 @@ julia> vi isa typeof(DynamicPPL.typed_varinfo(model_with_static_support()))
8383
true
8484
```
8585
"""
86-
function determine_suitable_varinfo(model::DynamicPPL.Model; only_ddpl::Bool=true)
86+
function determine_suitable_varinfo(model::DynamicPPL.Model; only_dppl::Bool=true)
8787
# If JET.jl has been loaded, and thus `determine_varinfo` has been defined, we use that.
8888
return if Base.get_extension(DynamicPPL, :DynamicPPLJETExt) !== nothing
89-
_determine_varinfo_jet(model; only_ddpl)
89+
_determine_varinfo_jet(model; only_dppl)
9090
else
9191
# Warn the user.
9292
@warn "JET.jl is not loaded. Assumes the model is compatible with typed varinfo."

test/ext/DynamicPPLJETExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
DynamicPPL.NTVarInfo
5757
# Should fail if we're including errors in the model body.
5858
@test DynamicPPL.Experimental.determine_suitable_varinfo(
59-
demo5(); only_ddpl=false
59+
demo5(); only_dppl=false
6060
) isa DynamicPPL.UntypedVarInfo
6161
end
6262

0 commit comments

Comments
 (0)