mne-tools / mne-tools/mne-python

Long-term API consistency issues (probably for a 2.0)?

Open
#13,640 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

When looking through https://github.com/mne-tools/mne-python/issues/13634, it occurred to me that every once in a while we are reminded of long-running API or consistency issues that pop up from time to time. A couple come to mind:

  • get_data vs __getitem__ and use_rounding, whether a last sample is included or not, etc. -- for example https://github.com/mne-tools/mne-python/issues/13634
  • picks=None meaning different combinations of (all vs data) x (exclude=() vs exclude="bads") in multiple places

... and I'm sure there are others I'm forgetting (happy to edit this comment based on discussions below if needed).

We could consider having a longer-term clean-up of things like this. I think it would make sense to plan these for a 2.0 release. Packages like pandas and NumPy I think have made strides in this direction cleaning up some long-standing issues in their code using major releases -- we could consider doing the same.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue 13634 and comparing the documented behavior of get_data, getitem, use_rounding, and picks=None across the affected APIs. Identify the inconsistencies and their impact, then review the discussion to determine whether a scoped 2.0 cleanup plan has been agreed. Done means an explicitly defined, maintainable set of API changes rather than a general list of concerns.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.