-
Couldn't load subscription status.
- Fork 15
break handlers.jl into default_render, default_equality and preprocess
#37
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
handlers.jl into default_render, default_equality and preprocess
src/core.jl
Outdated
| actual::T, | ||
| rendermode::Union{RenderMode, Nothing}=nothing, | ||
| equiv::Union{Function, Nothing}=nothing; | ||
| kw...) where T |
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.
Arguments order is changed because I made rendermode and equiv optional.
kw... are all passed to preprocess as it was (the only possible kw here is size for image type). It might be changed in the future, so I didn't document it.
|
What is the motivation of moving all this code out of its own file and intio From the title I thought it was going to turn Aside: moving code and editting code makes for hard to follow diffs. |
I'm planing to move |
|
@oxinabox I've tried to minimize the differences for you to review. Since all codes in It comes to an end of my vacation, I need to focus on my school stuff first and then I'll come back continue it. Since you prefer holding things apart in separate files, I'll move things related to After this PR:
|
|
mind to take a look at it? 👀@oxinabox |
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 like it.
Just a few minor things
|
The last three commits do a trivial organization work breaking |
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.
Nice
Bump the version (this is not breaking right? So patch)
and merge when ready,
then tag a release
_convert To avoid code duplication, codes in `handler.jl` are broken down into three functions: * `default_rendermode` that infers the most appropriate render mode according to DataFormat and type of `actual` * `default_equality` that infers the suitable equality compare method. * `_convert` that converts `actual` so that it has the same type of `reference`.
This PR is a part of #36 that makes the overall pipeline cleaner. It's also a preparation for the introduction of
@test_reference_brokenand@test_reference_skip.To avoid code duplication, codes in
handler.jlare broken down into three functions:default_renderthat infers the most appropriate render mode according to types offilenameandactual. By default, it'sBeforeAfterFull().default_equalitythat infers the suitable equality compare method. By default, it'sisequal.preprocessthat makesactualhave the same type ofreference.