-
Notifications
You must be signed in to change notification settings - Fork 4
172 create duration spec and update fly and step #176
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
172 create duration spec and update fly and step #176
Conversation
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.
Please can you also remove all references to DURATION
and the Static.duration
classmethod
Changed this PR to be a draft for the time being as I'm not sure this is the right way to implement what was discussed with @coretl. |
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.
Hmm, I'm still a little unsure about whether we've got the typing right, but if you do these bits then we can explore in a different ticket
It was decided that in a |
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.
One more suggestion, then I think the code is done.
Please could you add unit tests for all the if branches in the new code that are not currently covered:
https://app.codecov.io/gh/bluesky/scanspec/pull/176?dropdown=coverage&src=pr&el=h1
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.
Found a few more...
Default value of the bounds argument is now `False`. Needed to change the `frames` method in the `Spec` class so that it would call calculate with the correct bounds, otherwise it wouls break some tests. Made it so that the `duration` method in the base class `Spec` returned None by default and removed the implementations from classes that would always return None.
Added support for __rmatmul__ Added fly function back but put a deprecation warning on it and the step function
tests_cli needed to be changed because previously, the default value for bounds was `True` which would imply now that we're doing a fly scan. This is not the default anymore. Updated specs tests so that they would also catch the error messages
Added new tests for fly, step and get_constant_duration functions. Also updated their warning messages
59a8d92
to
0322a09
Compare
Reverting test_rect_region_difference to a fly scan Added return values to duration method on Fly class
"Anywhere in the tests where gap output has changed, can we put it back, and change the spec so the gap output is the same?" |
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.
Almost there...
This Pull Request aims at adding a new spec class
Duration
that contains only aFloat
. This class is now used infly
andstep
as a newDimension
that iszipped
with the other ones.