holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.24k stars 363 forks source link

Docs: ignore numpydoc validation checks #1310

Closed maximlt closed 5 months ago

maximlt commented 5 months ago

The doc build was broken with:

Extension error (numpydoc.numpydoc):
Handler <function mangle_signature at 0x7f27ca70fe20> for event 'autodoc-process-signature' threw an exception (exception: Error parsing See Also entry ':doc:`xarray-tutorial:fundamentals/03.3_windowed`' in the docstring of coarsen in /usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/xarray/core/dataarray.py.)

It turns out Datashader doesn't use the sphinx.ext.napoleon extension to process its docstrings but numpydoc, which does more validation (than I would have expected at least) and wasn't happy with some recent changes made in xarray (see https://github.com/pydata/xarray/issues/8596). I tried:

So I ended up figuring out how to disable all the validations numpydoc performs. We probably need to revert that some day.


EDIT: Meh I must have done something wrong in my testing, this doesn't work yet.


EDIT2:

Datashader uses sphinx.ext.autodoc (e.g. the automodule directive) for its API reference and automatically includes a module that contains the Image class. Image inherits from xr.DataArray. Datashader uses numpydoc to parse the docstrings. It turns out xarray affected numpydoc in some way (see https://github.com/pydata/xarray/issues/8596). I found a (bad) hacky way to work around that.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8fb873c) 85.65% compared to head (28065e5) 85.65%.

:exclamation: Current head 28065e5 differs from pull request most recent head fbc5ff8. Consider uploading reports for the commit fbc5ff8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1310 +/- ## ======================================= Coverage 85.65% 85.65% ======================================= Files 52 52 Lines 11288 11288 ======================================= Hits 9669 9669 Misses 1619 1619 ```
jbednar commented 5 months ago

Ugh! Thanks for dealing with that.