Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate TransformedLogDensity #91

Closed
wants to merge 1 commit into from

Conversation

tpapp
Copy link
Owner

@tpapp tpapp commented Aug 29, 2022

In preparation for #89.

@tpapp tpapp requested a review from devmotion August 29, 2022 10:15
@tpapp tpapp mentioned this pull request Aug 29, 2022
5 tasks
@@ -159,6 +159,8 @@ struct TransformedLogDensity{T <: TransformVariables.AbstractTransform, L}
log_density_function::L
end

Base.@deprecate_moved TransformedLogDensity "TransformedLogDensities.TransformedLogDensity"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one should just state the package name here:

Suggested change
Base.@deprecate_moved TransformedLogDensity "TransformedLogDensities.TransformedLogDensity"
Base.@deprecate_moved TransformedLogDensity "TransformedLogDensities"

If I understand correctly, one should also remove all occurrences of TransformedLogDensity (and probably all traits for it) since otherwise the deprecation doesn't show up but is "overridden" by the type definition. Users will then see a deprecation warning that points them towards installing and loading TransformedLogDensities.

The macro also exports TransformedLogDensity automatically, so it could be removed from the exports. Similarly, I think the dependency on TransformVariables could be removed.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, doing that in #89 then.

@tpapp tpapp closed this Aug 30, 2022
@tpapp tpapp deleted the tp/deprecate-transformedlogdensity branch August 30, 2022 09:41
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.

2 participants