-
Notifications
You must be signed in to change notification settings - Fork 29
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
Remove the prob
and logprob
macros
#604
Conversation
Pull Request Test Coverage Report for Build 9099057865Details
💛 - Coveralls |
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.
Maybe add a depreciation message to these macros and inform users to look at alternative APIs?
@devmotion @torfjelde @yebai any suggestions on how to properly deprecate a macro? |
@sunxd3 I am not aware of a way to depreciate a macro properly. One simple heuristic is to print an informational message and guide the user to the new APIs regardless of the input arguments to the macro. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Put back the macros, but now they return a warning command, not sure this is a good solution. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #604 +/- ##
==========================================
- Coverage 76.93% 75.95% -0.98%
==========================================
Files 30 29 -1
Lines 3572 3435 -137
==========================================
- Hits 2748 2609 -139
- Misses 824 826 +2 ☔ View full report in Codecov by Sentry. |
src/prob_macro.jl
Outdated
@@ -1,244 +1,11 @@ | |||
macro logprob_str(str) |
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.
Looks good; maybe rename this file to depreciated.jl
?
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.
IMO if we can't deprecate properly, then either a) remove completely, or b) raise an error rather than @warn
and do nothing (this will just warn and immediately throw an error somewhere unrelated in the code since now prob"..."
doesn't do what it used to do).
I lean more to just delete them. It is not a core functionality that external code will likely rely on, so smaller chance or breaking behavior and surprises. |
I'm happy to delete these and add a release message to guide the users to new APIs. |
Co-authored-by: Hong Ge <[email protected]>
When merging changes like this: a) make sure to update I would also gently remind people that we should generally let reviewers with "requested changes" reviews to respond before merging PRs. |
Fix #356.
With DynamicPPL's
logjoint
,logprior
andloglikelihood
, the macro based query functions are not needed anymore.