silence sphinx warnings round 3#3602
Conversation
|
I added a lot of new entries to Edit: I also added running these are the broken links in the non-autodoc / autosummary documentation:
|
dcherian
left a comment
There was a problem hiding this comment.
Thanks @keewis. This is looking great. I've answered some of your questions below and in the review comments. Thanks again for tackling this.
In theory we could also re-enable -n and use the nitpick_ignore settings to ignore any unfixable warnings, but I'm undecided about whether that would be a good idea. Thoughts?
I'm also unsure on activating -n.
if I remember correctly, scatter, line and imshow not having a documentation is known and the link will probably be fixed once we got sphinx to document what I think @dcherian called "injection method".
I think that's what these are called. Unsure how to make sphinx do the right thing.
I'd say dask_scheduler is not part of the public API so we can convert to double-backtick quoted
👍
DataArrayCoordinates and DatasetCoordinates still exist, but they are never referenced by the docs. Are they part of the public API?
I don't think so.
show_versions does not have a docstring (which could be really small) and is not referenced elsewhere in the docs. What should I do with it?
Let's add a docstring. It's definitely public.
the tutorial functions do have docstrings. Should we mention them somewhere else?
Yes. let's add a tutorial section under API?
all the datastore documentation pages have broken links to their methods. Should I also add them to api-hidden.rst?
Yes these aren't public.
|
thanks for the review, @dcherian. The Other than that, only the injection methods and the datastore methods remain for the manually written part. Unfortunately, the autodoc / autosummary warnings are due to a sphinx bug (see #3370 (comment)), so our only option right now is to use |
Ah! I was wrong. These are public and have public methods that should be documented: see https://xarray.pydata.org/en/stable/data-structures.html#coordinates-methods |
|
Is this ready to merge? |
|
no, not yet. There are a lot of warnings left even if I leave out the ones due to the parameter type. |
|
this is fairly close now: grep -e "doc/[^/]*.rst" -e "<autosummary>" warningsgives us which means only the injected methods and the |
|
I think once we decided what to do with the Edit: I think we can just leave the accessor methods as is. This means we only have to decide what to do with |
I guess
Let's stick this in I think you should merge this after making these changes. It's a large step forward. We can revisit once someone comes up with a solution for the injected methods. |
|
👍 Wanna merge? |
|
on it |
|
👏 Welcome to xarray! |
* upstream/master: added pyinterp to related projects (pydata#3655) Allow incomplete hypercubes in combine_by_coords (pydata#3649) concat keeps attrs from first variable. (pydata#3637) Extend DatetimeAccessor properties and support `.dt` accessor for Timedelta (pydata#3612) update readthedocs.yml (pydata#3639) silence sphinx warnings round 3 (pydata#3602) Fix/quantile wrong errmsg (pydata#3635) Provide shape info in shape mismatch error. (pydata#3619) Minor doc fixes (pydata#3615) Respect user-specified coordinates attribute. (pydata#3487) Add Facetgrid.row_labels & Facetgrid.col_labels (pydata#3597) Fix pint integration tests (pydata#3600) Minor fix to combine_by_coords to allow for the combination of CFTimeIndexes separated by large time intervals (pydata#3543)
…oken * 'master' of github.com:pydata/xarray: Add nanmedian for dask arrays (pydata#3604) added pyinterp to related projects (pydata#3655) Allow incomplete hypercubes in combine_by_coords (pydata#3649) concat keeps attrs from first variable. (pydata#3637) Extend DatetimeAccessor properties and support `.dt` accessor for Timedelta (pydata#3612) update readthedocs.yml (pydata#3639) silence sphinx warnings round 3 (pydata#3602) Fix/quantile wrong errmsg (pydata#3635) Provide shape info in shape mismatch error. (pydata#3619) Minor doc fixes (pydata#3615) Respect user-specified coordinates attribute. (pydata#3487) Add Facetgrid.row_labels & Facetgrid.col_labels (pydata#3597) Fix pint integration tests (pydata#3600) Minor fix to combine_by_coords to allow for the combination of CFTimeIndexes separated by large time intervals (pydata#3543)
…equiv * 'master' of github.com:pydata/xarray: (28 commits) Add nanmedian for dask arrays (pydata#3604) added pyinterp to related projects (pydata#3655) Allow incomplete hypercubes in combine_by_coords (pydata#3649) concat keeps attrs from first variable. (pydata#3637) Extend DatetimeAccessor properties and support `.dt` accessor for Timedelta (pydata#3612) update readthedocs.yml (pydata#3639) silence sphinx warnings round 3 (pydata#3602) Fix/quantile wrong errmsg (pydata#3635) Provide shape info in shape mismatch error. (pydata#3619) Minor doc fixes (pydata#3615) Respect user-specified coordinates attribute. (pydata#3487) Add Facetgrid.row_labels & Facetgrid.col_labels (pydata#3597) Fix pint integration tests (pydata#3600) Minor fix to combine_by_coords to allow for the combination of CFTimeIndexes separated by large time intervals (pydata#3543) Fix map_blocks HLG layering (pydata#3598) Silence sphinx warnings: Round 2 (pydata#3592) 2x~5x speed up for isel() in most cases (pydata#3533) remove xarray again (pydata#3591) fix plotting with transposed nondim coords. (pydata#3441) make coarsen reductions consistent with reductions on other classes (pydata#3500) ...
* upstream/master: Add nanmedian for dask arrays (pydata#3604) added pyinterp to related projects (pydata#3655) Allow incomplete hypercubes in combine_by_coords (pydata#3649) concat keeps attrs from first variable. (pydata#3637) Extend DatetimeAccessor properties and support `.dt` accessor for Timedelta (pydata#3612) update readthedocs.yml (pydata#3639) silence sphinx warnings round 3 (pydata#3602) Fix/quantile wrong errmsg (pydata#3635) Provide shape info in shape mismatch error. (pydata#3619) Minor doc fixes (pydata#3615)
In this last "sphinx warnings" PR the goal is to silence all nit-picky warnings that are not related to napoleon's interpretation of parameter types.
In #3370 (comment) I posted ways to define type aliases (sodict-likepoints to the termmappingon https://docs.python.org/3/ andarray-liketo the appropriate page in the numpy docs) or to ignore words likeof. This PR applies these to silence all the nit-picky warnings (which mostly means broken links).As a reference for myself, the documentation of numpydoc's sphinx config options is here: https://numpydoc.readthedocs.io/en/latest/install.html#sphinx-config-optionsnumpydocdoes not have anything to do with this, we are blocked by a bug innapoleon(see #3370).At the moment only the autodoc / autosummary /
numpydocnapoleon warnings remain, with a few exceptions inwhats-new.rst.In theory we could also re-enable
-nand use thenitpick_ignoresettings to ignore any unfixable warnings, but I'm undecided about whether that would be a good idea. Thoughts?whats-new.rstfor all changes andapi.rstfor new API