-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Depreciate
@submodel l ~ m
in favour of l ~ to_submodel(m)
; rename…
… `generated_quantities` to `returned` (#696) * Added `@returned_quantities` macro * Added `@returned_quantities` to the docs * Fixed names of doctests for `@returned_quantities` * Update src/submodel_macro.jl Co-authored-by: Xianda Sun <[email protected]> * Added `@prefix` macro which calls `prefix` with a `Val` argument to make things easier to basic users * Convert the result of `prefix_expr` in `@prefix` into a `Sybmol` before wrapping in `Val` * Export `prefix` and `@prefix` * Updated docstring for `@returned_quantities` * Fixed bug in `rand` for `Model` where it would duplicate the non-leaf contexts in `model.context` * Update src/contexts.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Added `prefix` and `@prefix` to docs * removed the prefix=... syntax for `@returned_quantities` * added deprecation.jl + deprecated `generated_quantities` in favour of `returned_quantities` * removed export of `prefix` and `generated_quantities` (the latter is exported by the deprecation macro) * updated `DynamicPPLMCMCChainsExt` to define `returned_quantities` * updated docs * Update docs/src/api.md Co-authored-by: Hong Ge <[email protected]> * improved docstring for `prefix` and `@prefix` * added `@returned_quantities` macro taking two arguments + removed `returned_quantities` from exported functions * updated docs to reflect the new two-argument `@returned_quantities` * added depwarn to `@submodel` macro * fixed reference * fixed reference to `@prefix` in `@returned_quantities` macro * actually fixed doc references * updated doctests for `@submodel` to include the depwarn + added warning regarding deprecation of `@submodel` * added `to_sampleable` and limited `~` handling for submodels * added docs to `to_sampleable` + removed the unnecessary macro exports that we no longer need * updated more docstrings * added testing of deprecation warning of `@submodel` + replaced some usages in tests (though we don't support some of these so we cant' do that yet) * Update test/compiler.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * renamed `returned_quantities` to `returned` as requested * removed redundant `SampleableModelWrapper` in favour of `ReturnedModelWrapper` + introduced `rand_like!!` to hide explicit calls to `_evaluate!!` * updated tests + docstrings + warnings to use `returned` * updated docs * formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/model.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix docs * export `to_sampleable` and add to docs * fixed typo in warning * removed unnecessary import in docstring * added docstring to `rand_like!!` * fixed docstring for `returned(model)` * improvements to docstrings thanks to @penelopesym Co-authored-by: Penelope Yong <[email protected]> * added abstract type `Distributional` and concrete type `Sampleable`, in addition to method `to_submodel` * replaced usages of `returned` with `to_submodel` * formatting * Update docs/src/api.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * removed export of `to_sampleable` since it currently has no purpose + fixed docs for `returned` * formatting * updated docstring for `condition` and `fix` to not use `@submdoel` * added `check_tilde_rhs` for `Sampleable` * let the field of sampleable determine whether it works or not * add automatic prefixing of submodels + remove support for dot-tilde since this is ambigious in this case * added automatic prefixing for sub-models involved in `~` statements * updated depwarn for `@submodel` and tests * formatting * updated docstrings * updated docs * added more depwarns to the doctests to see if that helps (though I don't understand why this is needed for Documenter.jl) * forgot one * replaced usage of `generated_quantities` with `returned` * foxed docstring for `to_submodel` * patch version bump --------- Co-authored-by: Xianda Sun <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Hong Ge <[email protected]> Co-authored-by: Penelope Yong <[email protected]>
- Loading branch information
1 parent
82842bc
commit 2252a9b
Showing
13 changed files
with
456 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@deprecate generated_quantities(model, params) returned(model, params) |
Oops, something went wrong.
2252a9b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
2252a9b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/120668
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: