-
Notifications
You must be signed in to change notification settings - Fork 31
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
Split up TestUtils module #719
Conversation
f98ddc7
to
dded037
Compare
Pull Request Test Coverage Report for Build 11937950949Details
💛 - Coveralls |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #719 +/- ##
=======================================
Coverage 84.35% 84.35%
=======================================
Files 30 35 +5
Lines 4211 4212 +1
=======================================
+ Hits 3552 3553 +1
Misses 659 659 ☔ View full report in Codecov by Sentry. |
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.
Definitely an improvement. I obviously didn't actually check whether any code was changed, but assuming this is all just moving stuff, happy with it.
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.
I second @mhauru 's review -- this seems eminently sensible to me.
Good stuff @penelopeysm :)
This is sort of an issue of testing though IMO rather than that the functionality should live in Turing.jl. |
Ok, I'll keep samplers in TestUtilsExt then! |
Wait, are we moving |
That's what I proposed! I was probably going to move it as a separate PR because that will be breaking. |
Aye, that's what I understood originally.
This is the part I find a bit confusing 😕 But yeah, not too opinionated about it. |
It is rather unfortunate that extensions work that way :/ I can make the PR and we can discuss the pros/cons there! |
A bit annoyed by how the merge queue makes us run CI twice 😅 |
This seems like a reasonable first step towards #550 and TuringLang/Turing.jl#2307.
This PR just breaks
src/test_utils.jl
up into thematically related bits, so as far as Julia is concerned this is a no-op. But, not all functionality insrc/test_utils.jl
is created equally, and this separation lets us discuss where the different things should go.My initial thoughts:
src/test_utils/contexts.jl
andsrc/test_utils/varinfo.jl
are only really meant to be used inside DPPL tests, as far as I can tell. I reckon these should go into aDynamicPPLTestExt
.src/test_utils/sampler.jl
isn't used inside the DPPL tests, but is used in the Turing tests. I don't have a strong opinion on this but I think I would slightly prefer if they were moved to Turing as that is closer to the point of use.src/
. However, I think we shouldn't call the modelsTestUtils
– I think we should give them their own module, likeDemoModels
.I've avoided making any changes to the code itself because those changes would get lost in the diff.