return_scaled to return_in_uV #3794
Conversation
|
We are going for the way it is now, |
|
Templates has also a field is_scaled. Should it be changed also ? If yes, sortingcomponents needs quite a lot of changes, because we are heavily using return_scaled and is_scaled |
I guess the better named attribute is |
|
I saw the template thing and I wanted to discussed on the previous maintenance meeting but I forgot. In any case, I think that changes should be its own PR. |
for more information, see https://pre-commit.ci
| RX1 : BaseRecording | ||
| First recording | ||
| RX2 : BaseRecording | ||
| Second recording | ||
| return_scaled : bool | None, default: None | ||
| DEPRECATED. Use return_in_uV instead. | ||
| If True, compare scaled traces | ||
| return_in_uV : bool, default: True | ||
| If True, compare scaled traces. | ||
| force_dtype : dtype, default: None | ||
| If not None, force the dtype of the traces before comparison | ||
| check_annotations : bool, default: False | ||
| If True, check annotations | ||
| check_properties : bool, default: False | ||
| If True, check properties |
There was a problem hiding this comment.
Tests are passing and I know a lot of like to use keyword, but others on the team tend toward using positional arguments internally. So we risk:
check_recordings_equal(rec1, rec2, True, 'float32', True, False)which would raise errors rather then putting the deprecation at the end which would allow things to work with positional as well and raise the error if using the wrong keyword. How are you thinking about this?
There was a problem hiding this comment.
But my point is deprecating across multiple functions and I just took this one as an example.
There was a problem hiding this comment.
We can move the old parameter to the end if you want.
|
Genial. Merci infiniment. @yger Lets make another PR after the merge for |
OK, so I open this PR for two reasons:
As you can see this will be a massive change and I think that someone (cc @samuelgarcia) really dislikes dealing with merge conflicts so maybe we could just change this in
BaseRecordingand coget_tracesand deal with annoying deprecation messages for a while. That is, we fix the deprecations piecewise here and there.The named proposed on the meeting,
scale_to_uV, will clash with the preprocessing class of the same name. I have chosenreturn_in_UVas the interpolation ofreturn_scaledand the discussedscale_to_uVbut I am happy to change this.return_in_UVis regex-friendly so it should be easy to change if so we decide.My own preference of course is to merge this as it is and get done with it.