pydata / pydata/xarray

Link API docs to user guide and other examples

Open
#5,816 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

contrib-good-first-issue contrib-help-wanted topic-documentation
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

Noting down a comment by @danjonesocean on Twitter: https://twitter.com/DanJonesOcean/status/1441392596362874882

In general, having more examples on each xarray page (like the one below) would be good. Then they would come up quickly in function searches:

http://xarray.pydata.org/en/stable/generated/xarray.Dataset.merge.html#xarray.Dataset.merge

Our API docs are generated by the function docstrings, and these are usually the first thing users hit when they search for functions. However, these docstring uniformly lack examples, often leaving users stuck.

I see two ways to mitigate this:

  • Add examples directly to the docstings (suggested by @jklymak)
  • Cross reference other examples from the user guide or other tutorials

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 reviewing the generated API documentation and the user guide or tutorials referenced in the issue, especially the Dataset.merge example. Determine which API docstrings lack examples and whether existing guide examples can be cross-referenced. Done should mean the agreed set of API pages provides useful links or examples, with the generated documentation checked for correctness.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
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.