SpikeInterface / SpikeInterface/spikeinterface
Remnant issues from #3304; adding more type annotations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
Remnant check boxes from #3304:
- the return value of
find_redundant_unitsinremove_redundant.py. It currently returns a list of a two member list.- Should we update that to be a list of 2 member tuples? Is there a reason why it is current a list of lists?
- In
sortingview_curation.py, there is# TODO @alessio you remove this after testing. I have not annotated this function since it would require importingBaseSortingsince even in quotes, Pylance does not recognize it.
After ensuring most documented functions offer return values, I think there are instances where defining input type hints can be useful as the input type definitions are sometimes implicitly used in the return type annotation. For example, if we annotate CurationSorting to have "BaseSorting" as part of the input in def __init__(self, sorting: "BaseSorting", make_graph=False, properties_policy="keep"):, then the return values of .sorting() and .current_sorting() are automatically provided instead of Any. The importance of this may not be high as these are internal functions rather than external functions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review #3304 and inspect remove_redundant.py and sortingview_curation.py. Determine whether find_redundant_units should return tuples, and investigate the BaseSorting annotation and related input and return type hints. Done means the agreed annotations are added and the noted TODO is resolved without breaking type checking or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100