-
Notifications
You must be signed in to change notification settings - Fork 190
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
Docstrings extractors update, fix PR01 and PR02 #3016 #3076
Docstrings extractors update, fix PR01 and PR02 #3016 #3076
Conversation
Thanks Chris! Ok to remove unused |
(Not knowing anything about the actual code functionality) it would be very cool to remove |
The "problem" is that the function dispatches wither the legacy or the binary format. We could extend the signature, but then we'll need to route the params accordingly! |
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! I think it is okay to remove these unused kwargs, they should either be removed or raise an error now and removed later. One option is to raise an error to explain, and deprecating in the version-after-next? More overhead thought to remember to remove, would have to add as an issue + milestone. If I understand correctly these are not critical arguments (e.g. it will be obvious what data blocks are returned, not like it can cause silent or unknown changes to results). In which case just remove I think!
Update docstrings in public Extractors module functions to be compliant with PR01 and PR02 from numpydoc.
(also fix a whitespace error in Preprocessing)
Two controversial changes:
BiocamRecordingExtractor
,SpikeGadgetsRecordingExtractor
andBlackrockRecordingExtractor
, which all had an unusedblock_index
parameter in their__init__
. I think it's better to delete these than to document something which is unused => can create unexpected behaviour. Is this a problem @alejoe91 @samuelgarcia ?read_openephys
still fails PR01 and PR02 because the Parameters are bundled in akwargs
dict. But the Parameters are very helpful and, from the user point of view, can be passed as "normal" parameters. Not sure what to do. Code here:spikeinterface/src/spikeinterface/extractors/neoextractors/openephys.py
Line 304 in d963aa2
The rules are...
https://numpydoc.readthedocs.io/en/latest/validation.html#
"PR01": "Parameters {missing_params} not documented",
"PR02": "Unknown parameters {unknown_params}",
...and they ensure that the function argument agrees with the Parameters listed in docstrings.