pydata / pydata/xarray

Align typing of dimension inputs

Open
#7,094 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs discussion topic-typing
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What is your issue?

Currently the input type for "one or more dims" is changing from function to function.
There are some open PRs that move to str | Iterable[Hashable] which allows the use of tuples as dimensions.

Some changes are still required:

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

Review the dim-accepting functions and the discussions linked from PRs 7048 and 6971 first. Determine where None and ellipsis should be accepted, and distinguish order-sensitive inputs from cases where sets are valid. Done means the typing and behavior are consistent across the affected functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.