pydata / pydata/xarray

map_over_datasets - What is the required output of func?

Open
#10,053 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-DataTree topic-documentation
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What is your issue?

The introductory text and type hints seems to match:
https://github.com/pydata/xarray/blob/4bbab48cacf94ff285475bd7b7abeea3b2ea888f/xarray/core/datatree_mapping.py#L45

https://github.com/pydata/xarray/blob/4bbab48cacf94ff285475bd7b7abeea3b2ea888f/xarray/core/datatree_mapping.py#L58-L62

But the parameter doc is more restrictive:
https://github.com/pydata/xarray/blob/4bbab48cacf94ff285475bd7b7abeea3b2ea888f/xarray/core/datatree_mapping.py#L75-L80

Some examples showing the different return types would be nice as well. I understand the use case of func: Callable[..., Dataset], but I struggle with the other return types.

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 in xarray/core/datatree_mapping.py at the introductory text, type hints, and parameter documentation linked in the issue. Compare the stated Callable[..., Dataset] return type with the other return types, then document the required output and add examples showing the different return types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.