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

Docs: ignore numpydoc validation checks #1310

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Docs: ignore numpydoc validation checks #1310

merged 2 commits into from
Jan 8, 2024

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Jan 8, 2024

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 pydata/xarray#8596). I tried:

  • to configure numpydoc to ignore xarray's docstrings and failed, maybe I did it wrong
  • to switch to sphinx.ext.napoleon but the API page didn't look the same and I didn't want to find what changed exactly and if it was better or worse.

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 pydata/xarray#8596). I found a (bad) hacky way to work around that.

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
@@           Coverage Diff           @@
##             main    #1310   +/-   ##
=======================================
  Coverage   85.65%   85.65%           
=======================================
  Files          52       52           
  Lines       11288    11288           
=======================================
  Hits         9669     9669           
  Misses       1619     1619           

@maximlt maximlt merged commit 662a0d6 into main Jan 8, 2024
2 of 13 checks passed
@maximlt maximlt deleted the fix_docs_build branch January 8, 2024 13:11
@jbednar
Copy link
Member

jbednar commented Jan 8, 2024

Ugh! Thanks for dealing with that.

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.

2 participants