Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: cross ref the groupby tutorial #7555

Merged
merged 4 commits into from
Feb 24, 2023

Conversation

jklymak
Copy link
Contributor

@jklymak jklymak commented Feb 24, 2023

There are probably many more of these that could be done, but xarray has great explainers that are not linked in the API reference. Not sure if that is on purpose (obviously they are kind of useless if you aren't looking at the http version), but if not, this at least does them for groupby, which is something I always need the explainer for...

@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

@dcherian
Copy link
Contributor

Thanks @jklymak Can you put that in the See Also section please? I think that's what numpydoc encourages.

@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

I can. Honestly I wasn't sure :ref: would work there? But I can try it.

@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

That renders OK

GB

However, I find it kind of hard to tell that is leading to the user docs. Trying

:ref:`Users guide: group and bin data <groupby>`

@keewis
Copy link
Collaborator

keewis commented Feb 24, 2023

here's a example of how we solved this before:

xarray/xarray/core/dataset.py

Lines 2093 to 2094 in 4427eaa

:ref:`io.zarr`
The I/O user guide, with more details and examples.

This is technically the same, except when reading this you don't have to parse the rst link syntax.

@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

@keewis That comes out as

image

which is fine. I may change the description to be less repetitive with the title of the user-guide page if that is the preferred format for this.

@jklymak jklymak force-pushed the doc-cross-ref-groupby branch 2 times, most recently from 8fde2ff to f557b9c Compare February 24, 2023 16:05
@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

Changed to

        :ref:`groupby`
            Users guide explanation of how to group and bin data.

@jklymak
Copy link
Contributor Author

jklymak commented Feb 24, 2023

(BTW if this gets merged feel free to squash my commits, I'm just keeping the history in case someone wants a previous version)

@keewis
Copy link
Collaborator

keewis commented Feb 24, 2023

don't worry about the commit history, we always squash merge

@dcherian
Copy link
Contributor

Yes that looks great! Thank you!

@dcherian dcherian merged commit ec1d328 into pydata:main Feb 24, 2023
@jklymak jklymak deleted the doc-cross-ref-groupby branch February 24, 2023 17:30
dcherian added a commit to bzah/xarray that referenced this pull request Feb 28, 2023
* upstream/main: (291 commits)
  Update error message when saving multiindex (pydata#7475)
  DOC: cross ref the groupby tutorial (pydata#7555)
  [pre-commit.ci] pre-commit autoupdate (pydata#7543)
  supress namespace_package deprecation warning (doctests) (pydata#7548)
  [skip-ci] Add PDF of Xarray logo (pydata#7530)
  Support complex arrays in xr.corr (pydata#7392)
  clarification for thresh arg of dataset.dropna() (pydata#7481)
  [pre-commit.ci] pre-commit autoupdate (pydata#7524)
  Require to explicitly defining optional dimensions such as hue and markersize (pydata#7277)
  Use plt.rc_context for default styles (pydata#7318)
  Update HOW_TO_RELEASE.md (pydata#7512)
  Update whats-new for dev (pydata#7511)
  Fix whats-new for 2023.02.0 (pydata#7506)
  Update apply_ufunc output_sizes error message (pydata#7509)
  Zarr: drop "source" and  "original_shape" from encoding (pydata#7500)
  [pre-commit.ci] pre-commit autoupdate (pydata#7507)
  Whats-new for 2023.03.0
  Add `inclusive` argument to `cftime_range` and `date_range` and deprecate `closed` argument (pydata#7373)
  Make text match code example (pydata#7499)
  Remove Dask single-threaded setting in tests (pydata#7489)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants