Skip to content
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

Add Keywords to the Documentation Functions #2057

Merged
merged 5 commits into from
Oct 2, 2023

Conversation

zm711
Copy link
Collaborator

@zm711 zm711 commented Sep 29, 2023

As discussed in #2046.

I didn't really touch the imports ( I only added imports in a couple spots where it was missing). Once we settle on that I'll just do that in a separate PR.


cs = CurationSorting(sorting)
cs = CurationSorting(parent_sorting=sorting)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this? Why do some functions use parent_sorting or parent_recording and most use sorting or recording.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we should unify this indeed! What would you vote for? Probably just recording and sorting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think the path of least resistance and the most obvious for the user is just to use recording and sorting. I don't think I would guess that I have a parent_sorting vs child_sorting at the api level for most functions. (Also less typing).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It's also a good time to make the switch. Do you think we should deprecate the old arguments or just break compatibility towards the next release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the recent issues with functions and arguments (#1907, #1899, #1678) it might be a better idea to deprecate for at least one release (although tearing off the band-aid would be cleaner like in #1865, which I would prefer), it seems like that change caused a bit of confusion for users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well this is only changing an argument name that it's probably not really used by most users. I think that most users will use banpass_filter(recording) and not bandpass_filter(parent_recording=recording) (same for channel_slice, other preprocessors, etc..). Keeping back-compatibility would mean adding a temporary argument and setting the main recording to None, which would possibly require to make some other args None by default...

Let's just make the switch. I checked and it's not that many files :)

@zm711 zm711 added the documentation Improvements or additions to documentation label Sep 30, 2023
doc/modules/exporters.rst Outdated Show resolved Hide resolved
doc/modules/extractors.rst Outdated Show resolved Hide resolved
Copy link
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @zm711

Just spotted a couple of small typos and have one comment!

doc/modules/extractors.rst Outdated Show resolved Hide resolved
Co-authored-by: Alessio Buccino <[email protected]>
@alejoe91 alejoe91 merged commit b301a18 into SpikeInterface:main Oct 2, 2023
8 checks passed
@zm711 zm711 deleted the doc-kwarg branch October 2, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants