-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Hundreds of Sphinx errors #3370
Comments
Is there a sphinx or restructured text linter that we can run? e.g. https://github.com/PyCQA/doc8 |
Do these matter? Do we know of examples of bad outcomes (e.g. hard-to-read docs)? |
Yes. For example http://xarray.pydata.org/en/stable/generated/xarray.Dataset.integrate.html#xarray.Dataset.integrate The sphinx log states: /home/docs/checkouts/readthedocs.org/user_builds/xray/conda/latest/lib/python3.7/site-packages/xarray-0.14.0+37.g96cc2bc6-py3.7.egg/xarray/core/dataset.py:docstring of xarray.Dataset.integrate:12: WARNING: Unexpected indentation. What I just now noticed is that several docstrings may be imported from numpy - which complicates everything. |
That's a good case... |
I ran https://github.com/myint/docformatter on our code But it doesn't solve many of our issues, which are around the sphinx docstrings Happy to do a PR, but worry it's more churn than help? |
Looks reasonable; though this is a checker rather than fixer |
most of the nitpicky errors are raised because numpydoc tries to link to parameter types. We can define aliases and ignore terms like for an example. We can also ignore nitpicky warnings using |
looks like I was wrong, |
this is not yet fully fixed, we still need to silence the nitpick warnings. That is blocked by the |
@keewis I'm guessing we're still stuck on this because of the Napoleon bug? Your efforts to quash the previous warnings are laudable, and would be great if we can add tests to ensure they don't creep back in... |
Every time I see activity on this... I feel like it's all my fault. Feel free to undo whatever is needed. |
most warnings are due to the bug, yes. The others are broken references to accessor methods like We could do something to make sure we don't introduce more warnings, though: the nitpicky mode allows ignoring warnings using |
I've been working on a type preprocessor for napoleon (sphinx-doc/sphinx#7690) which is pretty close (to be included in Edit: the PR has been merged, so now we only have to wait until the next release of sphinx. That feature is pretty strict about the format of the type spec, so I'll create a PR to update our docstrings. |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
sphinx-build emits a ton of errors that need to be polished out:
https://readthedocs.org/projects/xray/builds/ -> latest -> open last step
Options for the long term:
I am honestly not excited by either of the above. Alternative suggestions are welcome.
The text was updated successfully, but these errors were encountered: