-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Flexible extension to RFrames #334
Flexible extension to RFrames #334
Conversation
9ab5f47
to
a219185
Compare
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
==========================================
+ Coverage 96.17% 96.29% +0.12%
==========================================
Files 21 21
Lines 1151 1189 +38
==========================================
+ Hits 1107 1145 +38
Misses 44 44
Continue to review full report at Codecov.
|
video = Video(10, 10) | ||
Background(1:20, dummy) | ||
a = Object(1:3, (args...) -> O) # 1:3 | ||
b = Object(RFrames(2:5, prev_start(), default_last()), (args...) -> O) # 3:6 |
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 find this a little hard to read. What exactly is the meaning of default_last()
when combined with prev_start
here?
Thanks for opening this PR @codejaeger |
I think a good way to have a lot of flexibility would be to use: macro Frames(start, len)
return :(()->$start:$len)
end and then with simple functions like this: prev_start() = CURRENT_OBJECT[1].frames.frames[1] This would be possible: @Frames(prev_start(), 10) Javis just needs to call the anonymous macro function then to get the frames. Additionally maybe we can provide a |
@codejaeger you can let me know here if you want to continue working on it. If not I might implement this myself in the next couple of days. |
Hey @Wikunia , here are my views and thoughts on the approach. Your idea seems a much more readable way to do the job than what the PR proposes. I have just a few doubts on the approach.
|
|
We might replace this by #338 |
Can we close this @codejaeger ? |
Yes, sure @Wikunia . |
PR Checklist
If you are contributing to
Javis.jl
, please make sure you are able to check off each item on this list:CHANGELOG.md
with whatever changes/features I added with this PR?Project.toml
+ set an upper bound of the dependency (if applicable)?test
directory (if applicable)?Link to relevant issue(s)
Closes #331
How did you address these issues with this PR? What methods did you use?
As discussed in the issue there were 2 approaches to make
RFrames
more flexible. One was to supply additional flags to accommodate the different cases. Other is to let the user specify the starting reference and (optionally) the end frame.The latter allows a wide range of options like specifying the frame range based on a previously created object.
Any suggestions @Wikunia @TheCedarPrince @Sov-trotter ?