-
Notifications
You must be signed in to change notification settings - Fork 36
Separate context code into smaller files; remove some dead code #1050
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
Conversation
c0921ae
to
f5a3327
Compare
Benchmark Report for Commit dd3a13cComputer Information
Benchmark Results
|
broadcast_safe(x) = x | ||
broadcast_safe(x::Distribution) = (x,) | ||
broadcast_safe(x::AbstractContext) = (x,) |
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.
This was no longer used anywhere
include("contexts.jl") | ||
include("contexts/default.jl") | ||
include("contexts/init.jl") | ||
include("contexts/transformation.jl") | ||
include("contexts/prefix.jl") | ||
include("contexts/conditionfix.jl") # Must come after contexts/prefix.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.
TLDR:
contexts.jl
used to contain all the parent contexts, those have been moved to their own files.
- Now
contexts.jl
includes only the interface methods for AbstractContext. In a sense it's more likeabstract_context.jl
. - It's still not fully documented exactly what the interface for AbstractContext is. I'd like to make that a separate PR though because I actually think NodeTrait can be removed which would simplify matters there.
context_implementations.jl
used to contain stray methods for DefaultContext, PrefixContext, and submodels. Those have been sent to their respective files.
transforming.jl
basically existed to define DynamicTransformationContext so I moved it into contexts/
too. That file also defined some methods for linking AbstractVarInfo so those were moved to abstract_varinfo.jl
too since they form part of the interface methods for it.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## breaking #1050 +/- ##
===========================================
Coverage ? 82.20%
===========================================
Files ? 41
Lines ? 3810
Branches ? 0
===========================================
Hits ? 3132
Misses ? 678
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f5a3327
to
dd3a13c
Compare
DynamicPPL.jl documentation for PR #1050 is available at: |
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.
All good from me
This PR purely shuffles code around, there are no real code changes.